/* =====================================================================
   WAF Panel — arayüz tasarım sistemi (CreativeStudio/CRM esintili).
   Açık tema · turuncu accent · koyu gradient sidebar · yuvarlak kartlar.
   Tailwind CDN yardımcı sınıflarla birlikte kullanılır; buradaki sınıflar
   bileşen katmanıdır ve tüm view'lar bunları kullanır.
   ===================================================================== */
:root {
  --accent:   #f97316;
  --accent2:  #ea580c;
  --navy:     #0f172a;
  --navy2:    #1e293b;
  --blue:     #3b82f6;
  --sidebar-w: 244px;
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  font-size: 14px;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-w);
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 60%, #2d1a4a 100%);
  display: flex; flex-direction: column; z-index: 50; overflow: hidden;
}
.sidebar::before {
  content: ''; position: absolute; bottom: -80px; left: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,.25) 0%, transparent 70%);
  pointer-events: none;
}
.sidebar-logo { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-badge {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; box-shadow: 0 6px 18px rgba(249,115,22,.4);
}
.nav-section { padding: 14px 24px 4px; font-size: 10px; font-weight: 800;
  color: rgba(255,255,255,.25); text-transform: uppercase; letter-spacing: .1em; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  border-radius: 10px; margin: 2px 10px; color: rgba(255,255,255,.55);
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .2s;
  position: relative; z-index: 1;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active {
  color: #fff; background: linear-gradient(90deg, rgba(249,115,22,.25), rgba(249,115,22,.05));
  border-left: 3px solid var(--accent); padding-left: 17px;
}
.nav-item i { width: 18px; text-align: center; opacity: .85; font-size: 14px; }
.nav-badge { margin-left: auto; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800; padding: 1px 8px; border-radius: 20px; }
.nav-badge--danger { background: #f43f5e; }
.nav-badge--muted { background: rgba(255,255,255,.15); }
.sidebar-user { padding: 14px; border-top: 1px solid rgba(255,255,255,.1); }

/* ── Main / topbar ───────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 64px;
  background: rgba(241,245,249,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0; padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
}
.topbar-title { font-size: 16px; font-weight: 800; color: #1e293b; }
.topbar-sub { font-size: 12px; color: #94a3b8; font-weight: 500; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; background: #fff;
  border: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: center;
  color: #64748b; transition: all .2s; cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.content-area { padding: 24px 28px; max-width: 1400px; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card { background: #fff; border-radius: 16px; border: 1px solid #e8edf4;
  padding: 20px 22px; transition: box-shadow .2s; }
.card:hover { box-shadow: 0 8px 32px rgba(15,23,42,.07); }
.card-title { font-size: 14px; font-weight: 800; color: #1e293b; }
.card-sub { font-size: 12px; color: #94a3b8; font-weight: 500; margin-top: 2px; }
.card-link { font-size: 12px; font-weight: 700; color: var(--accent); }
.card-link:hover { color: var(--accent2); }

/* ── Page head ───────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 22px; font-weight: 800; margin: 0; }
.page-head .muted { color: #94a3b8; font-size: 13px; margin: 4px 0 0; font-weight: 500; }

/* ── Stat card ───────────────────────────────────────────────────── */
.stat-icon { width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; }
.stat-value { font-size: 26px; font-weight: 800; color: #1e293b; }
.stat-label { font-size: 12px; color: #94a3b8; font-weight: 600; margin-top: 2px; }

/* renkli yumuşak zeminler */
.soft-orange  { background: #fff7ed; color: #f97316; }
.soft-blue    { background: #eff6ff; color: #3b82f6; }
.soft-violet  { background: #f5f3ff; color: #8b5cf6; }
.soft-rose    { background: #fff1f2; color: #f43f5e; }
.soft-emerald { background: #ecfdf5; color: #10b981; }
.soft-amber   { background: #fffbeb; color: #d97706; }
.soft-slate   { background: #f1f5f9; color: #64748b; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid transparent; padding: 9px 16px; border-radius: 11px;
  font-size: 13.5px; font-weight: 700; transition: all .2s; font-family: inherit; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(249,115,22,.28); }
.btn-primary:hover { background: var(--accent2); }
.btn-light { background: #fff; border-color: #e2e8f0; color: #475569; }
.btn-light:hover { border-color: var(--accent); color: var(--accent); }
.btn-dark { background: var(--navy2); color: #fff; }
.btn-dark:hover { background: var(--navy); }
.btn-danger { background: #fff; border-color: #fecdd3; color: #e11d48; }
.btn-danger:hover { background: #f43f5e; border-color: #f43f5e; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── Status badge ────────────────────────────────────────────────── */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.status i { font-size: 7px; }
.status-green  { background: #ecfdf5; color: #059669; }
.status-red    { background: #fff1f2; color: #e11d48; }
.status-amber  { background: #fffbeb; color: #d97706; }
.status-blue   { background: #eff6ff; color: #2563eb; }
.status-slate  { background: #f1f5f9; color: #64748b; }
.status-violet { background: #f5f3ff; color: #7c3aed; }

/* ── Progress bar ────────────────────────────────────────────────── */
.progress-bar { height: 6px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; transition: width 1s ease; }
.fill-orange  { background: #fb923c; } .fill-blue { background: #60a5fa; }
.fill-emerald { background: #34d399; } .fill-rose { background: #fb7185; }
.fill-violet  { background: #a78bfa; } .fill-amber { background: #fbbf24; }

/* ── Avatar ──────────────────────────────────────────────────────── */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
  color: #fff; flex-shrink: 0; }

/* ── Tables ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th { text-align: left; padding: 0 14px 12px; color: #94a3b8;
  font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
.tbl tbody td { padding: 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl .t-strong { font-weight: 700; color: #1e293b; }
.tbl .t-muted { color: #94a3b8; font-weight: 500; }

/* ── Forms ───────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 7px; }
.input, .select, textarea.input {
  width: 100%; padding: 11px 13px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 11px; font-size: 14px; color: #1e293b; font-family: inherit; transition: border-color .2s; }
.input:focus, .select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.field-hint { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: 12px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.alert i { font-size: 15px; }
.alert-success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.alert-error   { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.alert-info    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ── Empty state ─────────────────────────────────────────────────── */
.empty { text-align: center; padding: 54px 20px; color: #94a3b8; }
.empty i { font-size: 40px; color: #cbd5e1; margin-bottom: 14px; }
.empty h3 { font-size: 16px; font-weight: 800; color: #475569; margin: 0 0 6px; }

/* ── Auth (login) ────────────────────────────────────────────────── */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #2d1a4a 100%); }
.auth-card { width: 400px; max-width: 94vw; background: #fff; border-radius: 22px;
  padding: 36px 34px; box-shadow: 0 25px 60px rgba(0,0,0,.35); }
.auth-brand { width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 10px 24px rgba(249,115,22,.4); }

/* ── Code block ──────────────────────────────────────────────────── */
.code-block { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 16px;
  overflow-x: auto; font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.6; }

/* ── Grids ───────────────────────────────────────────────────────── */
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Mobile ──────────────────────────────────────────────────────── */
.mobile-menu-toggle { display: none; position: fixed; bottom: 20px; right: 20px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%; border: none; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); font-size: 20px;
  box-shadow: 0 8px 24px rgba(249,115,22,.4); cursor: pointer; }
.mobile-overlay { display: none; position: fixed; inset: 0; z-index: 45;
  background: rgba(15,23,42,.5); backdrop-filter: blur(2px); }
.mobile-overlay.active { display: block; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s ease; width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content-area { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
  .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
  .hide-mobile { display: none !important; }
}
