/* =====================================================================
   Dijimod marka katmanı — logo renkleri (mavi #0089CF, yeşil #8CC63F,
   mor #662D91, antrasit #2B2B2E). Bu dosya app.css'ten SONRA yüklenir.
   ===================================================================== */
:root {
  --brand-blue: #0089CF; --brand-blue-600: #0076B4; --brand-blue-700: #005F91;
  --brand-green: #8CC63F; --brand-green-600: #6FA22B; --brand-green-700: #55801E;
  --brand-purple: #662D91; --brand-purple-600: #55257A; --brand-purple-50: #F4EEFA;
  --brand-ink: #24262C; --brand-ink-2: #34373F;

  --primary: var(--brand-blue); --primary-hover: var(--brand-blue-600); --on-primary: #fff;
  --primary-soft: #E6F4FC;
  --bg: #F4F6FA; --fg: #191B21; --card: #FFFFFF; --muted: #F2F4F8; --muted-fg: #5C6478;
  --border: #E5E8F0; --border-strong: #CED4E2; --ring: var(--brand-blue);
  --danger: #DC2B37; --danger-soft: #FDF0F1;

  --t-slate-bg: #F1F3F8; --t-slate-fg: #4A5163; --t-slate: #939AAD;
  --t-blue-bg: #E6F4FC;  --t-blue-fg: #00658F;  --t-blue: var(--brand-blue);
  --t-amber-bg: #FFF6E3; --t-amber-fg: #8A5A00; --t-amber: #F2A413;
  --t-green-bg: #F0F8E4; --t-green-fg: #4C7A15; --t-green: var(--brand-green);
  --t-red-bg: #FDF0F1;   --t-red-fg: #B41F2A;   --t-red: #E14B54;
  --t-purple-bg: var(--brand-purple-50); --t-purple-fg: var(--brand-purple); --t-purple: #8B5BB5;

  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px;
  --shadow: 0 1px 2px rgb(24 27 38 / .05), 0 8px 24px -16px rgb(24 27 38 / .25);
  --shadow-lift: 0 2px 4px rgb(24 27 38 / .06), 0 14px 32px -18px rgb(24 27 38 / .35);
  --sidebar: 256px;
  --font-head: Outfit, "Fira Sans", system-ui, sans-serif;
  --font-body: Rubik, "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #2FA8E4; --primary-hover: #57BCEE; --primary-soft: #0C2C3E;
    --bg: #0E1117; --fg: #E7EAF2; --card: #161A22; --muted: #1D222C; --muted-fg: #9AA3B6;
    --border: #262C38; --border-strong: #38404F; --ring: #2FA8E4;
    --danger: #F1737C; --danger-soft: #2A1418;
    --t-slate-bg: #1F2531; --t-slate-fg: #C3CAD9; --t-slate: #6B7386;
    --t-blue-bg: #0C2C3E;  --t-blue-fg: #7FCDF2;  --t-blue: #2FA8E4;
    --t-amber-bg: #2C2008; --t-amber-fg: #F7C660; --t-amber: #E5A21C;
    --t-green-bg: #182A0C; --t-green-fg: #ADD86B; --t-green: var(--brand-green);
    --t-red-bg: #2A1418;   --t-red-fg: #F4A3A9;   --t-red: #E14B54;
    --t-purple-bg: #241239; --t-purple-fg: #C9A6E4; --t-purple: #9A6FC4;
    --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lift: 0 10px 30px -18px rgb(0 0 0 / .8);
  }
}

body { font-family: var(--font-body); font-size: 15px; letter-spacing: -.005em; }
h1, h2, h3, .kpi-value, .bubble b, .logo-text { font-family: var(--font-head); letter-spacing: -.02em; }
h1 { font-weight: 700; font-size: 1.7rem; }
h2 { font-weight: 600; }
.btn, .side-link, .bn-link, .pill, .chip, .tabs [role=tab] { font-family: var(--font-head); font-weight: 500; }

/* ---------- Marka logosu ---------- */
.brand { gap: 11px; padding: 2px 4px; }
.logo {
  width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center;
  box-shadow: 0 1px 2px rgb(0 0 0 / .18); overflow: hidden; flex: none;
}
.logo img { width: 78%; height: 78%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-head); }
.brand-text b { font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; }
.brand-text span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .62; font-weight: 500; }

/* ---------- Koyu marka menüsü ---------- */
.sidebar {
  background: linear-gradient(180deg, var(--brand-ink) 0%, #1B1D22 100%);
  border-right: 0; color: #E8EAF0; padding: 18px 12px;
}
.sidebar .brand { color: #fff; }
.side-group-title { color: #7C8496; font-size: .68rem; letter-spacing: .1em; }
.side-link { color: #AEB6C6; border-radius: var(--radius-sm); position: relative; min-height: 40px; }
.side-link .i { opacity: .85; }
.side-link:hover { background: rgb(255 255 255 / .07); color: #fff; }
.side-link.is-active { background: rgb(255 255 255 / .1); color: #fff; }
.side-link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-green) 50%, var(--brand-purple));
}
.side-link.is-active .i { opacity: 1; color: var(--brand-blue); }
.sidebar .count { background: var(--danger); box-shadow: 0 0 0 3px rgb(0 0 0 / .2); }
.sidebar .btn-primary {
  background: linear-gradient(135deg, var(--brand-blue), #0071B3); box-shadow: 0 6px 18px -8px rgb(0 137 207 / .9);
  border: 0; font-weight: 600;
}
.sidebar .btn-primary:hover { background: linear-gradient(135deg, #1596DA, var(--brand-blue-600)); }
.sidebar .btn-secondary { background: rgb(255 255 255 / .08); color: #E8EAF0; border-color: rgb(255 255 255 / .14); }
.sidebar .btn-secondary:hover { background: rgb(255 255 255 / .14); }
.me { border-top: 1px solid rgb(255 255 255 / .1); color: #E8EAF0; }
.me .avatar { background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple)); color: #fff; }
.me-name small { color: #8F97A8; }
.sidebar .icon-btn { color: #97A0B2; }
.sidebar .icon-btn:hover { background: rgb(255 255 255 / .1); color: #fff; }
.side-nav::-webkit-scrollbar { width: 5px; }
.side-nav::-webkit-scrollbar-thumb { background: rgb(255 255 255 / .14); border-radius: 3px; }

/* ---------- Üst çubuk ---------- */
.topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); min-height: 64px; }
.top-search input { border-radius: 999px; border-color: transparent; background: var(--card); box-shadow: var(--shadow); }
.top-search input:focus { border-color: var(--ring); }
.notif-btn { border-radius: 999px; }

/* ---------- Kart & yüzeyler ---------- */
.card { border-radius: var(--radius); box-shadow: var(--shadow); }
.table-card, .cal-card { overflow: hidden; }
.kpi { position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.kpi::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-green) 55%, var(--brand-purple));
  opacity: .9;
}
.kpi:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.kpi-value { font-size: 2.1rem; font-weight: 700; }
.kpi-ic { background: var(--primary-soft); color: var(--primary); border-radius: 11px; }
.kpis > .kpi:nth-child(2) .kpi-ic { background: var(--t-green-bg); color: var(--t-green-fg); }
.kpis > .kpi:nth-child(3) .kpi-ic { background: var(--t-purple-bg); color: var(--t-purple-fg); }
.kpi-danger::after { background: var(--danger); }
.kpi-warn::after { background: var(--t-amber); }

/* ---------- Butonlar ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 500; }
.btn-primary { background: var(--brand-blue); box-shadow: 0 6px 16px -10px rgb(0 137 207 / .95); }
.btn-primary:hover { background: var(--brand-blue-600); }
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-success { background: var(--brand-green-600); color: #fff; }
.btn-success:hover { background: var(--brand-green-700); }
.btn-ai { background: var(--brand-purple); color: #fff; }
.btn-ai:hover { background: var(--brand-purple-600); }
.icon-btn { border-radius: var(--radius-xs); }

/* ---------- Rozet & etiketler ---------- */
.badge { border-radius: 8px; height: 23px; font-weight: 600; font-size: .74rem; letter-spacing: .01em; }
.badge-outline { border-radius: 8px; }
.chip { border-radius: 9px; }
.pill { border-radius: 10px; }
.pill.is-active { background: var(--brand-ink); border-color: var(--brand-ink); }

/* ---------- Grafik & ilerleme ---------- */
.bar { background: linear-gradient(180deg, #33A3DE, var(--brand-blue)); border-radius: 7px 7px 3px 3px; }
.bar-col:last-child .bar { background: linear-gradient(180deg, #A3D65F, var(--brand-green-600)); }
.fill-blue { background: var(--brand-blue); } .fill-green { background: var(--brand-green-600); }
.fill-purple { background: var(--brand-purple); }
.dot-blue { background: var(--brand-blue); } .dot-green { background: var(--brand-green); } .dot-purple { background: var(--brand-purple); }
.progress { border-radius: 999px; height: 9px; }
.progress-fill { border-radius: 999px; }

/* ---------- Sekmeler ---------- */
.tabs [role=tab][aria-selected=true] { color: var(--brand-ink); border-bottom-color: var(--brand-blue); }
.tabs [role=tab][aria-selected=true] .tab-n { background: var(--primary-soft); color: var(--brand-blue-700); }
@media (prefers-color-scheme: dark) { .tabs [role=tab][aria-selected=true] { color: var(--fg); } }

/* ---------- Yapay zekâ bölümleri (mor) ---------- */
.ai-running { background: var(--t-purple-bg); color: var(--t-purple-fg); }
.card-head h2 .i, .page-head .i { vertical-align: -3px; }
.score-ring { box-shadow: inset 0 0 0 1px var(--border); }
.callout-muted > .i { color: var(--brand-purple); }
.bullets li::before { background: var(--brand-blue); }
.draft { border: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 60%, transparent); }

/* ---------- Zaman çizelgesi & satırlar ---------- */
.tl-dot { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--border); }
.row { border-color: var(--border); }
.row-main:hover .row-title { color: var(--brand-blue); }
.date-chip { border-radius: var(--radius-xs); background: var(--muted); }
.date-chip b { font-family: var(--font-head); }
.cell-firm:hover b { color: var(--brand-blue); }
.avatar { background: linear-gradient(135deg, var(--primary-soft), #EDE6F6); color: var(--brand-purple); font-family: var(--font-head); }
.avatar.sq { border-radius: 10px; }

/* ---------- Tablolar ---------- */
.table th { background: var(--muted); font-size: .72rem; letter-spacing: .06em; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }

/* ---------- Formlar ---------- */
input, select, textarea { border-radius: var(--radius-xs); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 18%, transparent); }
.seg span { border-radius: var(--radius-xs); }
.form-section > legend { font-family: var(--font-head); font-weight: 600; }
.form-section { border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--brand-blue), var(--brand-green), var(--brand-purple)) 1; border-left: 0; border-right: 0; border-bottom: 0; }
.form-section { border-top-width: 0; }

/* ---------- Giriş ekranı: marka paneli + form ---------- */
body.auth { display: grid; place-items: stretch; padding: 0; background: var(--bg); }
.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-brand {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 48px;
  background: radial-gradient(1000px 600px at 15% 15%, #3B2B55 0%, transparent 55%), linear-gradient(145deg, var(--brand-ink) 0%, #16181D 60%, #101216 100%);
  color: #fff; overflow: hidden;
}
.auth-brand::after {
  content: ""; position: absolute; right: -18%; bottom: -22%; width: 70%; aspect-ratio: 1;
  background: conic-gradient(from 210deg, var(--brand-blue), var(--brand-green), var(--brand-purple), var(--brand-blue));
  filter: blur(90px); opacity: .32;
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 16px; }
.auth-mark { width: 72px; height: 72px; border-radius: 20px; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px -12px rgb(0 0 0 / .7); }
.auth-word { font-family: var(--font-head); font-size: 2.1rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: #fff; }
.auth-word small { display: flex; gap: 14px; margin-top: 8px; font-size: .78rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.auth-word i { font-style: normal; display: flex; align-items: center; gap: 6px; color: #C9CFDC; }
.auth-word i::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.auth-word i:nth-child(1)::before { background: var(--brand-blue); }
.auth-word i:nth-child(2)::before { background: var(--brand-green); }
.auth-word i:nth-child(3)::before { background: var(--brand-purple); }
.auth-claim { font-family: var(--font-head); font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 600; line-height: 1.25; max-width: 15ch; }
.auth-claim em { font-style: normal; background: linear-gradient(90deg, #4FB6E8, var(--brand-green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-points { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.auth-points li { display: flex; align-items: center; gap: 10px; color: #C9CFDC; font-size: .95rem; }
.auth-points .i { color: var(--brand-green); width: 17px; height: 17px; }
.auth-foot { color: #79808F; font-size: .8rem; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 34px; box-shadow: var(--shadow-lift);
}
.auth-card h1 { font-size: 1.55rem; }
.auth-card .btn-lg { border-radius: var(--radius-sm); }
.auth-mobile-logo { display: none; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: flex; justify-content: center; margin-bottom: 18px; }
  .auth-mobile-logo img { width: 190px; }
  .auth-form { padding: 20px; align-items: start; padding-top: 12vh; }
}

/* ---------- Alt menü (mobil) ---------- */
.bottom-nav { border-top: 1px solid var(--border); box-shadow: 0 -6px 20px -14px rgb(24 27 38 / .5); }
.bn-link.is-active { color: var(--brand-blue); }
.bn-fab {
  background: linear-gradient(135deg, var(--brand-blue), #0071B3); border-radius: 20px;
  box-shadow: 0 10px 22px -10px rgb(0 137 207 / .95);
}

/* ---------- Bildirim paneli ---------- */
.notif-panel { border-radius: var(--radius); box-shadow: 0 18px 44px -20px rgb(24 27 38 / .55); }
.notif-item.is-unread a { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.toast { border-radius: var(--radius-sm); background: var(--brand-ink); color: #F2F4F8; }
.toast-lead { border-left-color: var(--brand-blue); }
.toast-ai { border-left-color: var(--brand-purple); }

/* ---------- Takvim ---------- */
.cal-item { border-radius: 6px; }
.is-today .cal-num { background: var(--brand-blue); }
.cal-dow { background: var(--muted); letter-spacing: .08em; }

/* ---------- Boş durumlar ---------- */
.empty-ic { background: linear-gradient(135deg, var(--primary-soft), var(--t-purple-bg)); color: var(--brand-purple); }
.flash-ok { background: var(--t-green-bg); color: var(--t-green-fg); }
.lead-alert:hover { box-shadow: var(--shadow-lift); }

/* ---------- Yazdırma ---------- */
@media print { .kpi::after { display: none; } }
