/* ==========================================================================
   Odak — Tasarım sistemi
   Tek dosya, derleme gerektirmez. Bölümler:
   1. Fontlar   2. Token'lar   3. Temel   4. Kabuk (sidebar/topbar/mobil)
   5. Tipografi & sayfa başlığı   6. Kontroller   7. Rozetler & avatarlar
   8. Paneller & listeler   9. Tablolar   10. Sekmeler & filtreler
   11. Modal, çekmece, toast, arama   12. Dashboard   13. Takvim
   14. Ders kartları & öğrenci paneli   15. Giriş ekranı   16. Yardımcılar
   ========================================================================== */

/* 1. Fontlar ---------------------------------------------------------------- */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../assets/fonts/onest-latin-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../assets/fonts/onest-latin-ext-wght-normal.woff2") format("woff2-variations");
  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: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../assets/fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../assets/fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2-variations");
  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: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("../assets/fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("../assets/fonts/newsreader-latin-ext-opsz-italic.woff2") format("woff2-variations");
  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;
}

/* 2. Token'lar -------------------------------------------------------------- */
:root {
  /* Zemin & yüzey */
  --paper: #f2f3f7;
  --sheet: #ffffff;
  --sunken: #f7f8fb;
  --line: #e5e8ef;
  --line-strong: #d3d8e3;

  /* Metin */
  --ink: #141c2e;
  --ink-2: #384257;
  --muted: #667086;
  --faint: #959db0;

  /* Marka */
  --primary: #2f4fd0;
  --primary-hover: #2541b2;
  --primary-soft: #eef2fe;
  --primary-line: #cad4f7;

  /* Öğrenci deneyimindeki sıcak vurgu */
  --saffron: #e39b2d;
  --saffron-soft: #fdf3e1;
  --saffron-ink: #8a5208;

  /* Durum tonları: [ana, yumuşak zemin, koyu metin] */
  --blue: #2f4fd0;   --blue-soft: #eef2fe;   --blue-ink: #2541b2;
  --green: #138a6f;  --green-soft: #e5f5ef;  --green-ink: #0d6b56;
  --amber: #e39b2d;  --amber-soft: #fdf3e1;  --amber-ink: #8a5208;
  --red: #d14b57;    --red-soft: #fcebed;    --red-ink: #a3303b;
  --violet: #6d52d6; --violet-soft: #f1eefc; --violet-ink: #5236b8;
  --gray: #8b93a6;   --gray-soft: #f0f2f6;   --gray-ink: #556074;

  /* Tipografi */
  --font-sans: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --text-xs: 0.75rem;     /* 12 */
  --text-sm: 0.8125rem;   /* 13 */
  --text-base: 0.875rem;  /* 14 */
  --text-md: 1rem;        /* 16 */
  --text-lg: 1.25rem;     /* 20 */
  --text-xl: 1.5rem;      /* 24 */
  --text-2xl: 1.875rem;   /* 30 */
  --text-3xl: 2.5rem;     /* 40 */
  --text-4xl: 3.25rem;    /* 52 */

  /* Ölçü & şekil */
  --sidebar-w: 252px;
  --topbar-h: 60px;
  --radius-sheet: 18px;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 7px;
  --radius-xs: 5px;

  --shadow-xs: 0 1px 2px rgba(20, 28, 46, 0.06);
  --shadow-sm: 0 1px 3px rgba(20, 28, 46, 0.07), 0 1px 2px rgba(20, 28, 46, 0.04);
  --shadow-pop: 0 18px 40px -12px rgba(20, 28, 46, 0.22), 0 3px 8px rgba(20, 28, 46, 0.06);
  --ring: 0 0 0 3px rgba(47, 79, 208, 0.22);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 160ms;
}

/* 3. Temel ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: #d8e0fb; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); transition: top var(--dur); }
.skip-link:focus { top: 12px; }
.icon { width: 18px; height: 18px; flex: none; stroke-width: 1.75; }
.icon-sm { width: 15px; height: 15px; }
.icon-xs { width: 13px; height: 13px; }
.icon-lg { width: 22px; height: 22px; }
.num { font-variant-numeric: tabular-nums; }

/* 4. Kabuk ------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px 14px 16px;
  overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { min-width: 0; line-height: 1.2; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.brand-org { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-group { margin-top: 18px; }
.nav-group:first-of-type { margin-top: 4px; }
.nav-label { padding: 0 10px 6px; font-size: var(--text-xs); color: var(--faint); font-weight: 500; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 500;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-link .icon { color: var(--muted); transition: color var(--dur); }
.nav-link:hover { background: rgba(20, 28, 46, 0.045); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav-link[aria-current="page"] .icon { color: var(--primary); }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(20, 28, 46, 0.07); color: var(--ink-2); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.nav-link[aria-current="page"] .nav-count { background: var(--primary-soft); color: var(--primary); }

.sidebar-foot { margin-top: auto; padding-top: 16px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); transition: background var(--dur); }
.user-chip:hover { background: rgba(20, 28, 46, 0.045); }
.user-chip-text { min-width: 0; flex: 1; line-height: 1.25; }
.user-chip-name { font-weight: 600; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-role { font-size: var(--text-xs); color: var(--muted); }

.sheet {
  min-width: 0;
  margin: 8px 8px 8px 0;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column;
  min-height: calc(100vh - 16px);
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
}
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--text-sm); color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--line-strong); }
.crumbs [aria-current] { color: var(--ink); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search-trigger {
  display: flex; align-items: center; gap: 9px;
  height: 36px; width: 280px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--sunken); color: var(--faint); font-size: var(--text-sm);
  transition: border-color var(--dur), background var(--dur);
}
.search-trigger:hover { border-color: var(--line-strong); background: #fff; }
.search-trigger kbd { margin-left: auto; }
kbd { font-family: var(--font-sans); font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); background: #fff; color: var(--muted); box-shadow: 0 1px 0 var(--line); }

.content { padding: 28px 32px 48px; flex: 1; animation: content-in 320ms var(--ease-out) both; }
@keyframes content-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mobile-top, .tabbar { display: none; }

/* 5. Tipografi & sayfa başlığı --------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); line-height: 1.15; letter-spacing: -0.012em; font-optical-sizing: auto; }
.page-sub { margin-top: 6px; color: var(--muted); max-width: 64ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: var(--text-md); font-weight: 620; letter-spacing: -0.01em; }
.section-sub { color: var(--muted); font-size: var(--text-sm); margin-top: 2px; }
.serif { font-family: var(--font-serif); font-optical-sizing: auto; }
.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.strong { font-weight: 600; }
.prose { color: var(--ink-2); line-height: 1.65; max-width: 70ch; white-space: pre-line; }

/* 6. Kontroller -------------------------------------------------------------- */
.btn {
  --btn-bg: var(--sheet); --btn-fg: var(--ink); --btn-bd: var(--line-strong);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--btn-bd); border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 560; font-size: var(--text-sm); white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background var(--dur) var(--ease), border-color var(--dur), transform 90ms var(--ease), box-shadow var(--dur);
  user-select: none;
}
.btn:hover { background: var(--sunken); border-color: var(--faint); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: #fff; --btn-bd: var(--primary); box-shadow: 0 1px 2px rgba(37, 65, 178, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn-dark:hover { background: #222c42; border-color: #222c42; }
.btn-danger { --btn-bg: var(--red); --btn-fg: #fff; --btn-bd: var(--red); }
.btn-danger:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(20, 28, 46, 0.05); border-color: transparent; }
.btn-soft { --btn-bg: var(--primary-soft); --btn-fg: var(--primary-hover); --btn-bd: transparent; box-shadow: none; }
.btn-soft:hover { background: #e2e8fd; border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: var(--text-xs); gap: 6px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: var(--text-base); border-radius: var(--radius); }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) var(--btn-fg); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: var(--text-sm); font-weight: 560; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.field-label .opt { color: var(--faint); font-weight: 450; }
.field-hint { font-size: var(--text-xs); color: var(--muted); }
.field-error { font-size: var(--text-xs); color: var(--red-ink); display: flex; gap: 5px; align-items: flex-start; }

.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--sheet); color: var(--ink);
  font-size: var(--text-base);
  transition: border-color var(--dur), box-shadow var(--dur);
  box-shadow: var(--shadow-xs);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--red); }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23667086' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.select[multiple] { height: auto; min-height: 120px; padding: 6px; background-image: none; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .icon { position: absolute; left: 11px; color: var(--faint); pointer-events: none; }
.input-group > .input { padding-left: 36px; }
.input-group > .input-suffix { position: absolute; right: 4px; }
.input-affix { position: absolute; right: 12px; color: var(--muted); font-size: var(--text-sm); pointer-events: none; }

.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: var(--text-sm); user-select: none; }
.check input { appearance: none; width: 17px; height: 17px; margin: 0; border: 1.5px solid var(--line-strong); border-radius: 5px; background: #fff; display: grid; place-items: center; transition: background var(--dur), border-color var(--dur); flex: none; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input[type="radio"]:checked::after { width: 7px; height: 7px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.check input:focus-visible { box-shadow: var(--ring); outline: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 26px 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section-head h3 { font-size: var(--text-md); font-weight: 600; }
.form-section-head p { color: var(--muted); font-size: var(--text-sm); margin-top: 4px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); margin-top: 6px; }

/* Segment seçici (radyo grubu) */
.segmented { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 3px; gap: 2px; border-radius: var(--radius); background: var(--gray-soft); border: 1px solid var(--line); }
.segmented label, .segmented a { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 540; color: var(--muted); cursor: pointer; transition: color var(--dur), background var(--dur), box-shadow var(--dur); white-space: nowrap; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked), .segmented a[aria-current="page"] { background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented label:has(input:focus-visible) { box-shadow: var(--ring); }
.segmented label:hover, .segmented a:hover { color: var(--ink); }

/* Seçilebilir öğrenci listesi */
.pick-list { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); max-height: 236px; overflow-y: auto; box-shadow: var(--shadow-xs); }
.pick-list .pick-search { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 6px; z-index: 1; }
.pick-list .pick-search .input { height: 32px; box-shadow: none; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: var(--text-sm); }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--sunken); }
.pick-item:has(input:checked) { background: var(--primary-soft); }

/* Dosya alanı */
.dropzone { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--sunken); transition: border-color var(--dur), background var(--dur); cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--primary); flex: none; }

/* 7. Rozetler & avatarlar ---------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 560; white-space: nowrap; background: var(--t-soft, var(--gray-soft)); color: var(--t-ink, var(--gray-ink)); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--t, var(--gray)); flex: none; }
.badge.no-dot::before { display: none; }
.tone-blue { --t: var(--blue); --t-soft: var(--blue-soft); --t-ink: var(--blue-ink); }
.tone-green { --t: var(--green); --t-soft: var(--green-soft); --t-ink: var(--green-ink); }
.tone-amber { --t: var(--amber); --t-soft: var(--amber-soft); --t-ink: var(--amber-ink); }
.tone-red { --t: var(--red); --t-soft: var(--red-soft); --t-ink: var(--red-ink); }
.tone-violet { --t: var(--violet); --t-soft: var(--violet-soft); --t-ink: var(--violet-ink); }
.tone-gray { --t: var(--gray); --t-soft: var(--gray-soft); --t-ink: var(--gray-ink); }
.badge.is-live::before { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--t) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 6px transparent; } }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--radius-xs); border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.tag-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }

.avatar { --size: 32px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; flex: none; font-size: calc(var(--size) * 0.38); font-weight: 620; letter-spacing: 0.01em; user-select: none; }
.avatar-sm { --size: 26px; }
.avatar-md { --size: 40px; }
.avatar-lg { --size: 56px; }
.avatar-xl { --size: 76px; font-family: var(--font-serif); font-weight: 500; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px #fff; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

.person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person-text { min-width: 0; line-height: 1.3; }
.person-name { font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-meta { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Katılım göstergesi (nokta dizisi) */
.attn-dots { display: inline-flex; gap: 3px; }
.attn-dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--t, var(--gray)); opacity: 0.9; }
.meter { position: relative; height: 6px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--t, var(--primary)); transition: width 600ms var(--ease-out); }

/* 8. Paneller & listeler ---------------------------------------------------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--sheet); min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.panel-head.with-line { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 16px 20px 20px; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-link { font-size: var(--text-sm); color: var(--primary); font-weight: 560; display: inline-flex; align-items: center; gap: 4px; }
.panel-link:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.panel.sunken { background: var(--sunken); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1fr) 340px; }
.grid-side-main { grid-template-columns: 320px minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }

.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); transition: background var(--dur); }
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: var(--sunken); }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-weight: 570; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-meta { font-size: var(--text-xs); color: var(--muted); margin-top: 1px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Tanım listesi */
.dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: var(--text-sm); }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 520; min-width: 0; overflow-wrap: anywhere; }

/* Rakam şeridi — kartlara bölünmemiş, çizgilerle ayrılmış metrikler */
.ledger { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--sheet); }
.ledger-item { padding: 16px 20px 18px; border-left: 1px solid var(--line); min-width: 0; }
.ledger-item:first-child { border-left: 0; }
.ledger-label { font-size: var(--text-sm); color: var(--muted); display: flex; align-items: center; gap: 7px; }
.ledger-value { margin-top: 6px; font-family: var(--font-serif); font-size: 32px; line-height: 1.05; font-weight: 500; letter-spacing: -0.015em; font-variant-numeric: lining-nums tabular-nums; }
.ledger-value small { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.ledger-foot { margin-top: 6px; font-size: var(--text-xs); color: var(--muted); }
.ledger-foot .up { color: var(--green-ink); font-weight: 600; }
.ledger-foot .down { color: var(--red-ink); font-weight: 600; }

/* Boş & hata durumları */
.empty { text-align: center; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-art { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--sunken); border: 1px solid var(--line); color: var(--muted); margin-bottom: 6px; }
.empty-title { font-weight: 620; font-size: var(--text-md); }
.empty-text { color: var(--muted); max-width: 44ch; font-size: var(--text-sm); }
.empty .btn { margin-top: 8px; }
.empty.compact { padding: 26px 16px; }

.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--t-soft); color: var(--t-ink); font-size: var(--text-sm); border: 1px solid color-mix(in srgb, var(--t) 22%, transparent); }
.alert .icon { color: var(--t); margin-top: 1px; }
.alert-title { font-weight: 620; }

.skeleton { background: linear-gradient(90deg, var(--gray-soft) 25%, #f7f8fb 37%, var(--gray-soft) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 9. Tablolar --------------------------------------------------------------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--sheet); }
.table-scroll { overflow-x: auto; }
.table { font-size: var(--text-sm); }
.table th { text-align: left; font-weight: 560; color: var(--muted); font-size: var(--text-xs); padding: 10px 16px; background: var(--sunken); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th a { display: inline-flex; align-items: center; gap: 4px; }
.table th a:hover { color: var(--ink); }
.table th.is-sorted { color: var(--ink); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur); }
.table tbody tr:hover { background: #fafbfd; }
.table tr.is-link { cursor: pointer; }
.table .t-right { text-align: right; }
.table .t-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .t-actions { width: 1%; white-space: nowrap; text-align: right; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--sheet); font-size: var(--text-sm); color: var(--muted); flex-wrap: wrap; }

.pagination { display: flex; gap: 4px; align-items: center; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pagination a:hover { background: var(--gray-soft); }
.pagination [aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
.pagination .is-disabled { color: var(--line-strong); }

/* 10. Sekmeler & filtreler ---------------------------------------------------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 0 12px; font-weight: 550; color: var(--muted); white-space: nowrap; transition: color var(--dur); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--ink); }
.tab[aria-selected="true"]::after, .tab[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); animation: tab-in 220ms var(--ease-out); }
@keyframes tab-in { from { transform: scaleX(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.tab-count { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--gray-soft); color: var(--muted); }

.filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filterbar .input-group { flex: 1 1 260px; max-width: 360px; }
.filterbar .select { width: auto; min-width: 150px; }
.filterbar .spacer { flex: 1; }
.chip-filter { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); font-size: var(--text-sm); color: var(--ink-2); background: #fff; transition: all var(--dur); }
.chip-filter:hover { border-color: var(--line-strong); }
.chip-filter[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 11. Modal, çekmece, toast, arama -------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(16, 22, 38, 0.38); backdrop-filter: blur(2px); }
.modal-wrap { position: fixed; inset: 0; z-index: 61; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal { width: 100%; max-width: 520px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); border: 1px solid var(--line); }
.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 0; }
.modal-title { font-size: var(--text-lg); font-weight: 620; letter-spacing: -0.01em; }
.modal-sub { color: var(--muted); font-size: var(--text-sm); margin-top: 3px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--sunken); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.drawer { position: fixed; z-index: 61; top: 8px; right: 8px; bottom: 8px; width: min(460px, calc(100vw - 16px)); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; border: 1px solid var(--line); }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }

/* Alpine geçişleri */
.fade-enter { transition: opacity 180ms var(--ease); }
.fade-leave { transition: opacity 140ms var(--ease); }
.fade-from { opacity: 0; }
.pop-enter { transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out); }
.pop-leave { transition: opacity 120ms var(--ease), transform 120ms var(--ease); }
.pop-from { opacity: 0; transform: translateY(8px) scale(0.98); }
.slide-enter { transition: transform 300ms var(--ease-out), opacity 200ms; }
.slide-leave { transition: transform 200ms var(--ease), opacity 160ms; }
.slide-from { transform: translateX(24px); opacity: 0; }

.toasts { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 11px 12px 11px 14px; border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: var(--shadow-pop); font-size: var(--text-sm); animation: toast-in 320ms var(--ease-out); }
.toast .icon { color: #7ee2c4; }
.toast.is-error .icon { color: #ff9aa3; }
.toast button { margin-left: auto; color: rgba(255, 255, 255, 0.6); display: grid; place-items: center; }
.toast button:hover { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }

.palette { width: 100%; max-width: 600px; margin-top: 10vh; align-self: start; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; border: 1px solid var(--line); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; height: 52px; border: 0; outline: 0; font-size: var(--text-md); background: transparent; }
.palette-results { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette-group { padding: 10px 10px 4px; font-size: var(--text-xs); color: var(--faint); font-weight: 560; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.palette-item[aria-selected="true"] { background: var(--primary-soft); }
.palette-item .icon { color: var(--muted); }
.palette-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--muted); background: var(--sunken); }

.menu { position: absolute; z-index: 40; min-width: 200px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.menu-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--ink-2); text-align: left; }
.menu-item:hover { background: var(--sunken); color: var(--ink); }
.menu-item.is-danger { color: var(--red-ink); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 0; }

/* 12. Dashboard ------------------------------------------------------------- */
.masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 26px; }
.masthead-date { color: var(--muted); font-size: var(--text-sm); display: flex; align-items: center; gap: 8px; }
.masthead-title { font-family: var(--font-serif); font-size: var(--text-3xl); line-height: 1.08; font-weight: 450; letter-spacing: -0.02em; margin-top: 8px; font-optical-sizing: auto; }
.masthead-title em { font-style: italic; color: var(--ink-2); }
.masthead-lede { margin-top: 10px; color: var(--ink-2); max-width: 60ch; font-size: var(--text-md); }
.masthead-lede b { font-weight: 620; color: var(--ink); }

/* Bugün şeridi: öğretmen kulvarları üzerinde saat çizelgesi */
.today { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--sheet); overflow: hidden; margin-bottom: 20px; }
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.today-legend { display: flex; gap: 14px; font-size: var(--text-xs); color: var(--muted); flex-wrap: wrap; }
.today-legend span { display: inline-flex; align-items: center; gap: 6px; }
.today-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--t-soft); border: 1.5px solid var(--t); }
.today-scroll { overflow-x: auto; }
.today-grid { --hours: 14; --lane-h: 46px; position: relative; min-width: 860px; display: grid; grid-template-columns: 168px minmax(0, 1fr); }
.today-lanes-names { border-right: 1px solid var(--line); background: var(--sheet); position: sticky; left: 0; z-index: 3; }
.today-hours { position: relative; height: 30px; border-bottom: 1px solid var(--line); }
.today-hours span { position: absolute; top: 8px; transform: translateX(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.today-name { height: var(--lane-h); display: flex; align-items: center; gap: 9px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: var(--text-sm); font-weight: 550; min-width: 0; }
.today-name:last-child { border-bottom: 0; }
.today-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-name-head { height: 30px; border-bottom: 1px solid var(--line); }
.today-track { position: relative; }
.today-lane { position: relative; height: var(--lane-h); border-bottom: 1px solid var(--line); background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--hours)) 100%; }
.today-lane:last-child { border-bottom: 0; }
.today-block { position: absolute; top: 6px; bottom: 6px; border-radius: 7px; padding: 4px 8px; background: var(--t-soft); border: 1px solid color-mix(in srgb, var(--t) 35%, transparent); border-left: 3px solid var(--t); font-size: 11.5px; line-height: 1.25; overflow: hidden; color: var(--t-ink); transition: transform var(--dur) var(--ease), box-shadow var(--dur); min-width: 6px; }
.today-block:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); z-index: 2; }
.today-block b { display: block; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-block span { white-space: nowrap; opacity: 0.85; }
.today-block.is-cancelled { background: repeating-linear-gradient(135deg, var(--gray-soft) 0 6px, #fff 6px 12px); text-decoration: line-through; }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.now-line::before { content: attr(data-time); position: absolute; top: 6px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 99px; font-variant-numeric: tabular-nums; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 20px; margin-top: 20px; }
.chart { position: relative; width: 100%; }
.chart svg { overflow: visible; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow-pop); transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity 120ms; }
.chart-tip.is-on { opacity: 1; }
.chart-tip b { font-weight: 650; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--text-xs); color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }

.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--line); font-size: var(--text-sm); font-weight: 560; transition: border-color var(--dur), background var(--dur); }
.quick-action:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.quick-action .icon { color: var(--primary); }

.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 120px) auto; align-items: center; gap: 14px; padding: 9px 0; }
.rank-bar { height: 8px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--primary)); }

.feed-item { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.feed-item:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 38px; bottom: -4px; width: 1px; background: var(--line); }
.feed-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); border: 1px solid var(--line); color: var(--muted); flex: none; }
.feed-icon .icon { width: 14px; height: 14px; }
.feed-text { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.45; }
.feed-time { font-size: var(--text-xs); color: var(--faint); margin-top: 2px; }

.finance-split { display: grid; grid-template-columns: 1fr 1fr; }
.finance-split > div, .finance-split > a { padding: 16px 20px; }
.finance-split > * + * { border-left: 1px solid var(--line); }
.finance-figure { font-family: var(--font-serif); font-size: 28px; font-weight: 500; letter-spacing: -0.015em; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }

/* 13. Takvim ---------------------------------------------------------------- */
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-title { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 500; letter-spacing: -0.01em; min-width: 0; }
.cal-nav { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-xs); }
.cal-nav a { display: grid; place-items: center; height: 34px; padding: 0 10px; background: #fff; font-size: var(--text-sm); font-weight: 560; }
.cal-nav a + a { border-left: 1px solid var(--line); }
.cal-nav a:hover { background: var(--sunken); }
.cal-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.cal-filters .select { height: 34px; width: auto; min-width: 160px; font-size: var(--text-sm); }

.cal { --hour-h: 56px; --start: 8; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; overflow: hidden; }
.cal-head { display: grid; grid-template-columns: 58px repeat(var(--days), minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--sheet); position: relative; z-index: 6; }
.cal-head-cell { padding: 10px 10px 9px; border-left: 1px solid var(--line); display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.cal-head-cell .dow { font-size: var(--text-xs); color: var(--muted); font-weight: 550; }
.cal-head-cell .dnum { font-family: var(--font-serif); font-size: 21px; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.cal-head-cell.is-today .dnum { color: #fff; background: var(--primary); border-radius: 8px; padding: 3px 6px 2px; }
.cal-head-cell .dcount { margin-left: auto; font-size: 11px; color: var(--faint); }
.cal-body { display: grid; grid-template-columns: 58px repeat(var(--days), minmax(0, 1fr)); position: relative; max-height: calc(100vh - 260px); min-height: 480px; overflow-y: auto; }
.cal-gutter { position: relative; }
.cal-gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% var(--hour-h); }
.cal-col.is-today { background-color: #fbfcff; }
.cal-col.is-weekend { background-color: #fcfcfd; }
.cal-slot { position: absolute; left: 0; right: 0; height: calc(var(--hour-h) / 2); }
.cal-slot:hover { background: rgba(47, 79, 208, 0.045); }
.cal-slot:hover::after { content: "+"; position: absolute; left: 8px; top: 2px; font-size: 13px; color: var(--primary); font-weight: 600; }
.cal-event {
  position: absolute; left: 4px; right: 4px; z-index: 2;
  padding: 5px 7px 5px 9px; border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  font-size: 12px; line-height: 1.3; text-align: left; color: var(--ink);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  cursor: pointer;
}
.cal-event::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.cal-event:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); z-index: 4; }
.cal-event:focus-visible { box-shadow: var(--ring); outline: none; z-index: 4; }
.cal-event-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 5px; }
.cal-event-title { font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-sub { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event.is-completed { background: #fff; }
.cal-event.is-completed .cal-event-title::after { content: " ✓"; color: var(--green); }
.cal-event.is-cancelled { background: repeating-linear-gradient(135deg, #f6f7fa 0 5px, #fff 5px 10px); border-color: var(--line); color: var(--muted); }
.cal-event.is-cancelled::before { background: var(--gray); }
.cal-event.is-cancelled .cal-event-title { text-decoration: line-through; color: var(--muted); }
.cal-event.is-live { box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 55%, transparent); }
.cal-event.is-awaiting::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.cal-month-dow { padding: 9px 10px; font-size: var(--text-xs); font-weight: 560; color: var(--muted); background: var(--sunken); border-bottom: 1px solid var(--line); }
.cal-month-cell { min-height: 118px; padding: 7px 7px 8px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-month-cell:nth-child(7n + 1) { border-left: 0; }
.cal-month-cell.is-out { background: #fafbfc; }
.cal-month-cell.is-out .cal-month-num { color: var(--faint); }
.cal-month-num { font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.cal-month-cell.is-today .cal-month-num span { background: var(--primary); color: #fff; border-radius: 6px; padding: 0 6px; }
.cal-chip { display: flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 5px; font-size: 11.5px; text-align: left; width: 100%; min-width: 0; background: color-mix(in srgb, var(--c) 9%, #fff); transition: background var(--dur); }
.cal-chip:hover { background: color-mix(in srgb, var(--c) 16%, #fff); }
.cal-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.cal-chip b { font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.cal-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.is-cancelled { opacity: 0.55; text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--muted); padding: 1px 6px; text-align: left; }
.cal-more:hover { color: var(--primary); }

.agenda { display: none; }
.agenda-day { margin-bottom: 18px; }
.agenda-date { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 8px; position: sticky; top: 56px; background: var(--sheet); z-index: 2; }
.agenda-date b { font-family: var(--font-serif); font-size: 24px; font-weight: 500; line-height: 1; }
.agenda-date span { color: var(--muted); font-size: var(--text-sm); }
.agenda-date.is-today b { color: var(--primary); }
.agenda-item { display: flex; gap: 12px; align-items: stretch; width: 100%; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: #fff; }
.agenda-time { width: 52px; flex: none; font-variant-numeric: tabular-nums; font-weight: 620; font-size: var(--text-sm); line-height: 1.3; }
.agenda-time small { display: block; color: var(--faint); font-weight: 500; }
.agenda-bar { width: 3px; border-radius: 3px; background: var(--c); flex: none; }

/* 14. Ders kartları & öğrenci paneli ----------------------------------------- */
.lesson-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: border-color var(--dur), box-shadow var(--dur); }
.lesson-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.lesson-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lesson-card-title { font-weight: 620; font-size: var(--text-md); letter-spacing: -0.005em; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--text-sm); color: var(--ink-2); }
.lesson-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lesson-meta .icon { width: 15px; height: 15px; color: var(--muted); }
.lesson-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.time-pill { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); flex: none; line-height: 1.1; }
.time-pill b { font-family: var(--font-serif); font-size: 20px; font-weight: 500; font-variant-numeric: lining-nums; }
.time-pill span { font-size: 11px; color: var(--muted); }

/* Öğrenci deneyimi: daha sıcak, daha yumuşak */
.student-theme { --primary-soft: #eef2fe; }
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 24px; }
.welcome-title { font-family: var(--font-serif); font-size: var(--text-4xl); line-height: 1.02; font-weight: 400; letter-spacing: -0.025em; font-optical-sizing: auto; }
.welcome-title span { display: block; color: var(--muted); font-style: italic; font-weight: 350; }
.streak { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 99px; background: var(--saffron-soft); color: var(--saffron-ink); font-size: var(--text-sm); }
.streak-ring { width: 38px; height: 38px; }

/* Sıradaki ders bileti */
.ticket { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 270px; border-radius: 20px; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.ticket::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 140% at 0% 0%, #26345a 0%, transparent 55%), radial-gradient(90% 120% at 100% 100%, #1f3a8a 0%, transparent 60%); opacity: 0.9; }
.ticket-main { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ticket-eyebrow { display: flex; align-items: center; gap: 10px; font-size: var(--text-sm); color: rgba(255, 255, 255, 0.7); }
.ticket-title { font-family: var(--font-serif); font-size: 34px; line-height: 1.08; font-weight: 450; letter-spacing: -0.015em; }
.ticket-teacher { display: flex; align-items: center; gap: 12px; }
.ticket-teacher .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18); }
.ticket-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-fact { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); font-size: var(--text-sm); }
.ticket-fact .icon { width: 15px; height: 15px; opacity: 0.75; }
.ticket-side { position: relative; padding: 26px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; background: rgba(255, 255, 255, 0.04); border-left: 1.5px dashed rgba(255, 255, 255, 0.18); }
.ticket-side::before, .ticket-side::after { content: ""; position: absolute; left: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--sheet); }
.ticket-side::before { top: -11px; }
.ticket-side::after { bottom: -11px; }
.countdown-label { font-size: var(--text-sm); color: rgba(255, 255, 255, 0.65); }
.countdown { font-family: var(--font-serif); font-size: 44px; line-height: 1; font-weight: 400; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.02em; margin-top: 6px; }
.countdown small { font-size: 15px; font-family: var(--font-sans); color: rgba(255, 255, 255, 0.6); margin: 0 6px 0 2px; letter-spacing: 0; }
.btn-join { --btn-bg: var(--saffron); --btn-fg: #241503; --btn-bd: var(--saffron); height: 50px; font-size: var(--text-md); font-weight: 650; border-radius: 12px; box-shadow: 0 8px 24px -8px rgba(227, 155, 45, 0.7); }
.btn-join:hover { background: #f0ab40; border-color: #f0ab40; }
.btn-join.is-waiting { --btn-bg: rgba(255, 255, 255, 0.1); --btn-fg: rgba(255, 255, 255, 0.85); --btn-bd: rgba(255, 255, 255, 0.14); box-shadow: none; pointer-events: none; }
.join-hint { font-size: var(--text-xs); color: rgba(255, 255, 255, 0.6); line-height: 1.5; }

.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-day { padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); min-height: 112px; display: flex; flex-direction: column; gap: 6px; background: #fff; min-width: 0; }
.week-day.is-today { border-color: var(--primary-line); background: #fbfcff; box-shadow: inset 0 2px 0 var(--primary); }
.week-day.is-past { background: var(--sunken); }
.week-day-head { display: flex; align-items: baseline; justify-content: space-between; }
.week-day-head b { font-family: var(--font-serif); font-size: 22px; font-weight: 500; line-height: 1; }
.week-day-head span { font-size: var(--text-xs); color: var(--muted); }
.week-lesson { display: block; padding: 5px 7px; border-radius: 6px; font-size: 11.5px; line-height: 1.3; background: color-mix(in srgb, var(--c) 10%, #fff); border-left: 2.5px solid var(--c); min-width: 0; }
.week-lesson b { display: block; font-variant-numeric: tabular-nums; }
.week-lesson span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }

.stat-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stat-trio > div, .stat-trio > a { padding: 16px 18px; }
.stat-trio > * + * { border-left: 1px solid var(--line); }
.stat-big { font-family: var(--font-serif); font-size: 34px; font-weight: 450; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; margin-top: 6px; }
.stat-big small { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--muted); letter-spacing: 0; margin-left: 3px; font-weight: 500; }

.ring { --p: 0; --c: var(--primary); width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--gray-soft) 0); display: grid; place-items: center; flex: none; }
.ring::before { content: ""; grid-area: 1 / 1; width: 78%; height: 78%; border-radius: 50%; background: #fff; }
.ring span { grid-area: 1 / 1; font-weight: 650; font-size: var(--text-sm); z-index: 1; font-variant-numeric: tabular-nums; }

.hw-item { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.hw-item:first-child { border-top: 0; }
.hw-due { width: 46px; text-align: center; flex: none; line-height: 1.1; }
.hw-due b { display: block; font-family: var(--font-serif); font-size: 22px; font-weight: 500; }
.hw-due span { font-size: 11px; color: var(--muted); }

.teacher-mini { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.teacher-mini + .teacher-mini { border-top: 1px solid var(--line); }

/* Profil başlığı */
.profile-head { display: flex; gap: 20px; align-items: center; padding-bottom: 24px; margin-bottom: 4px; flex-wrap: wrap; }
.profile-name { font-family: var(--font-serif); font-size: var(--text-2xl); font-weight: 500; letter-spacing: -0.012em; line-height: 1.1; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--muted); font-size: var(--text-sm); }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-head .page-actions { margin-left: auto; }

/* Yoklama satırı */
.attn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.attn-row:first-child { border-top: 0; }
.attn-options { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.attn-opt { position: relative; }
.attn-opt input { position: absolute; opacity: 0; pointer-events: none; }
.attn-opt span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 550; color: var(--muted); cursor: pointer; transition: all var(--dur); background: #fff; }
.attn-opt span:hover { border-color: var(--line-strong); color: var(--ink); }
.attn-opt input:checked + span { background: var(--t-soft); border-color: color-mix(in srgb, var(--t) 45%, transparent); color: var(--t-ink); }
.attn-opt input:focus-visible + span { box-shadow: var(--ring); }

.timeline-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--t, var(--line-strong)); background: #fff; margin-top: 2px; }

/* 15. Giriş ekranı ---------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr); background: var(--sheet); }
.auth-art { position: relative; margin: 10px; border-radius: 22px; background: var(--ink); color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 44px; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 85% 10%, rgba(66, 98, 226, 0.55), transparent 60%), radial-gradient(60% 50% at 0% 100%, rgba(227, 155, 45, 0.22), transparent 70%); }
.auth-orbits { position: absolute; right: -140px; top: 50%; transform: translateY(-50%); width: 620px; height: 620px; z-index: -1; opacity: 0.9; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-name { font-size: 17px; }
.auth-quote { max-width: 30ch; }
.auth-quote h2 { font-family: var(--font-serif); font-size: 44px; line-height: 1.06; font-weight: 400; letter-spacing: -0.02em; }
.auth-quote p { margin-top: 16px; color: rgba(255, 255, 255, 0.68); font-size: var(--text-md); max-width: 42ch; line-height: 1.6; }
.auth-schedule { display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.auth-slot { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.09); font-size: var(--text-sm); backdrop-filter: blur(6px); }
.auth-slot b { font-variant-numeric: tabular-nums; font-weight: 620; width: 44px; }
.auth-slot span { color: rgba(255, 255, 255, 0.72); }
.auth-slot i { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-form { width: 100%; max-width: 384px; }
.auth-title { font-family: var(--font-serif); font-size: 34px; font-weight: 450; letter-spacing: -0.018em; line-height: 1.1; }
.auth-sub { color: var(--muted); margin-top: 8px; margin-bottom: 28px; }
.auth-form .field + .field { margin-top: 16px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 22px; font-size: var(--text-sm); }
.auth-row a { color: var(--primary); font-weight: 560; }
.auth-row a:hover { text-decoration: underline; text-underline-offset: 3px; }
.demo-box { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.demo-box-title { font-size: var(--text-sm); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.demo-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; transition: border-color var(--dur), background var(--dur); width: 100%; }
.demo-btn:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.demo-btn b { font-size: var(--text-sm); font-weight: 600; }
.demo-btn span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.auth-foot { margin-top: 32px; font-size: var(--text-xs); color: var(--faint); }

/* Hata sayfaları */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-code { font-family: var(--font-serif); font-size: 96px; line-height: 1; font-weight: 400; letter-spacing: -0.04em; color: var(--ink); }
.error-page p { color: var(--muted); max-width: 44ch; margin: 12px auto 24px; }

/* 16. Yardımcılar ----------------------------------------------------------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 28px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hide-mobile { }
.show-mobile { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.dot-sep::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); vertical-align: middle; margin: 0 8px; }
.color-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.link { color: var(--primary); font-weight: 560; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 1280px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-main-side { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1080px) {
  :root { --sidebar-w: 220px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main-side, .grid-side-main { grid-template-columns: minmax(0, 1fr); }
  .ledger { grid-template-columns: repeat(min(var(--cols, 4), 2), minmax(0, 1fr)); }
  .ledger-item:nth-child(2n + 1) { border-left: 0; }
  .ledger-item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .form-section { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .search-trigger { width: 220px; }
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket-side { border-left: 0; border-top: 1.5px dashed rgba(255, 255, 255, 0.18); flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .ticket-side::before { top: -12px; left: -11px; }
  .ticket-side::after { top: -12px; bottom: auto; left: auto; right: -11px; }
  .ticket-side > div:last-child { flex: 1 1 240px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 280px; padding: 28px; }
  .auth-schedule { display: none; }
  .auth-quote h2 { font-size: 34px; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .sheet { margin: 0; border: 0; border-radius: 0; box-shadow: none; min-height: 100vh; padding-bottom: 72px; }
  .topbar { display: none; }
  .mobile-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .mobile-top .brand { padding: 0; }
  .mobile-top .brand-mark { width: 26px; height: 26px; }
  .mobile-top-title { font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; font-size: 10.5px; font-weight: 560; color: var(--muted); }
  .tabbar .icon { width: 21px; height: 21px; }
  .tabbar [aria-current="page"] { color: var(--primary); }
  .content { padding: 20px 16px 32px; }
  .agenda-date { top: 56px; }
  .page-title { font-size: 26px; }
  .masthead, .welcome { grid-template-columns: minmax(0, 1fr); }
  .masthead-title { font-size: 32px; }
  .welcome-title { font-size: 38px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial !important; }
  .cal-week-view { display: none; }
  .agenda { display: block; }
  .cal-month { display: none; }
  .week-strip { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .week-day { min-height: 0; flex-direction: row; align-items: flex-start; gap: 12px; }
  .week-day-head { flex-direction: column; align-items: flex-start; width: 44px; flex: none; }
  .week-day-lessons { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .week-day.is-empty-day { display: none; }
  .ticket-main { padding: 22px 20px; }
  .ticket-title { font-size: 27px; }
  .ticket-side { padding: 20px; }
  .countdown { font-size: 36px; }
  .stat-trio { grid-template-columns: minmax(0, 1fr); }
  .stat-trio > * + * { border-left: 0; border-top: 1px solid var(--line); }
  .finance-split { grid-template-columns: minmax(0, 1fr); }
  .finance-split > * + * { border-left: 0; border-top: 1px solid var(--line); }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .toasts { left: 12px; right: 12px; bottom: 84px; }
  .toast { min-width: 0; max-width: none; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; }
  .slide-from { transform: translateY(32px); }
  .modal-wrap { align-items: end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .palette { margin-top: 0; border-radius: 0 0 16px 16px; }
  .filterbar .input-group { max-width: none; flex-basis: 100%; }
  .filterbar .select { flex: 1 1 140px; }
  .profile-head .page-actions { margin-left: 0; width: 100%; }
  .attn-row { grid-template-columns: minmax(0, 1fr); }
  .rank-row { grid-template-columns: minmax(0, 1fr) 64px auto; }
  .auth-art { margin: 0; border-radius: 0 0 22px 22px; min-height: 220px; }
  .auth-orbits { width: 420px; height: 420px; right: -160px; }
  .auth-quote h2 { font-size: 28px; }
  .auth-quote p { display: none; }

  /* Mobilde tablolar kart listesine dönüşür */
  .table-responsive thead { display: none; }
  .table-responsive, .table-responsive tbody, .table-responsive tr, .table-responsive td { display: block; width: 100%; }
  .table-responsive tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-responsive tr:last-child { border-bottom: 0; }
  .table-responsive td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-responsive td::before { content: attr(data-label); color: var(--muted); font-size: var(--text-xs); text-align: left; flex: none; }
  .table-responsive td.t-primary { text-align: left; padding-bottom: 8px; }
  .table-responsive td.t-primary::before { display: none; }
  .table-responsive td.t-actions { width: 100%; justify-content: flex-end; padding-top: 8px; }
  .table-responsive td.t-actions::before { display: none; }
  .table-responsive td:empty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .sidebar, .topbar, .tabbar, .mobile-top, .page-actions, .btn { display: none !important; }
  .app { display: block; }
  .sheet { border: 0; margin: 0; }
}

/* Renk seçici */
.swatch-opt { position: relative; cursor: pointer; }
.swatch-opt input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-opt span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; transition: box-shadow var(--dur); }
.swatch-opt input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.swatch-opt input:focus-visible + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }

/* Hata sayfaları */
.error-shell { max-width: 520px; }
.error-title { font-family: var(--font-serif); font-size: clamp(26px, 6vw, 34px); font-weight: 500; line-height: 1.15; margin-top: 18px; }
.error-shell .row { flex-wrap: wrap; }
.pagination .page-status { display: none; }
@media (max-width: 640px) {
  .pagination .page-num { display: none; }
  .pagination .page-status { display: inline-grid; color: var(--muted); }
}

/* Alt bilgi */
.app-footer { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 14px 32px 18px; border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--faint); }
.auth-foot-credit::before { content: "·"; margin: 0 6px; }
@media (max-width: 860px) {
  .app-footer { padding: 14px 16px 18px; }
}
