/* =====================================================================
   EduPanel — Tasarım Sistemi v5 (Corporate Blue / Sınav Hazırlık Merkezi)
   Kurumsal bir eğitim/sınav hazırlık platformunun kimliği: kurumsal mavi +
   kısıtlı altın vurgu, buz mavisi zemin, net border'lar, Lexend/Source Sans 3.
   Gradient, glow, glassmorphism, neon yok — ayrım border ve tipografiyle.
   Admin / veli / öğrenci aynı token setinden beslenir (tek marka = tek mavi).
   ===================================================================== */

:root {
  /* Marka — Kurumsal Mavi */
  --brand: #3978B5;
  --brand-600: #3978B5;
  --brand-700: #2E659A;        /* hover + linkler */
  --brand-soft: #E7F0F9;       /* açık mavi tint: rozet/hover zemini */
  --accent-gold: #B8860B;      /* çok kısıtlı vurgu — küçük body text'te kullanma */

  /* Nötrler (slate) */
  --ink: #1E293B;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #D9E4EF;
  --line-2: #E8EEF5;
  --bg: #F4F8FC;
  --card: #FFFFFF;

  /* Kenar çubuğu — düz kurumsal mavi (gradient yok) */
  --sidebar-bg: #24547F;
  --sidebar-ink: #C2D2E4;
  --sidebar-ink-active: #FFFFFF;

  /* Durum renkleri (semantik) */
  --ok: #16794C;
  --warn: #B45309;
  --danger: #B91C1C;
  --info: #3978B5;
  --teal: #0E7490;

  /* Tipografi */
  --font-heading: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 11.5px;
  --text-sm: 12.5px;
  --text-base: 14.5px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 21px;
  --text-2xl: 25px;
  --leading-tight: 1.25;
  --leading-normal: 1.5;

  /* Boşluk ölçeği */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Köşe yuvarlaklığı — modern SaaS, ölçülü */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  /* Gölgeler — minimal; ayrım öncelikle border ile yapılır */
  --shadow-xs: 0 1px 2px rgba(20,30,25,.04);
  --shadow-sm: 0 1px 2px rgba(20,30,25,.05);
  --shadow: 0 1px 3px rgba(20,30,25,.07);
  --shadow-lg: 0 4px 14px rgba(20,30,25,.10);
  --sidebar-w: 260px;
}

/* Lexend — başlıklar (self-hosted; latin + latin-ext, TR karakter desteği) */
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../vendor/fonts/lexend-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../vendor/fonts/lexend-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Source Sans 3 — gövde/UI (self-hosted; latin + latin-ext, TR karakter desteği) */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../vendor/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../vendor/fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }

/* Özel kaydırma çubuğu */
* { scrollbar-width: thin; scrollbar-color: #c3d2e2 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #c3d2e2; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #a9bdd4; background-clip: content-box; }

/* ---------- Yerleşim ---------- */
.layout { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  z-index: 1045;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; }
.sidebar__logo {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--brand);
  display: grid; place-items: center; color: #fff; font-size: 21px;
}
.sidebar__brand-name { font-family: var(--font-heading); font-size: 17px; font-weight: 600; color: #fff; margin: 0; line-height: 1.1; letter-spacing: -.01em; }
.sidebar__brand small { color: #8FA6C0; font-size: 11px; }

.sidebar__nav { padding: 6px 12px 22px; overflow-y: auto; flex: 1; }
.sidebar__section { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #7E97B4; padding: 15px 12px 6px; font-weight: 700; }
.sidebar__link {
  display: flex; align-items: center; gap: 12px;
  padding: 9.5px 13px; margin: 2px 0; border-radius: var(--radius);
  color: var(--sidebar-ink); text-decoration: none; font-weight: 500;
  transition: background .16s, color .16s; white-space: nowrap;
}
.sidebar__link i { font-size: 17px; width: 20px; text-align: center; opacity: .92; }
.sidebar__link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar__link.active { background: var(--brand); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--accent-gold); }
.sidebar__link:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.sidebar__badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }

/* Sidebar alt-bağlantı (2. seviye — ör. Öğrenci → Öğrenciler, Personel → Öğretmenler) */
.sidebar__link--sub { padding-left: 45px; margin-top: -1px; font-size: 12.5px; font-weight: 400; color: #A9BDD6; }
.sidebar__link--sub i { font-size: 13.5px; width: 16px; opacity: .85; }
.sidebar__link--sub:hover { color: #fff; }
.sidebar__link--sub.active { font-weight: 600; color: #fff; }

/* Nested navigasyon (MAKSİMUM 2 seviye) — Öğrenci / Personel tek accordion katmanı.
   Açık/kapalı durumu sayfa yüklenirken PHP tarafında (aktif rotaya göre) hesaplanır; JS sadece
   manuel aç/kapa tıklamasını yönetir (bkz. public/assets/js/app.js). */
.sidebar__group { margin: 0; }
.sidebar__parent-row { display: flex; align-items: stretch; gap: 2px; }
.sidebar__parent-row .sidebar__link { flex: 1; min-width: 0; }
.sidebar__parent-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  padding: 9.5px 13px; margin: 2px 0; border-radius: var(--radius);
  background: none; border: 0; color: var(--sidebar-ink); font: inherit; font-weight: 500;
  text-align: left; cursor: pointer; transition: background .16s, color .16s;
}
.sidebar__parent-btn i { font-size: 17px; width: 20px; text-align: center; opacity: .92; }
.sidebar__parent-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar__parent-btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.sidebar__caret {
  flex: none; width: 30px; margin: 2px 0; display: grid; place-items: center;
  background: none; border: 0; color: #8FA6C0; cursor: pointer; border-radius: var(--radius-xs);
}
.sidebar__caret:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar__caret:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.sidebar__caret i { font-size: 12px; transition: transform .15s ease; }
.sidebar__group.is-open > .sidebar__parent-row > .sidebar__caret i { transform: rotate(180deg); }
.sidebar__submenu { margin: 0; }
@media (prefers-reduced-motion: reduce) { .sidebar__caret i { transition: none; } }

/* Bağlam kümesi (ör. Personel → Öğretmenler + ona bağlı akademik işlemler) — SADECE görsel
   gruplama; kendi aç/kapa düğmesi/accordion'u YOK, ebeveyni (Personel) açıldığında hep birlikte
   görünür. "Öğretmenler" normal bir link (2. seviye), altındaki işlemler ince bir dal çizgisiyle
   ona bağlı gösterilir (3. bir interaktif seviye değil, salt hiyerarşi okunabilirliği). */
.sidebar__ctx { margin: 2px 0; }
.sidebar__link--ctx { font-weight: 600; color: #E7F0F9; }
.sidebar__link--ctx:hover { color: #fff; }
.sidebar__link--ctx.active { color: #fff; }
.sidebar__ctx-children { position: relative; margin: 1px 0 4px 33px; padding-left: 12px; border-left: 1.5px solid rgba(255,255,255,.16); }
.sidebar__link--ctxchild { padding: 6.5px 10px; margin: 0; font-size: 12px; font-weight: 400; color: #93A9C4; }
.sidebar__link--ctxchild i { font-size: 12.5px; width: 14px; opacity: .8; }
.sidebar__link--ctxchild:hover { color: #fff; }
.sidebar__link--ctxchild.active { font-weight: 600; color: #fff; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Üst çubuk — nötr, içerik odaklı (marka rengi sidebar'da) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
}
.topbar__title { font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -.01em; color: var(--ink); }
.topbar__crumb { color: var(--muted); font-size: 12.5px; }
.topbar__spacer { flex: 1; }
.topbar__user { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; background: none; border: 0; font-size: 22px; color: var(--ink-2); }

/* Üst çubuk arama alanı — sayfa isteğe bağlı ekler (data-table-search ile mevcut tabloyu filtreler) */
.topbar__search { position: relative; max-width: 320px; width: 100%; }
.topbar__search input {
  width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 14px 8px 36px; font-size: 13.5px;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.topbar__search input::placeholder { color: var(--muted); }
.topbar__search input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(57,120,181,.12); }
.topbar__search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
@media (max-width: 767.98px) { .topbar__search { display: none; } }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand);
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.avatar--sm { width: 30px; height: 30px; font-size: 11px; }
.avatar--lg { width: 68px; height: 68px; font-size: 22px; }

.content { padding: 26px; flex: 1; max-width: 1500px; width: 100%; }
@media (min-width: 1600px){ .content { padding: 30px 44px; } }

/* ---------- Kartlar ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--card); transition: box-shadow .15s; }
.card-header { background: transparent; border-bottom: 1px solid var(--line-2); font-weight: 600; padding: 15px 20px; letter-spacing: -.01em; }
.card-header h2, .card-header h3 { font: inherit; font-family: var(--font-heading); letter-spacing: inherit; margin: 0; color: inherit; }
.card-body { padding: var(--space-5); }

.section-title { font-family: var(--font-heading); font-size: 15px; font-weight: 600; margin: 0; }

/* ---------- İstatistik kartları ---------- */
.stat {
  display: flex; align-items: center; gap: 15px; height: 100%;
  padding: 18px 20px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: box-shadow .15s;
}
.stat:hover { box-shadow: var(--shadow); }
.stat__icon { width: 50px; height: 50px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 23px; flex-shrink: 0; }
.stat__label { color: var(--muted); font-size: var(--text-xs); font-weight: 650; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 600; margin: 2px 0 0; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__value--compact { font-size: var(--text-xl); }
.stat__sub { font-size: var(--text-xs); margin: 0; }
/* yumuşak ikon tonları — sadece anlamlı olduğunda kullanılır */
.ic-blue { background: var(--brand-soft); color: var(--brand); }
.ic-green { background: #E4F1EE; color: var(--ok); }
.ic-amber { background: #F7ECDC; color: var(--warn); }
.ic-purple { background: #F0EBDF; color: var(--accent-gold); }
.ic-rose { background: #F5E4E4; color: var(--danger); }
.ic-cyan { background: #E4F1EE; color: var(--ok); }
.ic-neutral { background: var(--line-2); color: var(--ink-2); }

/* ---------- Özet paneli (KPI grupları) ---------- */
.kpi-card__label { display: block; font-size: var(--text-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 14px; }
.kpi-row { display: flex; margin: 0 calc(var(--space-5) * -1); }
.kpi-item { flex: 1; padding: 0 var(--space-5); min-width: 0; }
.kpi-item + .kpi-item { border-left: 1px solid var(--line-2); }
.kpi-item__label { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.kpi-item__label i { font-size: 13px; }
.kpi-item__value { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 0; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-item__value--compact { font-size: var(--text-lg); }
.kpi-item__meta { display: block; font-size: var(--text-xs); color: var(--muted); margin-top: 6px; }
.kpi-item__meta .meter { margin-bottom: 5px; }

.proportion-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.proportion-bar > span { display: block; height: 100%; }

@media (max-width: 575.98px) {
  .kpi-row { flex-direction: column; margin: 0; gap: 14px; }
  .kpi-item { padding: 0; }
  .kpi-item + .kpi-item { border-left: 0; border-top: 1px solid var(--line-2); padding-top: 14px; }
}

/* ---------- Özet kartları — beyaz zemin + renkli ikon rozeti ---------- */
.gstat {
  border-radius: var(--radius); padding: 16px 18px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  min-height: 100px; display: flex; align-items: center; gap: 14px;
}
.gstat__icon-badge { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 21px; }
.gstat__body { min-width: 0; }
.gstat__label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.gstat__value { font-family: var(--font-heading); font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.gstat--blue   .gstat__icon-badge { background: #E7F0F9; color: #2E659A; }
.gstat--purple .gstat__icon-badge { background: #EEE8FB; color: #6D28D9; }
.gstat--green  .gstat__icon-badge { background: #E3F5EC; color: #157F49; }
.gstat--orange .gstat__icon-badge { background: #FCEFDC; color: #B45309; }
@media (max-width: 575.98px) {
  .gstat { min-height: 88px; padding: 13px 15px; }
  .gstat__value { font-size: 22px; }
}

/* Tıklanabilir özet kartları (sayfaya götürür) */
a.gstat-link { display: block; text-decoration: none; color: inherit; }
a.gstat-link .gstat { position: relative; transition: transform .15s ease, box-shadow .15s ease; }
a.gstat-link:hover .gstat { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30,41,59,.24); }
a.gstat-link:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 16px; }
.gstat__go { position: absolute; top: 16px; right: 16px; font-size: 15px; opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; }
a.gstat-link:hover .gstat__go { opacity: .95; transform: translateX(0); }

/* Hızlı erişim kısayolları */
.quick-access { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qa-tile { display: flex; align-items: center; gap: 12px; padding: 13px 15px; min-height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface, #fff); text-decoration: none; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.qa-tile:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(57,120,181,.13); transform: translateY(-2px); }
.qa-tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.qa-tile__icon { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 19px; }
.qa-tile__label { font-weight: 600; font-size: 14px; line-height: 1.2; }
.qa-ic-blue   { background: #E7F0F9; color: #2E659A; }
.qa-ic-green  { background: #E3F5EC; color: #157F49; }
.qa-ic-amber  { background: #FBF0DC; color: #A9690A; }
.qa-ic-purple { background: #EEE8FB; color: #6D28D9; }
.qa-ic-red    { background: #FBE9E9; color: #B93A2B; }
.qa-ic-teal   { background: #DDF1F0; color: #0F766E; }
@media (prefers-reduced-motion: reduce) {
  a.gstat-link .gstat, a.gstat-link:hover .gstat, .qa-tile, .qa-tile:hover, .gstat__go { transition: none; transform: none; }
}

/* Aylık tahsilat grafiği — modern başlık KPI'ı */
.chart-head__kpi { display: flex; align-items: baseline; gap: 10px; margin-top: 5px; }
.chart-head__value { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.chart-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.chart-trend.up { color: #157F49; background: #E3F5EC; }
.chart-trend.down { color: #B93A2B; background: #FBE9E9; }

/* Dashboard — kompakt üst satır: KPI kartları + Hızlı Erişim aynı hizada */
.dash-top-row { display: flex; flex-direction: column; gap: 12px; }
.dash-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; flex: 1; min-width: 0; }
.dash-quick-wrap { flex: none; width: 100%; }
@media (min-width: 1200px) {
  .dash-top-row { flex-direction: row; align-items: stretch; }
  .dash-kpis { grid-template-columns: repeat(4, 1fr); }
  .dash-quick-wrap { width: 460px; }
}

/* Hızlı Erişim — ikon üstte, etiket altta (staff dashboard + portal'da ortak kullanılır) */
.dash-quick2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.dash-quick2__tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 10px 4px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background-color .15s ease, transform .15s ease; }
.dash-quick2__tile:hover { background: var(--brand-soft); transform: translateY(-2px); }
.dash-quick2__tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.dash-quick2__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex: none; }
.dash-quick2__label { font-size: 11px; font-weight: 600; line-height: 1.15; }
@media (prefers-reduced-motion: reduce) { .dash-quick2__tile, .dash-quick2__tile:hover { transition: none; transform: none; } }

/* Dashboard — sıkı kart: sadece dashboard'a özel, global .card etkilenmez */
.card--tight > .card-header { padding: 11px 18px; }
.card--tight > .card-body { padding: 14px 18px; }

/* Sayfa üstü özet şeridi — mini stat kartları (tüm liste sayfaları) */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; margin-bottom: 1.1rem; }
.statlet { display: flex; align-items: center; gap: 13px; padding: 15px 17px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.statlet__icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 21px; }
.statlet__meta { min-width: 0; }
.statlet__value { font-family: var(--font-heading); font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.statlet__label { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
/* Tıklanabilir statlet — ilgili sayfaya götürür */
a.statlet { text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.statlet:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(57,120,181,.13); transform: translateY(-2px); }
a.statlet:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { a.statlet, a.statlet:hover { transition: none; transform: none; } }

/* Vadesi geçen borçlular — okunur, modern satırlar */
.debtor-row { transition: background .12s ease; }
.debtor-row td { vertical-align: middle; }
.debtor-amount { color: #B93A2B; font-weight: 700; font-variant-numeric: tabular-nums; }
.debtor-count { display: block; font-size: var(--text-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* ---------- Tablolar ---------- */
.table { margin: 0; }
.table thead th {
  font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line);
  padding: 12px 16px; white-space: nowrap;
}
.table tbody td { padding: 13px 16px; vertical-align: middle; border-bottom: 1px solid var(--line-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr { transition: background .12s; }
.table-hover tbody tr:hover { background: var(--brand-soft); }
.table-wrap { overflow-x: auto; }

/* ---------- Rozetler (yumuşak pastel) ---------- */
.badge-soft { font-weight: 600; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; display: inline-flex; align-items: center; }
.bs-green { background: #E4F1EE; color: #0B5D53; }
.bs-amber { background: #F7ECDC; color: #96600D; }
.bs-red { background: #F5E4E4; color: #A33131; }
.bs-blue { background: var(--brand-soft); color: var(--brand-700); }
.bs-gray { background: var(--line-2); color: var(--ink-2); }
.bs-cyan { background: #E4F1EE; color: #0B5D53; }
.bs-purple { background: #F0EBDF; color: #8A6524; }

/* ---------- Butonlar ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; padding: 9px 17px; transition: background-color .15s, border-color .15s, color .15s; letter-spacing: -.01em; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-primary {
  background: var(--brand); border-color: var(--brand);
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-700); --bs-btn-hover-border-color: var(--brand-700);
  --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-primary:hover, .btn-primary:focus-visible, .btn-primary:active, .btn-primary.active { background: var(--brand-700); border-color: var(--brand-700); }
.btn-soft { background: var(--brand-soft); color: var(--brand-700); border: 1px solid #C9DBEC; }
.btn-soft:hover { background: #D6E6F4; color: var(--brand-700); border-color: #B6CFE6; }
.btn-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; }
.btn-success { background: var(--ok); border-color: var(--ok); }
.btn-danger { background: var(--danger); border-color: var(--danger); }

/* ---------- Formlar ---------- */
.form-label { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: 10px 13px; font-size: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(57,120,181,.18); }
.form-control::placeholder { color: #9BA69F; }
.input-group-text { border-radius: var(--radius-sm); border-color: var(--line); background: var(--line-2); }
.input-hint { font-size: 12px; color: var(--muted); }
.is-invalid ~ .invalid-feedback { display: block; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(57,120,181,.18); border-color: var(--brand); }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty i { font-size: 46px; opacity: .3; display: block; margin-bottom: 12px; color: var(--brand); }

/* ---------- Toast / uyarı ---------- */
.flash-wrap { position: fixed; top: 18px; right: 18px; z-index: 1080; max-width: 370px; }
.flash {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 16px; border-radius: var(--radius); margin-bottom: 10px;
  box-shadow: var(--shadow-lg); background: #fff; border-left: 3px solid var(--brand);
  animation: slidein .32s cubic-bezier(.4,0,.2,1);
}
.flash--ok { border-color: var(--ok); } .flash--ok i { color: var(--ok); }
.flash--error { border-color: var(--danger); } .flash--error i { color: var(--danger); }
@keyframes slidein { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }

.alert { border-radius: var(--radius-sm); border: 0; }
.alert-info { background: var(--brand-soft); color: var(--brand-700); }
.alert-success { background: #E4F1EE; color: #0B5D53; }
.alert-warning { background: #F7ECDC; color: #8A5A0F; }
.alert-danger { background: #F5E4E4; color: #8F2C2C; }

/* ---------- Ders programı ızgarası ---------- */
.timetable td { height: 78px; text-align: center; vertical-align: middle; border: 1px solid var(--line); position: relative; }
.tt-slot { border-radius: var(--radius-xs); padding: 7px 5px; color: #fff; font-size: 12.5px; line-height: 1.25; font-weight: 600; }
.tt-empty { color: #A8B3AC; font-size: 12px; }

/* ---------- Doluluk çubuğu ---------- */
.meter { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .5s ease; }

/* ---------- Sekmeler ---------- */
.nav-tabs { border-bottom: 1px solid var(--line); gap: 4px; }
.nav-tabs .nav-link { border: 0; color: var(--muted); font-weight: 600; padding: 11px 17px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: color .15s; }
.nav-tabs .nav-link:hover { color: var(--brand-700); }
.nav-tabs .nav-link.active { color: var(--brand-700); background: transparent; border-bottom: 2.5px solid var(--brand); }

/* ---------- Dropdown ---------- */
.dropdown-menu { border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; }
.dropdown-item { border-radius: var(--radius-xs); padding: 8px 12px; font-size: 14px; }
.dropdown-item:hover { background: var(--brand-soft); color: var(--brand-700); }

/* Topbar'daki sabit Hızlı Erişim menüsü — tüm sayfalarda görünür (bkz. partials/quick_access.php) */
.qa-topbar-btn { display: inline-flex; align-items: center; }
.qa-topbar-menu { width: 320px; max-width: calc(100vw - 32px); max-height: 75vh; overflow-y: auto; padding: 12px; }

/* ---------- Küçük yardımcılar ---------- */
.text-muted-2 { color: var(--muted); }
.text-primary { color: var(--brand) !important; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
a.list-row, .list-row[role="button"] { border-radius: var(--radius-sm); transition: background-color .13s; }
a.list-row:hover, .list-row[role="button"]:hover { background: var(--brand-soft); padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.badge.bg-primary { background: var(--brand) !important; }

/* ---------- Mobil ---------- */
.sidebar__backdrop { display: none; position: fixed; inset: 0; background: rgba(10,18,15,.5); backdrop-filter: blur(2px); z-index: 1040; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar__backdrop.show { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: block; }
  .content { padding: 16px; }
  .topbar { padding: 11px 16px; }
  .topbar__title { font-size: 17px; }
  .stat { padding: 15px; gap: 13px; }
  .stat__icon { width: 44px; height: 44px; font-size: 20px; }
  .stat__value { font-size: 21px; word-break: break-word; }
  .stat__value--compact { font-size: 17px; }
}

/* Tablet (768–991px) — sidebar hâlâ off-canvas ama içerik biraz daha ferah kalsın */
@media (min-width: 768px) and (max-width: 991.98px) {
  .content { padding: 20px 22px; }
  .topbar { padding: 13px 20px; }
}

@media (max-width: 400px) {
  .stat__value { font-size: 19px; }
  .stat__value--compact { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .stat, .card, .table-hover tbody tr, .sidebar { transition: none !important; }
  .stat:hover { transform: none; }
}

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- Giriş / kimlik ekranları (split tasarım) ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden; color: #fff;
  background: var(--sidebar-bg);
  padding: 54px 52px; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid rgba(255,255,255,.06);
}
.auth-brand__top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-brand__logo { width: 46px; height: 46px; border-radius: var(--radius); background: var(--brand); display: grid; place-items: center; font-size: 24px; }
.auth-brand__mid { position: relative; z-index: 1; }
.auth-brand__mid h2 { font-size: 31px; font-weight: 600; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.01em; }
.auth-brand__mid p { color: #C4D2CB; font-size: 15px; max-width: 410px; line-height: 1.6; }
.auth-feat { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.auth-feat > div { display: flex; align-items: center; gap: 12px; color: #D8E3DD; font-size: 14.5px; }
.auth-feat i { width: 36px; height: 36px; border-radius: var(--radius-sm); background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 17px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-form__inner { width: 100%; max-width: 400px; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}
