/* =====================================================================
   İdrak Liseyi — Elektron jurnal dizayn sistemi
   Brend: lacivərt #0E1559 + qızılı #FAB416 (loqodan)
   ===================================================================== */

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Montserrat', var(--font);

  --navy: #0e1559;
  --navy-2: #1a2275;
  --navy-deep: #080d3d;
  --gold: #fab416;
  --gold-2: #ffc94a;

  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eef0f8;
  --border: #e3e6f0;
  --border-strong: #ccd1e3;
  --text: #11163d;
  --text-2: #3a4066;
  --muted: #6c7294;

  --primary: #0e1559;
  --primary-hover: #1a2275;
  --primary-soft: #e8eaf7;
  --primary-ink: #ffffff;
  --accent: #fab416;
  --accent-ink: #0e1559;
  --accent-soft: #fff4d6;

  --success: #16a34a;  --success-soft: #dcfce7;
  --danger: #dc2626;   --danger-soft: #fee2e2;
  --warn: #d97706;     --warn-soft: #fef3c7;
  --info: #2563eb;     --info-soft: #dbeafe;

  --g5: #16a34a; --g5-soft: #dcfce7;
  --g4: #2563eb; --g4-soft: #dbeafe;
  --g3: #d97706; --g3-soft: #fef3c7;
  --g2: #dc2626; --g2-soft: #fee2e2;

  --side-bg: #0e1559;
  --side-bg-2: #080d3d;
  --side-text: #cdd1ee;
  --side-muted: #8a90c0;
  --side-active: rgba(250, 180, 22, .12);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(14, 21, 89, .05);
  --shadow: 0 1px 2px rgba(14, 21, 89, .04), 0 6px 20px rgba(14, 21, 89, .07);
  --shadow-lg: 0 10px 40px rgba(14, 21, 89, .16);
  --sidebar-w: 268px;
  --topbar-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --bg: #070a24;
  --surface: #0e1235;
  --surface-2: #131840;
  --surface-3: #1a204d;
  --border: #222960;
  --border-strong: #2e3675;
  --text: #e9ebfa;
  --text-2: #c0c4e6;
  --muted: #8b91bd;

  --primary: #fab416;
  --primary-hover: #ffc94a;
  --primary-soft: rgba(250, 180, 22, .13);
  --primary-ink: #0e1559;
  --accent: #fab416;
  --accent-soft: rgba(250, 180, 22, .14);

  --success-soft: rgba(22, 163, 74, .16);
  --danger: #f87171;  --danger-soft: rgba(248, 113, 113, .14);
  --warn: #fbbf24;    --warn-soft: rgba(251, 191, 36, .14);
  --info: #818cf8;    --info-soft: rgba(129, 140, 248, .15);

  --g5: #4ade80; --g5-soft: rgba(74, 222, 128, .14);
  --g4: #818cf8; --g4-soft: rgba(129, 140, 248, .16);
  --g3: #fbbf24; --g3-soft: rgba(251, 191, 36, .14);
  --g2: #f87171; --g2-soft: rgba(248, 113, 113, .14);

  --side-bg: #0a0e33;
  --side-bg-2: #050722;
  --side-active: rgba(250, 180, 22, .1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 14px 48px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- Əsas ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
small { font-size: .82rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-xs { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Düymələr ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 42px; padding: 0 1.1rem;
  font: 600 .92rem/1 var(--font);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s, color .2s;
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-block { width: 100%; }
.btn-lg { height: 50px; font-size: 1rem; border-radius: 12px; }
.btn-sm { height: 34px; padding: 0 .75rem; font-size: .82rem; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-width: 40px; height: 40px; padding: 0 .55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font: 600 .8rem var(--font);
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .icon { width: 19px; height: 19px; }

.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline-flex; }
.theme-icon-light, .theme-icon-dark { line-height: 0; }

/* ---------- Formalar ---------- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
  width: 100%;
  height: 46px;
  padding: 0 .9rem;
  font: 500 .95rem var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.input-icon input { padding-left: 2.6rem; }
.input-icon input[data-password] { padding-right: 2.8rem; }
.input-action {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.input-action:hover { background: var(--surface-2); color: var(--text); }
.input-action.is-on { color: var(--primary); }
.hint { font-size: .82rem; color: var(--muted); display: flex; gap: .4rem; align-items: flex-start; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.strength i { height: 4px; border-radius: 4px; background: var(--border); transition: background .25s; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--warn); }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--g4); }
.strength[data-level="4"] i { background: var(--success); }

/* ---------- Bildiriş qutuları ---------- */
.alert {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 1rem;
  transition: opacity .4s, transform .4s;
}
.alert .icon { width: 18px; height: 18px; margin-top: 1px; }
.alert-error   { background: var(--danger-soft);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.alert-info    { background: var(--info-soft);    color: var(--info);    border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.alert.is-hiding { opacity: 0; transform: translateY(-6px); }
.form .alert { margin-bottom: 0; }

/* ---------- Avatar, çip ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  font: 700 .85rem var(--font-head); color: #fff;
  background: linear-gradient(135deg, #0e1559, #2a348f);
}
.avatar-xs { width: 30px; height: 30px; border-radius: 9px; font-size: .7rem; }
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: .75rem; }
.avatar-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 1rem; }
.avatar-xl { width: 76px; height: 76px; border-radius: 22px; font-size: 1.5rem; }
.avatar-admin   { background: linear-gradient(135deg, #080d3d, #0e1559); box-shadow: inset 0 0 0 2px rgba(250,180,22,.55); }
.avatar-teacher { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.avatar-student { background: linear-gradient(135deg, #d97706, #f59e0b); }
.avatar-parent  { background: linear-gradient(135deg, #be185d, #ec4899); }
.avatar-none    { background: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  height: 30px; padding: 0 .7rem;
  border-radius: 999px;
  font-size: .8rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
}
.chip-primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip-admin   { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip-teacher { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip-student { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip-parent  { background: color-mix(in srgb, #ec4899 14%, transparent); color: #db2777; border-color: transparent; }
[data-theme="dark"] .chip-parent { color: #f472b6; }
.tag { font-style: normal; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .5rem; border-radius: 6px; background: var(--surface-3); color: var(--muted); }

/* =====================================================================
   PANEL ŞABLONU
   ===================================================================== */
.app-body { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 50% at 0% 0%, rgba(250, 180, 22, .14), transparent 60%),
    linear-gradient(180deg, var(--side-bg), var(--side-bg-2));
  color: var(--side-text);
  transition: transform .3s var(--ease);
}
.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  height: var(--topbar-h); padding: 0 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: #fff;
  color: var(--navy);
  padding: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25), 0 0 0 2px rgba(250, 180, 22, .5);
}
.brand-mark .icon { width: 20px; height: 20px; }
.brand-mark-lg { width: 48px; height: 48px; border-radius: 14px; }
.brand-mark-lg .icon { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font: 800 1.15rem var(--font-head); color: #fff; }
.brand-text small { color: var(--side-muted); font-size: .72rem; }
.sidebar-close { display: none; margin-left: auto; background: transparent; border-color: rgba(255, 255, 255, .1); color: var(--side-text); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .75rem 1rem; scrollbar-width: thin; }
.nav-section {
  margin: 1.1rem .65rem .4rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--side-muted);
}
.nav-section:first-child { margin-top: .3rem; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: .75rem;
  padding: .62rem .75rem;
  border-radius: 10px;
  color: var(--side-text);
  font-weight: 500; font-size: .92rem;
  transition: background .2s, color .2s;
}
.nav-link .icon { width: 19px; height: 19px; opacity: .85; }
.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-link.is-active {
  background: var(--side-active); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(250, 180, 22, .22);
}
.nav-link.is-active::before {
  content: ''; position: absolute; left: -.75rem; top: 22%; bottom: 22%;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--gold);
}
.nav-link.is-active .icon { color: var(--gold); opacity: 1; }
.nav-link.is-disabled { opacity: .5; cursor: default; }
.nav-link.is-disabled:hover { background: transparent; color: var(--side-text); }
.nav-soon {
  margin-left: auto;
  font-style: normal; font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .15rem .4rem; border-radius: 5px;
  background: rgba(251, 191, 36, .15); color: #fbbf24;
}

.sidebar-user {
  display: flex; align-items: center; gap: .7rem;
  margin: .75rem; padding: .7rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-user-text strong { color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-text small { color: var(--side-muted); font-size: .74rem; }
.sidebar-user .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .1); color: var(--side-text); min-width: 36px; height: 36px; }
.sidebar-user .icon-btn:hover { background: rgba(248, 113, 113, .15); color: #fca5a5; }

.sidebar-backdrop { display: none; }

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

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  height: var(--topbar-h); padding: 0 1.75rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; }
.topbar-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.topbar-title h1 { font-size: 1.15rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-date { font-size: .78rem; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.badge-dot {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; border: 2px solid var(--bg);
  background: var(--danger); color: #fff;
  font-size: .62rem; font-weight: 700; line-height: 14px; text-align: center;
}
.user-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 42px; padding: 0 .6rem 0 .35rem;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font: 600 .88rem var(--font); cursor: pointer;
}
.user-chip:hover { background: var(--surface-2); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 220px; padding: .4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s, transform .18s var(--ease), visibility .18s;
}
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-wide { width: 330px; }
.dropdown-head { display: flex; flex-direction: column; padding: .6rem .7rem .55rem; font-weight: 700; font-size: .85rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.dropdown-head small { color: var(--muted); font-weight: 500; }
.dropdown-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .7rem; border-radius: 9px;
  color: var(--text-2); font-size: .9rem; font-weight: 500;
}
.dropdown-item .icon { width: 17px; height: 17px; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item.is-active { background: var(--primary-soft); color: var(--primary); }
.dropdown-item.is-danger:hover { background: var(--danger-soft); color: var(--danger); }
.lang-code { display: inline-flex; width: 28px; font-size: .72rem; font-weight: 800; color: var(--muted); }
.dropdown-item.is-active .lang-code { color: var(--primary); }
.dropdown-empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.4rem; color: var(--muted); font-size: .88rem; }
.note-item { display: flex; flex-direction: column; gap: .1rem; padding: .6rem .7rem; border-radius: 9px; color: var(--text-2); font-size: .85rem; }
.note-item:hover { background: var(--surface-2); }
.note-item strong { color: var(--text); }
.note-item small { color: var(--muted); }
.note-item.is-unread { background: var(--primary-soft); }

/* Məzmun */
.content { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 1.75rem; }
.app-footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.75rem; font-size: .8rem; color: var(--muted);
  border-top: 1px solid var(--border);
}

/* Kartlar və şəbəkə */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.card-head h3 { display: flex; align-items: center; gap: .55rem; font-size: 1.02rem; font-weight: 800; }
.card-head h3 .icon { color: var(--primary); width: 19px; height: 19px; }
.card-accent {
  background:
    radial-gradient(100% 140% at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    var(--surface);
}
.grid { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }

/* Salamlama bloku */
.welcome {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.6rem 1.75rem;
  margin-bottom: 1.25rem;
  border-radius: calc(var(--radius) + 4px);
  color: #fff;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(251, 191, 36, .28), transparent 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(80, 96, 220, .35), transparent 60%),
    linear-gradient(135deg, #080d3d 0%, #0e1559 55%, #1d2785 100%);
  box-shadow: 0 12px 32px rgba(11, 47, 42, .22);
}
.welcome::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  pointer-events: none;
}
.welcome > * { position: relative; z-index: 1; }
.welcome .eyebrow { font-size: .9rem; opacity: .85; margin-bottom: .25rem; }
.welcome h2 { font-size: 1.65rem; font-weight: 800; }
.welcome-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.welcome .chip { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }

/* Statistika kartları */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card {
  --tone: var(--primary); --tone-soft: var(--primary-soft);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: .15rem;
  padding: 1.2rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--tone-soft); opacity: .7;
}
.tone-teal  { --tone: #0e1559; --tone-soft: #e8eaf7; }
.tone-blue  { --tone: #2563eb; --tone-soft: #dbeafe; }
.tone-rose  { --tone: #db2777; --tone-soft: #fce7f3; }
.tone-amber { --tone: #d97706; --tone-soft: #fef3c7; }
[data-theme="dark"] .tone-teal  { --tone: #a5adff; --tone-soft: rgba(129, 140, 248, .12); }
[data-theme="dark"] .tone-blue  { --tone: #60a5fa; --tone-soft: rgba(96, 165, 250, .1); }
[data-theme="dark"] .tone-rose  { --tone: #f472b6; --tone-soft: rgba(244, 114, 182, .1); }
[data-theme="dark"] .tone-amber { --tone: #fbbf24; --tone-soft: rgba(251, 191, 36, .1); }
.stat-icon {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: .6rem;
  background: var(--tone-soft); color: var(--tone);
}
.stat-value { position: relative; z-index: 1; font: 800 1.9rem/1.1 var(--font-head); letter-spacing: -.02em; }
.stat-label { position: relative; z-index: 1; color: var(--muted); font-size: .86rem; font-weight: 500; }
.stat-bar { position: relative; z-index: 1; height: 5px; border-radius: 5px; background: var(--surface-3); margin-top: .6rem; overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: inherit; background: var(--tone); transition: width 1s var(--ease); }

/* Quraşdırma siyahısı + halqa */
.ring {
  --p: 0;
  flex-shrink: 0;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0);
}
.ring span {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  font: 800 .82rem var(--font-head);
}
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.checklist li {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.check-bullet {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--muted);
}
.check-bullet .icon { width: 14px; height: 14px; }
.check-icon { color: var(--muted); line-height: 0; }
.check-icon .icon { width: 18px; height: 18px; }
.check-label { flex: 1; font-weight: 500; font-size: .92rem; }
.checklist li.is-done { background: var(--primary-soft); border-color: transparent; }
.checklist li.is-done .check-bullet { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.checklist li.is-done .check-icon { color: var(--primary); }
.checklist li.is-done .check-label { color: var(--text-2); }

.roadmap { display: flex; gap: 1rem; align-items: flex-start; }
.roadmap-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
}
.roadmap h3 { font-size: 1rem; margin-bottom: .25rem; }
.roadmap p { color: var(--muted); font-size: .9rem; }

/* Mini statistika */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.mini-stats div {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .8rem; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.mini-stats strong { font: 800 1.4rem var(--font-head); }
.mini-stats span { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.mini-stats .is-warn strong { color: var(--danger); }

/* Fəaliyyət xətti */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: .75rem; padding: .65rem 0; border-bottom: 1px dashed var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline p { font-size: .88rem; color: var(--text-2); }
.timeline p strong { color: var(--text); }
.timeline small { color: var(--muted); font-size: .76rem; }
.timeline li.is-warn p { color: var(--danger); }

/* Boş vəziyyət */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem;
  padding: 2rem 1rem; color: var(--muted); font-size: .9rem;
}
.empty .icon {
  width: 52px; height: 52px; padding: 13px;
  border-radius: 16px; background: var(--surface-2); color: var(--muted);
}
.empty-lg { padding: 3rem 1rem; }

/* Dərs siyahısı */
.lesson-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.lesson {
  --c: var(--primary);
  display: flex; align-items: center; gap: .9rem;
  padding: .75rem .85rem .75rem .75rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--c);
}
.lesson-no {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
  font: 800 .95rem var(--font-head);
}
.lesson-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lesson-body small { color: var(--muted); }
.lesson.is-now { background: color-mix(in srgb, var(--c) 8%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.lesson.is-now .lesson-no { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 40%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

/* Sinif plitələri */
.class-tiles { display: flex; flex-direction: column; gap: .6rem; }
.class-tile { display: flex; align-items: center; gap: .85rem; padding: .75rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.class-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 52px; height: 52px; padding: 0 .4rem; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #4f5bd5));
  color: var(--primary-ink); font: 800 1.15rem var(--font-head);
}
.subject-dots { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .2rem; }
.subject-pill {
  --c: var(--primary);
  font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 6px;
  background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c);
}
[data-theme="dark"] .subject-pill, [data-theme="dark"] .lesson-no { color: color-mix(in srgb, var(--c) 55%, #fff); }

/* Qiymətlər */
.grade-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.grade-list li { display: flex; align-items: center; gap: .8rem; padding: .55rem .2rem; border-bottom: 1px dashed var(--border); }
.grade-list li:last-child { border-bottom: 0; }
.grade-list div { display: flex; flex-direction: column; }
.grade-list small { color: var(--muted); }
.grade-pill {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 40px; height: 40px; padding: 0 .4rem; border-radius: 11px;
  font: 800 1.05rem var(--font-head);
}
.g5 { background: var(--g5-soft); color: var(--g5); }
.g4 { background: var(--g4-soft); color: var(--g4); }
.g3 { background: var(--g3-soft); color: var(--g3); }
.g2 { background: var(--g2-soft); color: var(--g2); }

/* Ev tapşırıqları */
.hw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.hw-list li { --c: var(--primary); padding: .75rem .9rem; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--c); }
.hw-list p { font-size: .88rem; color: var(--text-2); margin: .15rem 0 .3rem; }
.hw-list small { color: var(--muted); }

/* Valideyn: övlad bloku */
.child-block { margin-bottom: 2rem; }
.child-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.child-head h3 { font-size: 1.2rem; }

/* Profil */
.profile-hero { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.profile-hero h2 { font-size: 1.4rem; margin-bottom: .5rem; }

/* =====================================================================
   GİRİŞ SƏHİFƏSİ
   ===================================================================== */
.login-body { min-height: 100vh; background: var(--bg); }
.login-shell { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }

.login-visual {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem;
  color: #fff;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(251, 191, 36, .25), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(80, 96, 220, .35), transparent 60%),
    linear-gradient(150deg, #050722 0%, #0e1559 50%, #1d2785 100%);
}
.login-visual::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.login-visual-inner { position: relative; z-index: 1; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 2.2rem; }
.brand-row { display: flex; align-items: center; gap: .85rem; }
.brand-row span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.brand-row strong { font: 800 1.25rem var(--font-head); }
.brand-row small { color: rgba(255, 255, 255, .65); }

.journal-mock {
  background: rgba(255, 255, 255, .97);
  color: #13221e;
  border-radius: 20px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .5);
  transform: rotate(-1.5deg);
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: rotate(-1.5deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-8px); } }
.jm-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .85rem; font-size: .92rem; }
.jm-dot { width: 10px; height: 10px; border-radius: 3px; }
.jm-live { margin-left: auto; font-size: .66rem; font-weight: 800; letter-spacing: .06em; color: #16a34a; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.jm-grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(5, 38px); gap: 5px; align-items: center; }
.jm-name { font-size: .8rem; font-weight: 600; color: #3b4b46; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jm-day { font-size: .7rem; font-weight: 700; color: #6b7a75; text-align: center; }
.jm-day.jm-today { color: #0e1559; }
.jm-cell {
  height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font: 800 .85rem var(--font-head);
  opacity: 0; transform: scale(.6);
  animation: pop .45s var(--ease) forwards;
  animation-delay: var(--d);
}
@keyframes pop { to { opacity: 1; transform: none; } }
.jm-g5 { background: #dcfce7; color: #15803d; }
.jm-g4 { background: #dbeafe; color: #1d4ed8; }
.jm-g3 { background: #fef3c7; color: #b45309; }
.jm-g2 { background: #fee2e2; color: #b91c1c; }
.jm-pres { background: #f1f5f3; color: #9aa9a3; }
.jm-abs { background: #fee2e2; color: #dc2626; font-size: .66rem; }
.jm-late { background: #fef3c7; color: #b45309; font-size: .72rem; }
.jm-cell.jm-today { box-shadow: 0 0 0 2px rgba(14, 21, 89, .35); }
.jm-foot { display: flex; gap: 1.2rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px dashed #e2e8e3; font-size: .8rem; color: #6b7a75; }
.jm-foot b { color: #0e1559; font-family: var(--font-head); }

.login-copy h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.02em; }
.login-copy p { color: rgba(255, 255, 255, .75); font-size: 1rem; max-width: 440px; }
.feature-list { list-style: none; padding: 0; margin: 1.3rem 0 0; display: flex; flex-direction: column; gap: .7rem; }
.feature-list li { display: flex; align-items: center; gap: .7rem; font-weight: 500; color: rgba(255, 255, 255, .9); }
.feature-list .icon {
  width: 32px; height: 32px; padding: 7px; border-radius: 9px;
  background: rgba(250, 180, 22, .14); color: var(--gold);
}

.login-panel { display: flex; flex-direction: column; padding: 1.5rem 2rem; background: var(--surface); }
.login-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; }
.seg-lang { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.seg-lang a { padding: .4rem .7rem; border-radius: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.seg-lang a:hover { color: var(--text); }
.seg-lang a.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.login-form-wrap { flex: 1; width: 100%; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; }
.login-form-wrap h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.login-form-wrap > .muted { margin: .4rem 0 1.8rem; }
.login-form-wrap .form { gap: 1.1rem; }
.login-form-wrap .btn-lg { margin-top: .4rem; }
.login-help { margin-top: 1.5rem; font-size: .82rem; color: var(--muted); display: flex; gap: .45rem; align-items: flex-start; }
.login-mobile-brand { display: none; align-items: center; gap: .7rem; margin-bottom: 1.6rem; font: 800 1.1rem var(--font-head); }
.login-footer { text-align: center; font-size: .78rem; color: var(--muted); }

/* Xəta səhifəsi */
.error-body { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--bg); }
.error-card { position: relative; text-align: center; max-width: 420px; padding: 2.5rem 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.error-code { position: absolute; inset: auto 0 -2.2rem; font: 800 9rem/1 var(--font-head); color: var(--surface-3); z-index: 0; }
.error-card > *:not(.error-code) { position: relative; z-index: 1; }
.error-icon { display: inline-flex; width: 60px; height: 60px; border-radius: 18px; align-items: center; justify-content: center; background: var(--danger-soft); color: var(--danger); margin-bottom: 1rem; }
.error-card h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.error-card p { color: var(--muted); margin-bottom: 1.5rem; }

/* =====================================================================
   RESPONSİV
   ===================================================================== */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar-close { display: inline-flex; }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(5, 7, 34, .55); backdrop-filter: blur(2px);
  }
  body.sidebar-open { overflow: hidden; }
  .app-main { margin-left: 0; }
  .menu-btn { display: inline-flex; }

  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-mobile-brand { display: flex; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 1rem; gap: .6rem; }
  .content { padding: 1rem; }
  .app-footer { padding: 1rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats, .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .stats-3 > :last-child { grid-column: 1 / -1; }
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.55rem; }
  .welcome { padding: 1.3rem; }
  .welcome h2 { font-size: 1.35rem; }
  .card { padding: 1.1rem; }
  .user-chip-name, .lang-btn span, .topbar-date { display: none; }
  .dropdown-wide { width: min(330px, calc(100vw - 2rem)); right: -60px; }
  .lesson .btn { display: none; }
  .login-panel { padding: 1.25rem; }
  .login-form-wrap h1 { font-size: 1.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .jm-cell { opacity: 1; transform: none; }
}

/* ---------- İdrak Liseyi brend əlavələri ---------- */
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark-lg { padding: 5px; }
.brand-mark-xl { width: 88px; height: 88px; border-radius: 24px; padding: 8px; }
.brand-text strong { letter-spacing: -.01em; }
.brand-text small { color: var(--gold); opacity: .85; }
.welcome .eyebrow { color: var(--gold-2); opacity: 1; }
.welcome { border-bottom: 3px solid var(--gold); }
.btn-primary { box-shadow: 0 4px 14px rgba(14, 21, 89, .25); }
[data-theme="dark"] .btn-primary { box-shadow: 0 4px 14px rgba(250, 180, 22, .25); }
.checklist li.is-done .check-bullet { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.ring { background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--surface-3) 0); }
.nav-soon { background: rgba(255, 255, 255, .08); color: var(--side-muted); }
.login-visual .brand-row small { color: var(--gold); }
.login-copy h2 span { color: var(--gold); }
.journal-mock { border-top: 4px solid var(--gold); }
.login-visual::after {
  content: ''; position: absolute; right: -120px; bottom: -120px;
  width: 420px; height: 420px; opacity: .06;
  background: url('../img/logo.png') center / contain no-repeat;
  filter: grayscale(1) brightness(3);
  pointer-events: none;
}
.login-mobile-brand .brand-mark { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.seg-lang a.is-active { color: var(--navy); }
[data-theme="dark"] .seg-lang a.is-active { color: var(--gold); }

/* =====================================================================
   2-Cİ MƏRHƏLƏ — ADMİN İDARƏETMƏSİ
   ===================================================================== */

/* Səhifə başlığı */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h2 { font-size: 1.5rem; font-weight: 800; }
.page-head p { margin-top: .2rem; font-size: .9rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline-flex; gap: .4rem; margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; margin: 1.25rem 0; }
.nowrap { white-space: nowrap; }
.text-warn { color: var(--warn); font-style: normal; }
.no-print { }

/* Select + kiçik inputlar */
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c7294' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
  cursor: pointer;
}
input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=search] { width: 100%; height: 46px; padding: 0 .8rem; font: 500 .95rem var(--font); color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); outline: none; }
input[type=color] { width: 100%; height: 46px; padding: 4px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.select-sm, .input-sm { height: 38px !important; font-size: .88rem !important; border-radius: 9px !important; }
.select-sm { min-width: 170px; }
select.is-empty { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); color: var(--warn); }
.input-num { width: 64px !important; height: 38px !important; text-align: center; padding: 0 .3rem !important; }

/* Tablar */
.tabs { display: flex; gap: .25rem; overflow-x: auto; margin-bottom: 1rem; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.tab b { font-size: .72rem; padding: .1rem .45rem; border-radius: 6px; background: var(--surface-3); color: var(--muted); }
.tab:hover { background: var(--surface-2); }
.tab.is-active { background: var(--navy); color: #fff; }
.tab.is-active b { background: var(--gold); color: var(--navy); }
[data-theme="dark"] .tab.is-active { background: var(--gold); color: var(--navy); }
[data-theme="dark"] .tab.is-active b { background: var(--navy); color: var(--gold); }

/* Alət paneli */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar select { width: auto; min-width: 160px; }
.toolbar-search { flex: 1; min-width: 220px; }

/* Cədvəllər */
.card-flush { padding: 0; overflow: hidden; }
.card-head-pad { padding: 1.1rem 1.35rem 0; }
.card-foot { display: flex; justify-content: flex-end; padding: 1rem 1.35rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.table-scroll { max-height: 60vh; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); padding: .75rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.table-compact td { padding: .5rem 1rem; }
.table tr.is-muted td { opacity: .55; }
.table tr.is-warn td { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.table tr.is-error td { background: color-mix(in srgb, var(--danger-soft) 70%, transparent); }
.table tr.is-editing td { background: var(--surface-2); padding: 1rem; }
.th-num { width: 70px; text-align: center !important; }
.th-actions, .td-actions { width: 1%; white-space: nowrap; text-align: right; }
.td-actions > * { display: inline-flex; vertical-align: middle; margin-left: .25rem; }
code { font: 600 .82rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: .15rem .4rem; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.user-cell { display: flex; align-items: center; gap: .65rem; color: inherit; min-width: 0; }
.user-cell > span:last-child { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-cell strong { font-weight: 600; }
.user-cell small { color: var(--muted); }
a.user-cell:hover strong { color: var(--primary); }
.num-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); font: 700 .8rem var(--font-head); }
.chip-sm { height: 24px; padding: 0 .55rem; font-size: .72rem; }
.chip-gold { background: var(--gold); color: var(--navy); border-color: transparent; }
.status-dot { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.status-dot.is-on { color: var(--success); }
.status-dot.is-on::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.icon-btn-sm { min-width: 32px; height: 32px; padding: 0 .4rem; border-radius: 8px; }
.icon-btn-sm .icon { width: 16px; height: 16px; }
.icon-btn.is-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
button.dropdown-item { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.td-actions .dropdown-menu { min-width: 200px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.2rem; border-top: 1px solid var(--border); }
.pages { display: flex; gap: .3rem; }
.page { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font-weight: 600; font-size: .85rem; color: var(--text-2); border: 1px solid var(--border); }
.page:hover { background: var(--surface-2); }
.page.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
[data-theme="dark"] .page.is-active { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.page-gap { padding: 0 .3rem; color: var(--muted); align-self: center; }

/* Forma tərtibatı */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.card-danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.card-danger .card-head h3 .icon { color: var(--danger); }

.role-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.role-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .9rem .5rem; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: .88rem; transition: border-color .2s, background .2s; }
.role-option input { position: absolute; opacity: 0; }
.role-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }

.switch { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; font-weight: 500; font-size: .92rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; width: 42px; height: 24px; border-radius: 12px; background: var(--border-strong); transition: background .2s; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + .switch-track { background: var(--success); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 4px var(--primary-soft); }
.switch-field { align-self: end; height: 46px; }

.pick-list { display: flex; flex-direction: column; gap: .6rem; }
.pick-items { max-height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); padding: .3rem; }
.pick-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 9px; cursor: pointer; font-size: .9rem; }
.pick-item:hover { background: var(--surface); }
.pick-item:has(input:checked) { background: var(--primary-soft); }
.pick-item input { width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; }
.pick-item > span:nth-of-type(2) { flex: 1; }
.pick-item[hidden] { display: none; }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-go { margin-left: auto; background: var(--accent-soft); color: var(--warn); text-transform: none; letter-spacing: 0; font-size: .75rem; }
.color-dot { --c: var(--primary); width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex-shrink: 0; }

.linked-list { display: flex; flex-direction: column; gap: .4rem; }
.linked-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: .9rem; }
.linked-item:hover { background: var(--primary-soft); }

.hint-list { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .85rem; display: flex; flex-direction: column; gap: .35rem; }

/* Fayl yükləmə */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2rem 1rem; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.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: 34px; height: 34px; color: var(--primary); }
.dropzone.has-file { border-style: solid; border-color: var(--success); background: var(--success-soft); }

/* Giriş kartları (çap) */
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.cred-card { background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: 16px; padding: 1.1rem 1.2rem; break-inside: avoid; }
.cred-card header { display: flex; align-items: center; gap: .6rem; padding-bottom: .7rem; margin-bottom: .8rem; border-bottom: 2px solid var(--gold); }
.cred-card header img { width: 36px; height: 36px; }
.cred-card header div { display: flex; flex-direction: column; line-height: 1.2; }
.cred-card header strong { font: 800 .95rem var(--font-head); color: var(--navy); }
[data-theme="dark"] .cred-card header strong { color: var(--text); }
.cred-card header small { color: var(--muted); font-size: .72rem; }
.cred-card h3 { font-size: 1.05rem; }
.cred-card dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem .8rem; margin: .8rem 0; align-items: center; }
.cred-card dt { font-size: .78rem; color: var(--muted); }
.cred-card dd { margin: 0; }
.cred-card dd code { font-size: .95rem; padding: .25rem .55rem; }
.cred-card footer { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; }

@media print {
  body { background: #fff !important; }
  .sidebar, .sidebar-backdrop, .topbar, .app-footer, .page-actions, .no-print, .alert { display: none !important; }
  .app-main { margin: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  .page-head p { display: none; }
  .cred-grid { grid-template-columns: repeat(2, 1fr); gap: 8mm; }
  .cred-card { border-color: #999; box-shadow: none; }
  [data-theme="dark"] .cred-card, .cred-card { background: #fff; color: #000; }
  code { background: #f1f1f1; color: #000; }
}

/* Siniflər */
.grid-main-rev { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.class-grade { margin-bottom: 1.4rem; display: block; }
.grade-title { display: flex; align-items: center; gap: .6rem; font-size: 1rem; margin-bottom: .7rem; }
.grade-title span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--gold); color: var(--navy); font-weight: 800; }
.grade-title small { font-weight: 500; font-family: var(--font); font-size: .8rem; }
.class-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.class-card { display: flex; gap: .85rem; align-items: center; padding: .9rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.class-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.class-card-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.class-card-body strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.class-meta { display: flex; gap: .8rem; margin-top: .35rem; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.class-badge-lg { min-width: 72px; height: 72px; border-radius: 20px; font-size: 1.5rem; }
.class-hero { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.class-hero-body { flex: 1; min-width: 220px; }
.class-hero-body h2 { font-size: 1.4rem; margin-bottom: .5rem; }

/* Tədris ili */
.year-card.is-current { border-color: var(--gold); box-shadow: 0 0 0 3px var(--accent-soft); }
.term-list { display: flex; flex-direction: column; gap: .5rem; }
.term-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(130px, 1fr) auto minmax(130px, 1fr) auto auto; gap: .5rem; align-items: center; padding: .4rem; border-radius: 12px; background: var(--surface-2); }
.term-row.is-now { background: var(--accent-soft); }
.term-row-new { background: transparent; border: 1.5px dashed var(--border); grid-template-columns: minmax(110px, 1.2fr) minmax(130px, 1fr) auto minmax(130px, 1fr) auto; }
.term-row input { height: 36px !important; }

/* Dərs cədvəli */
.class-switch { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.class-chip { padding: .45rem .8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 700 .85rem var(--font-head); }
.class-chip:hover { border-color: var(--primary); }
.class-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme="dark"] .class-chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.tt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.tt-scroll { overflow-x: auto; }
.tt-grid { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
.tt-grid th { padding: .7rem .5rem; font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); text-align: center; }
.tt-grid td { padding: .35rem; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.tt-grid tr:last-child td, .tt-grid tr:last-child th { border-bottom: 0; }
.tt-corner { font: 800 1.05rem var(--font-head) !important; color: var(--text) !important; }
.tt-time { width: 78px; border-right: 1px solid var(--border); }
.tt-time b { display: block; font: 800 1.05rem var(--font-head); color: var(--text); }
.tt-time small { font-size: .68rem; line-height: 1.25; display: block; }
.tt-select {
  --c: transparent;
  width: 100%; height: 44px !important; font-size: .82rem !important; font-weight: 600 !important;
  padding: 0 1.6rem 0 .6rem !important; border-radius: 10px !important;
  background-color: color-mix(in srgb, var(--c) 13%, var(--surface)) !important;
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, var(--border)) !important;
  border-left: 4px solid var(--c) !important;
  background-position: right .4rem center !important; background-size: 13px !important;
}
.tt-select:focus { box-shadow: 0 0 0 3px var(--primary-soft); }
.plan-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.plan-list li { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; background: var(--surface-2); font-size: .86rem; }
.plan-name { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.plan-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-count { font: 700 .82rem var(--font-head); color: var(--muted); padding: .2rem .5rem; border-radius: 7px; background: var(--surface); white-space: nowrap; }
.plan-list li.is-ok .plan-count { background: var(--success-soft); color: var(--success); }
.plan-list li.is-over .plan-count { background: var(--danger-soft); color: var(--danger); }

/* Tənzimləmələr */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.choice-card { position: relative; display: flex; padding: 1rem; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.choice-body { display: flex; flex-direction: column; gap: .2rem; }
.bell-list { display: flex; flex-direction: column; gap: .45rem; }
.bell-row { display: grid; grid-template-columns: 40px 1fr auto 1fr; gap: .5rem; align-items: center; }
.bell-row[hidden] { display: none; }
.bell-row .lesson-no { --c: var(--primary); width: 34px; height: 34px; font-size: .85rem; }

/* Dashboard checklist linkləri */
.checklist li { padding: 0; }
.checklist li a { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; color: inherit; border-radius: 12px; }
.checklist li:not(.is-done) a:hover { background: var(--surface-3); }

/* Responsiv */
@media (max-width: 1180px) {
  .tt-layout { grid-template-columns: 1fr; }
  .form-layout, .grid-main-rev { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .form-grid, .form-grid-3, .choice-cards { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .role-picker { grid-template-columns: repeat(2, 1fr); }
  .page-head h2 { font-size: 1.25rem; }
  .term-row, .term-row-new { grid-template-columns: 1fr 1fr; }
  .term-row > span.muted { display: none; }
  .toolbar select { flex: 1; }
}
@media (max-width: 960px) { .hide-md { display: none; } }

/* =====================================================================
   3-CÜ MƏRHƏLƏ — ELEKTRON JURNAL
   ===================================================================== */
.text-ok { color: var(--success); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 700; }
.g5-text { color: var(--g5); } .g4-text { color: var(--g4); } .g3-text { color: var(--g3); } .g2-text { color: var(--g2); }
.select-xs { min-width: 0 !important; width: auto; }
.field-inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
.field-inline input { max-width: 200px; }
textarea { width: 100%; padding: .7rem .9rem; font: 500 .95rem/1.5 var(--font); color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); outline: none; resize: vertical; }
input.is-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-soft) !important; }

/* Dərs başlığı */
.lesson-hero { --c: var(--primary); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; border-left: 5px solid var(--c); }
.lesson-hero-main { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.lesson-hero h2 { font-size: 1.35rem; }
.lesson-pick { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.lesson-pick input[type=date] { width: auto; }
.lesson-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.lesson-fieldset:disabled { opacity: .75; }

.seg-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: .8rem; }
.seg-types a { text-align: center; padding: .55rem .3rem; border-radius: 9px; font-weight: 700; font-size: .82rem; color: var(--text-2); }
.seg-types a:hover { background: var(--surface); }
.seg-types a.is-active { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .seg-types a.is-active { background: var(--gold); color: var(--navy); }

.att-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; margin-top: .9rem; }
.att-pill { display: flex; align-items: center; gap: .45rem; padding: .5rem .7rem; border-radius: 10px; font-size: .82rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.att-pill b { font: 800 1.1rem var(--font-head); }
.att-pill.is-present b { color: var(--success); }
.att-pill.is-absent b { color: var(--danger); }
.att-pill.is-late b { color: var(--warn); }
.att-pill.is-excused b { color: var(--info); }

/* Şagird siyahısı (dərs) */
.roster { list-style: none; margin: 0; padding: .6rem; display: flex; flex-direction: column; gap: .35rem; }
.roster-row { display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(250px, auto); gap: .9rem; align-items: center; padding: .55rem .7rem; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: background .2s, border-color .2s; }
.roster-row.att-absent { background: color-mix(in srgb, var(--danger-soft) 70%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.roster-row.att-late { background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); }
.roster-row.att-excused { background: color-mix(in srgb, var(--info-soft) 60%, var(--surface)); }
.roster-who { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.roster-who strong { font-size: .95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-who strong span { font-weight: 500; color: var(--text-2); }

.att-group, .grade-group { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); }
.att-opt, .grade-opt { position: relative; cursor: pointer; }
.att-opt input, .grade-opt input { position: absolute; opacity: 0; pointer-events: none; }
.att-opt span, .grade-opt span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 36px; padding: 0 .45rem; border-radius: 8px; font: 700 .82rem var(--font-head); color: var(--muted); transition: background .15s, color .15s, transform .1s; user-select: none; }
.att-opt:hover span, .grade-opt:hover span { background: var(--surface-2); }
.att-opt:active span, .grade-opt:active span { transform: scale(.94); }
.att-opt-present input:checked + span { background: var(--success); color: #fff; }
.att-opt-absent input:checked + span { background: var(--danger); color: #fff; }
.att-opt-late input:checked + span { background: var(--warn); color: #fff; }
.att-opt-excused input:checked + span { background: var(--info); color: #fff; }
.att-opt input:focus-visible + span, .grade-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-soft); }

.grade-input { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; }
.grade-opt span { min-width: 36px; font-size: .95rem; }
.grade-opt.g-none span { color: var(--border-strong); }
.grade-opt.g5 input:checked + span { background: var(--g5); color: #fff; }
.grade-opt.g4 input:checked + span { background: var(--g4); color: #fff; }
.grade-opt.g3 input:checked + span { background: var(--g3); color: #fff; }
.grade-opt.g2 input:checked + span { background: var(--g2); color: #fff; }
.grade-opt.g-none input:checked + span { background: var(--surface-3); color: var(--muted); }
.grade-opt.g5, .grade-opt.g4, .grade-opt.g3, .grade-opt.g2 { background: none; }
.pct-input { position: relative; display: inline-flex; align-items: center; }
.pct-input input { width: 96px; height: 40px; text-align: center; font: 800 1rem var(--font-head); padding-right: 1.6rem; }
.pct-input em { position: absolute; right: .7rem; font-style: normal; color: var(--muted); font-weight: 700; }
.comment-box { position: relative; }
.comment-box summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); border: 1px solid var(--border); background: var(--surface); }
.comment-box summary::-webkit-details-marker { display: none; }
.comment-box[open] summary { color: var(--primary); border-color: var(--primary); }
.comment-box input { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 240px; box-shadow: var(--shadow-lg); }

.save-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: .8rem 1rem; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.save-bar-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.save-bar .btn { min-width: 170px; }
.danger-link { display: flex; justify-content: flex-end; margin-top: 1rem; }
.is-danger-text { color: var(--danger); }

/* Jurnal seçimi */
.journal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.journal-card { --c: var(--primary); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1rem .9rem 1.15rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.journal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.journal-card-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.journal-card strong { font-size: 1rem; }
.journal-card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; font-size: .8rem; font-weight: 600; color: var(--text-2); }

/* Jurnal cədvəli */
.journal-card-wrap { margin-bottom: .8rem; }
.journal-scroll { overflow: auto; max-height: 72vh; }
.journal { border-collapse: separate; border-spacing: 0; font-size: .85rem; min-width: 100%; }
.journal th, .journal td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; padding: 0; }
.journal thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); padding: .45rem .3rem; font-weight: 600; color: var(--muted); }
.j-sticky { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left !important; }
.journal thead .j-sticky { z-index: 4; background: var(--surface-2); }
.j-name { min-width: 190px; max-width: 220px; padding: .45rem .7rem !important; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 1px 0 0 var(--border); }
.j-no { display: inline-block; width: 24px; color: var(--muted); font-weight: 500; font-size: .78rem; }
.j-day { min-width: 42px; }
.j-day a, .j-day > b { color: inherit; display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: .1rem; border-radius: 6px; }
.j-day a:hover { background: var(--primary-soft); color: var(--primary); }
.j-day b { font: 800 .9rem var(--font-head); color: var(--text); }
.j-day small { font-size: .65rem; }
.j-day em { font-style: normal; font-size: .58rem; font-weight: 800; color: var(--navy); background: var(--gold); border-radius: 4px; padding: 0 .25rem; margin-top: 2px; }
.j-sum { background: var(--accent-soft) !important; }
.j-cell { height: 40px; min-width: 42px; }
.j-cell.j-absent { background: color-mix(in srgb, var(--danger-soft) 60%, transparent); }
.j-cell.j-late { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.j-cell.j-excused { background: color-mix(in srgb, var(--info-soft) 50%, transparent); }
.j-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 26px; padding: 0 .25rem; border-radius: 7px; font: 800 .85rem var(--font-head); }
.j-att { font-size: .72rem; font-weight: 800; font-style: normal; color: var(--danger); }
.j-cell.j-late .j-att, i.j-late { color: var(--warn); }
.j-cell.j-excused .j-att, i.j-excused { color: var(--info); }
.j-stat { min-width: 58px; padding: .3rem .4rem !important; background: var(--surface-2); font-weight: 600; }
.journal tbody .j-stat { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.j-final { min-width: 82px; }
.j-final small { display: block; font-size: .68rem; color: var(--muted); }
.journal tbody tr:hover td, .journal tbody tr:hover th { background-color: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.j-empty-col { min-width: 220px; color: var(--muted); font-style: italic; }
.journal-legend { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: .8rem; color: var(--text-2); margin: 0 0 1.25rem; }
.journal-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.journal-legend i { font-style: normal; }

.topic-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.topic-list li { display: flex; gap: .9rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px dashed var(--border); }
.topic-list li:last-child { border-bottom: 0; }
.topic-list li > div { flex: 1; min-width: 0; }
.topic-date { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: .3rem; border-radius: 10px; background: var(--surface-2); line-height: 1.2; }
.topic-date b { font: 800 .9rem var(--font-head); }
.topic-date small { font-size: .65rem; color: var(--muted); }

/* Ev tapşırıqları */
.hw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.hw-card { --c: var(--primary); display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.hw-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hw-card-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.hw-card p { font-size: .92rem; }
.due-badge { margin-left: auto; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.due-badge.is-soon { background: var(--accent-soft); color: var(--warn); }

/* Müəllimin cədvəli */
.tt-view th.is-today, .tt-view td.is-today { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.tt-view thead th small { display: block; font-weight: 500; font-size: .7rem; }
.tt-view td { height: 62px; }
.tt-lesson { --c: var(--primary); position: relative; display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 54px; padding: .35rem .55rem; border-radius: 10px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); border-left: 4px solid var(--c); color: var(--text); text-align: left; line-height: 1.2; }
a.tt-lesson:hover { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.tt-lesson strong { font: 800 .95rem var(--font-head); }
.tt-lesson span { font-size: .75rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-lesson i { position: absolute; top: 5px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--success); color: #fff; display: flex; align-items: center; justify-content: center; }
.tt-lesson i .icon { width: 11px; height: 11px; }

@media (max-width: 900px) {
  .roster-row { grid-template-columns: 1fr; gap: .5rem; }
  .att-group { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .att-opt span { width: 100%; height: 40px; }
  .grade-input { justify-content: space-between; }
  .grade-group { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); }
  .grade-opt span { width: 100%; height: 40px; }
  .comment-box input { width: 200px; }
}
@media (max-width: 720px) {
  .lesson-hero { flex-direction: column; align-items: stretch; }
  .lesson-pick { width: 100%; }
  .lesson-pick input[type=date] { flex: 1; }
  .save-bar { margin-left: -.25rem; margin-right: -.25rem; border-radius: 14px; }
  .save-bar .btn { min-width: 0; flex-shrink: 0; }
  .save-bar-info small { display: none; }
  .field-inline { flex-direction: column; align-items: stretch; }
  .field-inline input { max-width: none; }
}
@media print {
  .journal-scroll { max-height: none; overflow: visible; }
  .journal { font-size: 9pt; }
  .j-sticky { position: static; }
  .journal thead th { position: static; }
  .lesson-hero { border: 0; box-shadow: none; padding: 0 0 6mm; }
  .tabs, .no-print, .topic-list .icon-btn { display: none !important; }
}
/* Şərh sahəsi sətrin içində */
.comment-box { display: inline-flex; align-items: center; gap: .4rem; }
.comment-box input { position: static; width: 170px; box-shadow: none; }
@media (max-width: 900px) {
  .grade-input { flex-wrap: wrap; }
  .comment-box[open] { flex: 1 0 100%; }
  .comment-box[open] input { flex: 1; width: auto; }
}
@media (max-width: 720px) {
  .seg-types a { font-size: .74rem; padding: .5rem .15rem; line-height: 1.2; }
}

/* =====================================================================
   4-CÜ MƏRHƏLƏ — ŞAGİRD VƏ VALİDEYN KABİNETLƏRİ
   ===================================================================== */
.card-link { font-size: .82rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.card-link:hover { text-decoration: underline; }
.dropdown-foot { display: block; margin-top: .3rem; padding: .6rem .7rem; border-top: 1px solid var(--border); text-align: center; font-size: .85rem; font-weight: 700; color: var(--primary); }
.icon-flip .icon { transform: scaleX(-1); }
.stat-value-sm { font-size: 1.15rem !important; line-height: 1.3; padding-top: .4rem; }

/* Övlad seçimi */
.child-switch { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.child-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem .35rem .35rem; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: .9rem; }
.child-chip:hover { border-color: var(--primary); }
.child-chip.is-active { border-color: var(--gold); background: var(--accent-soft); color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Sürətli keçidlər */
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.quick-links a { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-weight: 600; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.quick-links a:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.quick-links a .icon { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--surface); color: var(--primary); }
.quick-links-row { grid-template-columns: repeat(4, 1fr); margin-bottom: 1rem; }
.quick-links-row a { background: var(--surface); }

/* Qiymətlər — fənn sətirləri */
.subject-rows { display: flex; flex-direction: column; }
.subject-row { display: grid; grid-template-columns: minmax(170px, 1.3fr) minmax(0, 2fr) 104px 64px 64px 64px 70px; gap: .8rem; align-items: center; padding: .75rem 1.2rem; }
.subject-row-head { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.subject-detail { border-bottom: 1px solid var(--border); }
.subject-detail:last-child { border-bottom: 0; }
.subject-detail > summary { list-style: none; cursor: pointer; transition: background .15s; }
.subject-detail > summary::-webkit-details-marker { display: none; }
.subject-detail > summary:hover { background: var(--surface-2); }
.subject-detail[open] > summary { background: color-mix(in srgb, var(--c) 7%, var(--surface)); box-shadow: inset 4px 0 0 var(--c); }
.subject-cell { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.subject-cell > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.subject-cell strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subject-cell small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 .3rem; border-radius: 7px; font: 800 .8rem var(--font-head); }
.mini-grade.is-sum { outline: 2px solid var(--gold); outline-offset: -2px; }
.spark { display: block; }
.subject-body { padding: .3rem 1.2rem 1.2rem 2.6rem; }
.subject-facts { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; font-weight: 600; color: var(--text-2); margin-bottom: .8rem; }
.grade-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; border-left: 2px solid var(--border); padding-left: 1rem; }
.grade-timeline li { display: flex; gap: .75rem; align-items: flex-start; position: relative; }
.grade-timeline li::before { content: ''; position: absolute; left: calc(-1rem - 6px); top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--c, var(--primary)); }
.grade-timeline li > div { display: flex; flex-direction: column; line-height: 1.35; }
.grade-comment { font-size: .85rem; font-style: italic; color: var(--text-2); margin-top: .2rem; }
.grade-pill small { font-size: .65em; margin-left: 1px; }

/* Davamiyyət təqvimi */
.month-nav { display: flex; align-items: center; gap: .35rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: .2rem; }
.cal-day { position: relative; aspect-ratio: 1 / 1; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; }
.cal-day b { font: 700 .95rem var(--font-head); }
.cal-day small { font-size: .62rem; color: var(--muted); }
.cal-day.is-pad { background: transparent; border-color: transparent; }
.cal-day.is-weekend { opacity: .55; }
.cal-day.is-today { box-shadow: 0 0 0 2px var(--gold); }
.cal-day.is-present { background: var(--success-soft); border-color: transparent; }
.cal-day.is-late { background: var(--warn-soft); border-color: transparent; }
.cal-day.is-excused { background: var(--info-soft); border-color: transparent; }
.cal-day.is-absent { background: var(--danger); border-color: transparent; color: #fff; }
.cal-day.is-absent small { color: rgba(255,255,255,.8); }
.cal-legend { margin: 1rem 0 0; }
.cal-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.cal-dot.is-present { background: var(--success-soft); border: 1px solid var(--success); }
.cal-dot.is-late { background: var(--warn-soft); border: 1px solid var(--warn); }
.cal-dot.is-excused { background: var(--info-soft); border: 1px solid var(--info); }
.cal-dot.is-absent { background: var(--danger); }

.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.event-list li { display: flex; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: 12px; background: var(--surface-2); }
.event-list li > div { display: flex; flex-direction: column; line-height: 1.3; }
.event-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 30px; border-radius: 8px; font: 800 .75rem var(--font-head); color: #fff; background: var(--danger); }
.event-list .is-late .event-badge { background: var(--warn); }
.event-list .is-excused .event-badge { background: var(--info); }

.bar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.bar-list li { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; gap: .7rem; align-items: center; font-size: .86rem; }
.bar-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--primary)); transition: width .8s var(--ease); }
.bar-val { font: 800 .9rem var(--font-head); min-width: 40px; text-align: right; }

/* Ev tapşırıqları (şagird) */
.hw-group { margin-bottom: 1.4rem; }
.hw-group-title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin: 0 0 .7rem; }
.hw-group-title span { font-size: .72rem; padding: .1rem .5rem; border-radius: 6px; background: var(--surface-3); color: var(--muted); }
.hw-group-title.is-urgent { color: var(--warn); }
.hw-group-title.is-urgent span { background: var(--accent-soft); color: var(--warn); }
.hw-card small { display: flex; align-items: center; gap: .3rem; }
.hw-done { margin-left: auto; cursor: pointer; }
.hw-done input { position: absolute; opacity: 0; }
.hw-done span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-strong); color: transparent; transition: all .2s; }
.hw-done input:checked + span { background: var(--success); border-color: var(--success); color: #fff; }
.hw-card.is-done { opacity: .6; }
.hw-card.is-done p { text-decoration: line-through; }

/* Sinif cədvəli */
.tt-subj { font: 700 .85rem var(--font) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-lesson.is-now { box-shadow: 0 0 0 2px var(--c); animation: pulse 2s infinite; }
.tt-mobile { display: none; }
.day-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: .35rem; margin-bottom: .8rem; }
.day-tab { display: flex; flex-direction: column; align-items: center; padding: .5rem .2rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font: inherit; }
.day-tab b { font: 800 .85rem var(--font-head); }
.day-tab small { font-size: .7rem; color: var(--muted); }
.day-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.day-tab.is-active small { color: rgba(255,255,255,.7); }
[data-theme="dark"] .day-tab.is-active { background: var(--gold); border-color: var(--gold); color: var(--navy); }
[data-theme="dark"] .day-tab.is-active small { color: var(--navy); }

/* Bildirişlər səhifəsi */
.notif-list { margin-bottom: 1rem; }
.notif-row { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-row:last-child { border-bottom: 0; }
.notif-row:hover { background: var(--surface-2); }
.notif-row.is-unread { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.notif-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.type-grade .notif-icon { background: var(--success-soft); color: var(--success); }
.type-absence .notif-icon { background: var(--danger-soft); color: var(--danger); }
.notif-body { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.notif-body small { color: var(--muted); }

@media (max-width: 960px) {
  .subject-row { grid-template-columns: minmax(130px, 1.2fr) minmax(0, 2fr) 54px 64px; }
  .subject-row > .hide-sm { display: none; }
}
@media (max-width: 720px) {
  .tt-desktop { display: none; }
  .tt-mobile { display: block; }
  .quick-links-row { grid-template-columns: repeat(2, 1fr); }
  .subject-row { grid-template-columns: 1fr auto auto; gap: .5rem; padding: .7rem .9rem; }
  .subject-row > .chip-row { grid-column: 1 / -1; order: 5; }
  .subject-row-head { display: none; }
  .subject-body { padding: .3rem .9rem 1rem 1.6rem; }
  .bar-list li { grid-template-columns: 1fr auto; }
  .bar-list .bar-track { grid-column: 1 / -1; order: 3; }
  .cal { gap: 4px; }
  .cal-day { border-radius: 9px; min-height: 38px; }
}
@media print {
  .subject-detail > summary { break-inside: avoid; }
  .child-switch { display: none; }
}

/* =====================================================================
   5-Cİ MƏRHƏLƏ — HESABATLAR
   ===================================================================== */
.tabs-spacer { flex: 1; }
.report-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.report-tile { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.report-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); }
.report-tile > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.report-tile small { color: var(--muted); font-size: .8rem; }
.report-tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--navy); color: var(--gold); flex-shrink: 0; }
[data-theme="dark"] .report-tile-icon { background: var(--gold); color: var(--navy); }

.class-badge-sm { min-width: 40px; height: 40px; border-radius: 11px; font-size: .9rem; }
.pct-pill { display: inline-block; padding: .15rem .5rem; border-radius: 7px; font-weight: 700; font-size: .85rem; background: var(--success-soft); color: var(--success); }
.pct-pill.is-low { background: var(--danger-soft); color: var(--danger); }

.week-chart { display: grid; grid-template-columns: repeat(8, 1fr); gap: .45rem; height: 170px; align-items: end; }
.week-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .25rem; }
.week-val { font: 700 .72rem var(--font-head); color: var(--text-2); }
.week-bar { width: 100%; max-width: 34px; min-height: 2px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, transparent)); transition: height .8s var(--ease); }
.week-bar.is-low { background: linear-gradient(180deg, var(--danger), color-mix(in srgb, var(--danger) 45%, transparent)); }
.week-col small { font-size: .66rem; color: var(--muted); }

.fill-bar { position: relative; display: block; min-width: 120px; height: 24px; border-radius: 7px; background: var(--surface-3); overflow: hidden; }
.fill-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: var(--warn); }
.fill-bar.is-ok i { background: var(--success); }
.fill-bar.is-low i { background: var(--danger); }
.fill-bar b { position: relative; z-index: 1; display: block; padding: 0 .5rem; line-height: 24px; font: 700 .78rem var(--font-head); color: var(--text); }

/* Sinif hesabatı matrisi */
.report-matrix .rm-subj { min-width: 44px; height: 120px; vertical-align: bottom; padding: .4rem .2rem !important; border-top: 3px solid var(--c); }
.report-matrix .rm-subj span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .76rem; font-weight: 700; color: var(--text-2); white-space: nowrap; max-height: 110px; overflow: hidden; text-overflow: ellipsis; }
.report-matrix .j-name a { color: inherit; }
.report-matrix .j-name a:hover { color: var(--primary); text-decoration: underline; }
.report-matrix tr.has-twos .j-name { box-shadow: inset 3px 0 0 var(--danger), 1px 0 0 var(--border); }
.report-matrix tfoot th, .report-matrix tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); border-top: 2px solid var(--border-strong); font-weight: 700; }
.report-matrix tfoot .j-sticky { z-index: 4; }
.j-grade.is-est { opacity: .75; border: 1.5px dashed currentColor; }

.card-list { list-style: none; margin: 0; padding: 0; }
.card-list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); }
.card-list li:last-child { border-bottom: 0; }
.card-list-name { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }

/* Tabel (çap) */
.rc-body { background: #e9ebf3; color: #11163d; margin: 0; }
.rc-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.2rem; background: #0e1559; color: #fff; font-weight: 600; }
.rc-page { width: 210mm; min-height: 297mm; margin: 12px auto; padding: 14mm 14mm 12mm; background: #fff; box-shadow: 0 6px 30px rgba(14, 21, 89, .15); display: flex; flex-direction: column; gap: 6mm; page-break-after: always; break-after: page; }
.rc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 5mm; border-bottom: 3px solid #fab416; }
.rc-head img { width: 58px; height: 58px; }
.rc-head > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.3; }
.rc-head strong { font: 800 1.15rem 'Montserrat', sans-serif; color: #0e1559; }
.rc-head small { color: #6c7294; font-size: .78rem; }
.rc-title { margin-left: auto; text-align: right; }
.rc-title h1 { font: 800 1.25rem 'Montserrat', sans-serif; color: #0e1559; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.rc-title span { font-size: .85rem; color: #6c7294; }
.rc-info { display: grid; grid-template-columns: 1.6fr .6fr 1.2fr .8fr; gap: 3mm; margin: 0; }
.rc-info div { padding: 2.5mm 3mm; border-radius: 6px; background: #f4f5fa; }
.rc-info dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: #6c7294; }
.rc-info dd { margin: 0; font-weight: 700; font-size: .95rem; }
.rc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rc-table th, .rc-table td { border: 1px solid #ccd1e3; padding: 2mm 2.5mm; text-align: left; }
.rc-table thead th { background: #0e1559; color: #fff; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-color: #0e1559; }
.rc-table tbody tr:nth-child(even) td { background: #f8f9fc; }
.rc-table tfoot td { font-weight: 800; background: #fff4d6; }
.rc-c { text-align: center !important; width: 22mm; }
.rc-c small { display: block; font-size: .65rem; color: #6c7294; }
.rc-c b { font: 800 1.05rem 'Montserrat', sans-serif; }
.rc-n { width: 9mm; text-align: center !important; color: #6c7294; }
.rc-year { background: #fffaf0; }
.rc-table thead .rc-year { background: #fab416; color: #0e1559; }
.rc-att { width: 70%; }
.rc-note { font-size: .72rem; color: #6c7294; margin: 0; }
.rc-sign { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10mm; padding-top: 8mm; }
.rc-sign div { display: flex; flex-direction: column; gap: 2mm; }
.rc-sign span { border-bottom: 1px solid #11163d; height: 10mm; }
.rc-sign small { font-size: .75rem; color: #3a4066; }
.rc-body .g5-text { color: #16a34a; } .rc-body .g4-text { color: #2563eb; } .rc-body .g3-text { color: #d97706; } .rc-body .g2-text { color: #dc2626; }

@media (max-width: 820px) {
  .rc-page { width: auto; min-height: 0; margin: 8px; padding: 16px; }
  .rc-info { grid-template-columns: 1fr 1fr; }
  .rc-head { flex-wrap: wrap; }
  .rc-title { margin-left: 0; text-align: left; width: 100%; }
  .rc-att { width: 100%; }
}
@media print {
  .rc-body { background: #fff; }
  .rc-page { margin: 0; box-shadow: none; width: auto; min-height: 0; height: 273mm; padding: 0; }
  .rc-page:last-child { page-break-after: auto; break-after: auto; }
  .rc-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rc-table tfoot td, .rc-year, .rc-info div, .rc-table tbody tr:nth-child(even) td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-matrix .rm-subj { height: auto; }
  .report-nav { display: none; }
}
@page { size: A4; margin: 12mm; }
@page wide { size: A4 landscape; margin: 10mm; }
@media print { .journal-card-wrap, .report-matrix-wrap { page: wide; } }

/* =====================================================================
   6-CI MƏRHƏLƏ — MESAJLAŞMA, YEKUN QİYMƏTLƏR, SMS
   ===================================================================== */
.badge-gold { background: var(--gold); color: var(--navy); }

/* Mesajlar */
.msg-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1rem; height: calc(100vh - var(--topbar-h) - 7.5rem); min-height: 520px; }
.msg-list, .msg-pane { display: flex; flex-direction: column; min-height: 0; }
.msg-list-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1rem .6rem; }
.msg-list-head h2 { font-size: 1.2rem; }
.msg-search { padding: 0 1rem .7rem; border-bottom: 1px solid var(--border); }
.msg-search input { height: 40px; }
.conv-list { list-style: none; margin: 0; padding: .4rem; overflow-y: auto; flex: 1; }
.conv { display: flex; align-items: center; gap: .7rem; padding: .65rem .7rem; border-radius: 12px; color: var(--text); }
.conv:hover { background: var(--surface-2); }
.conv.is-active { background: var(--primary-soft); }
.conv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.conv-top { display: flex; justify-content: space-between; gap: .5rem; }
.conv-top strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-top time { font-size: .72rem; color: var(--muted); flex-shrink: 0; }
.conv-last { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last em { font-style: normal; color: var(--text-2); }
.conv.is-unread .conv-top strong, .conv.is-unread .conv-last { color: var(--text); font-weight: 700; }
.conv-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: var(--navy); font: 800 .72rem/22px var(--font-head); text-align: center; }

.thread-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); }
.thread-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.msg-back { display: none; }
.thread { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .45rem;
  background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--border) 80%, transparent) 1px, transparent 0) 0 0 / 22px 22px, var(--surface-2); }
.day-sep { text-align: center; margin: .6rem 0; }
.day-sep span { font-size: .72rem; font-weight: 700; color: var(--muted); padding: .2rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.bubble-row { display: flex; align-items: flex-end; gap: .45rem; max-width: 78%; }
.bubble-row.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { position: relative; padding: .55rem .8rem .4rem; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.bubble p { font-size: .92rem; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble time { display: block; text-align: right; font-size: .66rem; color: var(--muted); margin-top: .15rem; }
.is-mine .bubble { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 16px 16px 4px 16px; }
.is-mine .bubble time { color: rgba(255,255,255,.65); }
[data-theme="dark"] .is-mine .bubble { background: var(--gold); color: var(--navy); border-color: var(--gold); }
[data-theme="dark"] .is-mine .bubble time { color: rgba(14,21,89,.65); }
.composer { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem .9rem; border-top: 1px solid var(--border); }
.composer textarea { min-height: 44px; max-height: 180px; resize: none; border-radius: 22px; padding: .6rem 1rem; }
.composer-send { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.new-msg { padding: 1.1rem; overflow-y: auto; }
.seg-2 { grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.pick-items-sm { max-height: 260px; }
.pick-group { padding: .5rem .6rem .25rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.msg-empty { flex: 1; justify-content: center; }
.child-msg { margin-left: auto; }
.child-head { flex-wrap: wrap; }

/* Yekun qiymətlər */
.final-status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.final-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.final-chip.is-approved { background: var(--success-soft); color: var(--success); }
.final-chip.is-locked { background: var(--navy); color: var(--gold); }
[data-theme="dark"] .final-chip.is-locked { background: var(--gold); color: var(--navy); }
.final-chip.is-draft { background: var(--accent-soft); color: var(--warn); }
.finals-table tr.is-official td { background: color-mix(in srgb, var(--success-soft) 35%, transparent); }
.finals-table .grade-group { display: inline-flex; }
.grade-group.is-locked { opacity: .6; pointer-events: none; }
.j-grade.is-official { box-shadow: 0 0 0 2px var(--gold); }
.stack-bar { display: flex; width: 160px; height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-bottom: .2rem; }
.stack-bar i.is-locked { background: var(--navy); }
.stack-bar i.is-approved { background: var(--success); }
[data-theme="dark"] .stack-bar i.is-locked { background: var(--gold); }
.rc-official b { text-decoration: underline; text-decoration-color: #fab416; text-decoration-thickness: 3px; text-underline-offset: 3px; }
.rc-official-key { display: inline-block; width: 14px; height: 3px; background: #fab416; vertical-align: middle; }

/* SMS */
.code-block { display: block; padding: .7rem .8rem; border-radius: 10px; white-space: pre-wrap; word-break: break-all; font-size: .76rem; line-height: 1.5; }
.sms-status { display: inline-block; padding: .15rem .5rem; border-radius: 6px; font-size: .74rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.sms-status.is-sent { background: var(--success-soft); color: var(--success); }
.sms-status.is-failed { background: var(--danger-soft); color: var(--danger); }
.sms-status.is-pending { background: var(--accent-soft); color: var(--warn); }
.sms-status.is-test { background: var(--info-soft); color: var(--info); }
.form .switch { margin: .1rem 0; }

@media (max-width: 960px) {
  .msg-layout { grid-template-columns: 1fr; height: calc(100vh - var(--topbar-h) - 3rem); }
  .msg-layout.has-pane .msg-list { display: none; }
  .msg-layout:not(.has-pane) .msg-pane { display: none; }
  .msg-back { display: inline-flex; }
  .bubble-row { max-width: 90%; }
}
@media (max-width: 720px) {
  .msg-layout { height: calc(100dvh - var(--topbar-h) - 2rem); min-height: 0; margin: -.25rem; }
  .finals-table .grade-opt span { min-width: 30px; height: 32px; }
  .final-status-bar .muted { flex-basis: 100%; }
  .child-msg { margin-left: 0; }
}
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* =====================================================================
   7-ci mərhələ: elanlar, təqvim, push bildirişlər, erkən xəbərdarlıq
   ===================================================================== */
:root {
  --cat-holiday: #16a34a; --cat-exam: #dc2626; --cat-meeting: #2563eb;
  --cat-event: #d99a06; --cat-other: #6c7294; --cat-term: #0e1559;
}
[data-theme="dark"] {
  --cat-holiday: #4ade80; --cat-exam: #f87171; --cat-meeting: #818cf8;
  --cat-event: #fab416; --cat-other: #8b91bd; --cat-term: #c0c4e6;
}
.cat-holiday { --cc: var(--cat-holiday); } .cat-exam { --cc: var(--cat-exam); } .cat-meeting { --cc: var(--cat-meeting); }
.cat-event { --cc: var(--cat-event); } .cat-other { --cc: var(--cat-other); } .cat-term { --cc: var(--cat-term); }

/* Menyu nişanı */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: var(--navy); font: 800 .7rem/20px var(--font-head); font-style: normal; text-align: center; }

/* Push banner */
.push-banner { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; padding: .85rem 1rem; border-radius: var(--radius); background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff; box-shadow: var(--shadow); }
.push-banner[hidden] { display: none; }
.push-banner > div { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.push-banner small { color: #c9cdf0; font-size: .82rem; }
.push-banner-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(250, 180, 22, .16); color: var(--gold); flex-shrink: 0; animation: bell-ring 2.4s ease-in-out infinite; }
.push-banner .btn-primary { background: var(--gold); color: var(--navy); }
.push-banner .icon-btn { color: #c9cdf0; }
@keyframes bell-ring { 0%, 84%, 100% { transform: rotate(0); } 88% { transform: rotate(14deg); } 92% { transform: rotate(-12deg); } 96% { transform: rotate(6deg); } }
.push-card { margin-top: 1.25rem; }
.push-state { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .8rem 1rem; border-radius: 12px; background: var(--surface-2); }
.push-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.push-btns [hidden] { display: none; }
.status-dot.is-off::before { background: var(--warn); }
.status-dot.is-bad { color: var(--danger); }
.status-dot.is-bad::before { background: var(--danger); }

/* Auditoriya seçimi */
.aud-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 1rem; }
[data-aud-class][hidden] { display: none; }

/* Elanlar */
.ann-list { display: flex; flex-direction: column; gap: 1rem; }
.ann-card { position: relative; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.ann-card.is-pinned { border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.ann-card.is-new::before { content: ''; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.ann-card:target { animation: flash-target 1.6s var(--ease); }
@keyframes flash-target { 0% { box-shadow: 0 0 0 6px var(--accent-soft); } 100% { box-shadow: var(--shadow); } }
.ann-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.ann-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ann-who strong { font-size: .92rem; }
.ann-tags { margin-left: auto; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ann-title { margin: .9rem 0 .4rem; font: 800 1.15rem var(--font-head); }
.ann-body { color: var(--text-2); line-height: 1.65; overflow-wrap: anywhere; }
.ann-body a { color: var(--primary); text-decoration: underline; }
.ann-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--border); }
.ann-reads { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.fill-bar-sm { min-width: 70px; width: 70px; height: 6px; border-radius: 3px; }
.fill-bar-sm i { background: var(--success); border-radius: 3px; }
.ann-actions { margin-left: auto; display: flex; gap: .3rem; }

.ann-mini, .ev-mini, .risk-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ann-mini a, .ev-mini a, .risk-mini a { color: var(--text); }
.ann-mini a { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .2s; }
.ann-mini a:hover { border-color: var(--border-strong); }
.ann-mini strong { display: flex; align-items: center; gap: .35rem; font-size: .92rem; }
.ann-mini strong .icon { color: var(--gold); }
.ann-mini span { font-size: .84rem; color: var(--text-2); }
.ann-mini small { font-size: .74rem; color: var(--muted); }
.ann-mini .is-new a { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.ann-mini .tag { margin-left: auto; }

/* Təqvim */
.ev-mini a { display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem; border-radius: 12px; transition: background .2s; }
.ev-mini a:hover { background: var(--surface-2); }
.ev-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 48px; border-radius: 11px; background: color-mix(in srgb, var(--cc) 13%, transparent); color: var(--cc); flex-shrink: 0; line-height: 1; }
.ev-date b { font: 800 1.15rem var(--font-head); }
.ev-date small { font-size: .66rem; font-weight: 700; text-transform: uppercase; margin-top: .15rem; }
.ev-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ev-text strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-text small { font-size: .76rem; color: var(--muted); }

.cal-layout { align-items: start; margin-bottom: 1.5rem; }
.cal-head { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.cal-head h3 { font: 800 1.1rem var(--font-head); min-width: 150px; text-align: center; }
.cal-head h3::first-letter { text-transform: uppercase; }
.cal-head .btn { margin-left: auto; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mcal-dow { padding: .55rem .4rem; text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); }
.mcal-dow.is-weekend { color: var(--danger); }
.mcal-day { position: relative; min-height: 104px; padding: .35rem .35rem .45rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcal-day:nth-child(7n) { border-right: 0; }
.mcal-day.is-weekend { background: var(--surface-2); }
.mcal-day.is-pad { opacity: .45; }
.mcal-day.is-holiday { background: color-mix(in srgb, var(--cat-holiday) 7%, transparent); }
.mcal-num { align-self: flex-start; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 8px; font: 700 .82rem var(--font-head); color: var(--text-2); }
.mcal-day.is-today .mcal-num { background: var(--primary); color: var(--primary-ink); }
.mcal-ev { display: block; padding: 2px 6px; border-radius: 6px; font-size: .72rem; font-weight: 600; line-height: 1.35; color: var(--cc); background: color-mix(in srgb, var(--cc) 13%, transparent); border-left: 3px solid var(--cc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcal-ev:hover { background: color-mix(in srgb, var(--cc) 22%, transparent); }
.mcal-more { font-size: .7rem; font-weight: 700; color: var(--muted); padding-left: 4px; }
.mcal-add { position: absolute; top: .35rem; right: .35rem; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--muted); opacity: 0; transition: opacity .2s, background .2s; }
.mcal-day:hover .mcal-add { opacity: 1; }
.mcal-add:hover { background: var(--primary-soft); color: var(--primary); }
.mcal-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: .8rem 1.2rem 1rem; font-size: .78rem; color: var(--muted); }
.mcal-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--cc); }

.ev-list { margin-bottom: 1rem; }
.ev-row { display: flex; align-items: flex-start; gap: .9rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.ev-row:last-child { border-bottom: 0; }
.ev-row:target, .ev-row:has(.ev-icon:target) { background: color-mix(in srgb, var(--cc) 8%, transparent); }
.ev-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; background: color-mix(in srgb, var(--cc) 14%, transparent); color: var(--cc); scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.ev-main strong { font-size: .97rem; }
.ev-main small { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.ev-main p { margin: .3rem 0 0; color: var(--text-2); font-size: .88rem; }
.ev-chip { color: var(--cc); background: color-mix(in srgb, var(--cc) 12%, transparent); border-color: transparent; }

.cat-picker { display: flex; flex-wrap: wrap; gap: .45rem; }
.cat-option input { position: absolute; opacity: 0; }
.cat-option span { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .8rem; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface-2); font-weight: 600; font-size: .85rem; cursor: pointer; transition: all .2s; }
.cat-option span .icon { color: var(--cc); }
.cat-option input:checked + span { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 12%, transparent); color: var(--cc); }
.cat-option input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-soft); }

/* Erkən xəbərdarlıq */
.tabs-inline { margin: 0; }
.risk-list { display: flex; flex-direction: column; }
.risk-row { display: flex; align-items: center; gap: .6rem 1rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.risk-row:last-child { border-bottom: 0; }
.risk-level { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; }
.risk-row.is-high .risk-level { background: var(--danger-soft); color: var(--danger); }
.risk-row.is-medium .risk-level { background: var(--warn-soft); color: var(--warn); }
.risk-who { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; flex: 0 0 210px; }
.risk-who small { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.risk-reasons { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; flex: 1 1 280px; }
.risk-chip { display: inline-block; padding: .25rem .55rem; border-radius: 8px; font-size: .76rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.risk-chip.rk-att, .risk-chip.rk-abs { background: var(--info-soft); color: var(--info); }
.risk-chip.rk-low, .risk-chip.rk-twos { background: var(--warn-soft); color: var(--warn); }
.risk-chip.rk-sum, .risk-chip.rk-drop { background: var(--danger-soft); color: var(--danger); }
.risk-metrics { display: flex; flex-direction: column; gap: .2rem; flex-shrink: 0; min-width: 70px; font: 700 .8rem var(--font-head); color: var(--text-2); white-space: nowrap; }
.risk-metrics span { display: inline-flex; align-items: center; gap: .3rem; }
.row-actions { display: flex; align-items: center; gap: .35rem; justify-content: flex-end; flex-shrink: 0; }
.risk-row .row-actions { min-width: 210px; }
.risk-empty .icon { color: var(--success); }
.risk-settings { margin-top: 1rem; }
.risk-settings summary { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; cursor: pointer; list-style: none; }
.risk-settings summary::-webkit-details-marker { display: none; }
.risk-settings summary h3 { display: flex; align-items: center; gap: .55rem; font-size: 1.02rem; font-weight: 800; }
.risk-settings summary h3 .icon { color: var(--primary); }
.risk-settings[open] summary { margin-bottom: 1rem; }
.mini-stats .is-danger strong { color: var(--danger); }
.mini-stats .is-warn strong { color: var(--warn); }
.risk-widget .mini-stats { grid-template-columns: repeat(2, 1fr); margin-bottom: .8rem; }
.risk-widget.has-high { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.risk-mini a { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem .55rem; border-radius: 10px; }
.risk-mini a:hover { background: var(--surface-2); }
.risk-mini a > span:last-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem; min-width: 0; font-size: .88rem; }
.risk-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: .4rem; flex-shrink: 0; background: var(--warn); }
.risk-mini .is-high .risk-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.risk-mini-why { flex-basis: 100%; font-size: .76rem; color: var(--muted); }
.risk-widget-ok { display: flex; align-items: center; gap: .35rem; color: var(--success); }
.board-widget { margin-bottom: 1.25rem; }
.stats a.stat-card { color: inherit; }

@media (max-width: 1180px) {
  .risk-who { flex: 1 1 160px; }
  .risk-metrics { flex-direction: row; gap: .7rem; }
  .risk-reasons { flex-basis: 100%; order: 5; padding-left: calc(38px + 1rem); }
  .risk-row .row-actions { flex-basis: 100%; order: 6; justify-content: flex-start; padding-left: calc(38px + 1rem); min-width: 0; }
}
@media (max-width: 720px) {
  .aud-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mcal-day { min-height: 62px; padding: .25rem; }
  .mcal-ev { font-size: 0; padding: 0; height: 6px; border-left: 0; border-radius: 3px; background: var(--cc); }
  .mcal-more { font-size: .62rem; }
  .mcal-add { display: none; }
  .mcal-dow { font-size: .62rem; padding: .45rem .1rem; }
  .ev-row { flex-wrap: wrap; padding: .85rem 1rem; }
  .ev-row .ev-chip { display: none; }
  .ev-row .row-actions { width: 100%; justify-content: flex-end; }
  .push-banner { flex-wrap: wrap; }
  .push-banner > div { flex-basis: calc(100% - 60px); }
  .ann-tags { margin-left: 0; width: 100%; }
  .risk-row { gap: .6rem .8rem; padding: .85rem 1rem; }
}
@media print {
  .push-banner, .mcal-add { display: none !important; }
}

/* =====================================================================
   8-ci mərhələ: onlayn testlər, sual bankı, ev tapşırığının təhvili
   ===================================================================== */
.icon-flip-y { transform: scaleY(-1); }

/* Test kartları */
.quiz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.quiz-card { --c: var(--primary); display: flex; flex-direction: column; gap: .55rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c); box-shadow: var(--shadow-sm); }
.quiz-card h3 { font: 800 1.02rem var(--font-head); }
.quiz-card h3 a { color: var(--text); }
.quiz-card h3 a:hover { color: var(--primary); }
.quiz-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.quiz-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--muted); }
.quiz-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.quiz-progress { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.quiz-progress .fill-bar-sm { width: 90px; }
.quiz-progress small { font-size: .78rem; color: var(--text-2); font-weight: 600; }
.quiz-card-foot { display: flex; align-items: center; gap: .45rem; margin-top: auto; padding-top: .55rem; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.quiz-card-foot .row-actions { margin-left: auto; }
.quiz-state { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .22rem .55rem; border-radius: 7px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.state-open .quiz-state, .quiz-state.state-open { background: var(--success-soft); color: var(--success); }
.state-scheduled .quiz-state, .quiz-state.state-scheduled { background: var(--info-soft); color: var(--info); }
.state-draft .quiz-state, .quiz-state.state-draft { background: var(--warn-soft); color: var(--warn); }
.quiz-score { font: 800 .95rem var(--font-head); padding: .2rem .55rem; border-radius: 8px; background: var(--success-soft); color: var(--success); }
.quiz-score.is-low { background: var(--danger-soft); color: var(--danger); }

/* Redaktor */
.quiz-editor { align-items: start; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-item { display: flex; gap: .85rem; padding: 1rem 1.2rem; border-top: 1px solid var(--border); }
.q-item.is-editing { background: var(--accent-soft); }
.q-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font: 800 .85rem var(--font-head); flex-shrink: 0; }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.q-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.q-text { margin: 0; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.q-opts-view { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.q-opts-view li { display: flex; align-items: baseline; gap: .5rem; padding: .35rem .6rem; border-radius: 8px; background: var(--surface-2); font-size: .88rem; border: 1px solid transparent; }
.q-opts-view li b { color: var(--muted); font-family: var(--font-head); }
.q-opts-view li.is-correct { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.q-opts-view li.is-correct b { color: var(--success); }
.q-opts-view li.is-wrong { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.q-opts-view li em { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--text-2); }
.q-answer { margin: 0; font-size: .86rem; color: var(--success); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.q-actions { display: flex; flex-direction: column; gap: .25rem; align-items: center; }
.q-actions .inline-form { display: flex; flex-direction: column; gap: .25rem; }

.q-form .q-types { grid-template-columns: repeat(5, 1fr); }
.q-types label, .q-tf label { position: relative; cursor: pointer; }
.q-types input, .q-tf input { position: absolute; opacity: 0; }
.q-types span, .q-tf span { display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .55rem .3rem; border-radius: 9px; font-weight: 700; font-size: .8rem; color: var(--text-2); text-align: center; }
.q-types span:hover { background: var(--surface); }
.q-types input:checked + span { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .q-types input:checked + span { background: var(--gold); color: var(--navy); }
.q-tf { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 360px; }
.q-tf span { border: 1.5px solid var(--border); background: var(--surface-2); padding: .65rem; }
.q-tf input:checked + span { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.q-section[hidden] { display: none !important; }
.q-section { display: flex; flex-direction: column; gap: .5rem; }
.q-section .field-label small { font-weight: 500; margin-left: .3rem; }
.q-section .field-label small[hidden] { display: none; }
.q-opts { display: flex; flex-direction: column; gap: .45rem; border-radius: 12px; transition: box-shadow .2s; }
.q-opts.is-invalid { box-shadow: 0 0 0 3px var(--danger-soft); }
.q-opt { display: flex; align-items: center; gap: .5rem; }
.q-opt input[type=text] { flex: 1; }
.q-cor { position: relative; cursor: pointer; flex-shrink: 0; }
.q-cor input { position: absolute; opacity: 0; }
.q-cor span { display: grid; place-items: center; width: 40px; height: 44px; border-radius: 10px; border: 1.5px solid var(--border-strong); font: 800 .9rem var(--font-head); color: var(--muted); background: var(--surface-2); transition: all .15s; }
.q-cor input:checked + span { background: var(--success); border-color: var(--success); color: #fff; }
.q-cor input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-soft); }
.q-section .btn { align-self: flex-start; }
.bank-pick .pick-item { align-items: flex-start; }
.bank-pick .tag { flex-shrink: 0; }
.publish-card .card-head { margin-bottom: .6rem; }

/* Test yazma */
.quiz-take { max-width: 860px; margin: 0 auto; }
.quiz-bar { position: sticky; top: calc(var(--topbar-h) + .5rem); z-index: 30; display: flex; align-items: center; gap: .9rem; padding: .7rem .8rem .7rem 1.1rem; border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.quiz-bar-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.quiz-bar-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-bar-title small { color: var(--muted); font-size: .78rem; }
.quiz-timer { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font: 800 1.05rem var(--font-head); font-variant-numeric: tabular-nums; }
.quiz-timer.is-warn { background: var(--warn-soft); color: var(--warn); }
.quiz-timer.is-danger { background: var(--danger); color: #fff; animation: pulse-t 1s infinite; }
@keyframes pulse-t { 50% { opacity: .75; } }
.quiz-saved { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 700; color: var(--success); }
.quiz-saved[hidden] { display: none; }
.quiz-progress-line { height: 4px; margin: .5rem .6rem 1rem; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.quiz-progress-line i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .4s var(--ease); }
.tq { margin-bottom: .9rem; border-left: 4px solid var(--border); transition: border-color .2s; }
.tq.is-answered { border-left-color: var(--success); }
.tq-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.tq-text { font-size: 1.04rem; font-weight: 600; line-height: 1.55; margin: 0 0 .9rem; overflow-wrap: anywhere; }
.tq-opts { display: flex; flex-direction: column; gap: .5rem; }
.tq-tf { flex-direction: row; }
.tq-tf .tq-opt { flex: 1; }
.tq-opt { position: relative; display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: 13px; border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.tq-opt:hover { border-color: var(--border-strong); }
.tq-opt input { position: absolute; opacity: 0; }
.tq-letter { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface); border: 1.5px solid var(--border-strong); font: 800 .85rem var(--font-head); color: var(--muted); flex-shrink: 0; }
.tq-label { line-height: 1.45; overflow-wrap: anywhere; }
.tq-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.tq-opt input:checked ~ .tq-letter { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tq-opt input:focus-visible ~ .tq-letter { box-shadow: 0 0 0 3px var(--primary-soft); }
.tq-input { width: 100%; font-size: 1rem; }
.quiz-end { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 1.5rem 0 2rem; text-align: center; }

/* Nəticə */
.result-hero { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.result-hero h2 { font: 800 1.5rem var(--font-head); margin: .2rem 0; }
.result-hero .eyebrow { margin: 0; font-size: .8rem; color: var(--muted); }
.result-hero.is-great { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.result-hero.is-low { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.ring-lg { width: 108px; height: 108px; }
.ring-lg span { width: 88px; height: 88px; font-size: 1.25rem; }
.result-hero.is-great .ring { background: conic-gradient(var(--success) calc(var(--p) * 1%), var(--surface-3) 0); }
.result-hero.is-low .ring { background: conic-gradient(var(--danger) calc(var(--p) * 1%), var(--surface-3) 0); }
.rq { border-left: 4px solid var(--border); }
.rq.is-right { border-left-color: var(--success); }
.rq.is-part { border-left-color: var(--warn); }
.rq.is-wrong { border-left-color: var(--danger); }
.rq.is-pending { border-left-color: var(--info); }
.rq-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .6rem; }
.rq-badge { margin-left: auto; font: 800 .8rem var(--font-head); padding: .2rem .55rem; border-radius: 7px; background: var(--surface-3); }
.is-right .rq-badge { background: var(--success-soft); color: var(--success); }
.is-wrong .rq-badge { background: var(--danger-soft); color: var(--danger); }
.is-part .rq-badge { background: var(--warn-soft); color: var(--warn); }
.rq .q-text { margin-bottom: .6rem; }
.rq-text { padding: .7rem .85rem; border-radius: 10px; background: var(--surface-2); line-height: 1.55; overflow-wrap: anywhere; margin-bottom: .4rem; }
.rq-expl, .rq-fb { margin: .6rem 0 0; padding: .55rem .75rem; border-radius: 10px; font-size: .86rem; display: flex; gap: .4rem; align-items: baseline; }
.rq-expl { background: var(--info-soft); color: var(--text-2); }
.rq-fb { background: var(--accent-soft); color: var(--text-2); }
.rq-points { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; font: 700 .85rem var(--font-head); }
.rq-points input { width: 76px; height: 38px; text-align: center; }
.rq-feedback { width: 100%; margin-top: .6rem; }
.review-form .rq { margin-bottom: .8rem; }
.quiz-intro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2rem 1.4rem; }
.quiz-intro h2 { font: 800 1.35rem var(--font-head); }
.quiz-intro-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--warn); }
.quiz-intro-icon .icon { width: 30px; height: 30px; }
.quiz-rules { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; text-align: left; }
.quiz-rules li { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.quiz-rules .icon { color: var(--primary); flex-shrink: 0; }
.attempts-list li.is-active a { font-weight: 800; }
.attempts-list a { display: flex; justify-content: space-between; align-items: center; width: 100%; color: var(--text); }

/* Nəticələr cədvəli + analitika */
.att-chip { display: inline-block; padding: .2rem .55rem; border-radius: 7px; font-size: .74rem; font-weight: 700; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.att-chip.ast-graded { background: var(--success-soft); color: var(--success); }
.att-chip.ast-submitted { background: var(--warn-soft); color: var(--warn); }
.att-chip.ast-in_progress { background: var(--info-soft); color: var(--info); }
.qa-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.qa-head { display: flex; gap: .4rem; align-items: baseline; font-size: .85rem; margin-bottom: .3rem; }
.qa-head span { flex: 1; min-width: 0; color: var(--text-2); }
.qa-bar { width: 100%; }
.qa-bar i { background: var(--warn); }
.qa-opts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.qa-opts span { font: 700 .72rem var(--font-head); padding: .15rem .45rem; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.qa-opts span.is-correct { background: var(--success-soft); color: var(--success); }
.export-card .btn { margin-top: .3rem; }

/* Panel vidjetləri */
.quiz-widget { margin-bottom: 1.25rem; border-color: color-mix(in srgb, var(--gold) 45%, var(--border)); }
.quiz-widget .ev-date { background: color-mix(in srgb, var(--cc) 14%, transparent); color: var(--cc); }
.quiz-widget .ev-mini a { flex-wrap: nowrap; }
.quiz-widget .ev-text { flex: 1; }
.review-widget { margin-bottom: 1.25rem; }
.review-stats a { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; border-radius: 12px; background: var(--surface-2); color: var(--text); transition: background .2s; }
.review-stats a:hover { background: var(--surface-3); }
.review-stats a.is-warn strong { color: var(--warn); }
.review-new strong { color: var(--primary); }

/* Ev tapşırığı — təhvil */
.hw-card-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: auto; padding-top: .55rem; border-top: 1px dashed var(--border); }
.hw-card-actions .btn { margin-left: auto; }
.hw-card-actions .btn .num-badge { min-width: 22px; height: 22px; font-size: .72rem; margin-left: .15rem; background: rgba(255, 255, 255, .2); }
.hw-card-actions .btn-ghost .num-badge { background: var(--surface-3); }
.hw-status { display: inline-block; padding: .2rem .55rem; border-radius: 7px; font-size: .72rem; font-weight: 700; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.hw-status.st-submitted { background: var(--info-soft); color: var(--info); }
.hw-status.st-graded { background: var(--success-soft); color: var(--success); }
.hw-status.st-returned { background: var(--warn-soft); color: var(--warn); }
.hw-task { border-top: 4px solid var(--c); }
.hw-task .hw-card-top { margin-bottom: .6rem; }
.hw-task-text { font-size: 1.02rem; line-height: 1.6; margin: 0 0 .5rem; overflow-wrap: anywhere; }
.hw-review.st-graded { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.hw-review.st-returned { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.hw-feedback { padding: .7rem .85rem; border-radius: 10px; background: var(--surface-2); line-height: 1.55; }
.hw-drop { padding: 1.4rem 1rem; }
.hw-drop.is-busy { opacity: .6; pointer-events: none; }
.hw-preview { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.hw-preview:empty { display: none; }
.hw-preview li { position: relative; display: flex; align-items: center; gap: .5rem; padding: .4rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.hw-preview li.is-bad { border-color: var(--danger); background: var(--danger-soft); }
.hw-preview img, .hw-preview .hw-file-icon { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.hw-preview .icon-btn { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 700; }
.hw-prev-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hw-prev-name strong, .hw-file strong { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-prev-name small, .hw-file small { font-size: .7rem; color: var(--muted); }
.hw-file-icon { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font: 800 .62rem var(--font-head); }
.hw-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.hw-files li { display: flex; align-items: center; gap: .5rem; }
.hw-file { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; padding: .4rem; border-radius: 10px; background: var(--surface-2); color: var(--text); border: 1px solid transparent; }
.hw-file:hover { border-color: var(--border-strong); }
.hw-file > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hw-file img, .hw-file .hw-file-icon { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sub-list { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1rem; }
.sub-card { scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.sub-card.st-none { padding-top: .8rem; padding-bottom: .8rem; opacity: .75; }
.sub-card.st-submitted { border-left: 4px solid var(--info); }
.sub-card.st-graded { border-left: 4px solid var(--success); }
.sub-card.st-returned { border-left: 4px solid var(--warn); }
.sub-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.sub-who { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.sub-body { margin-top: .8rem; padding: .7rem .85rem; border-radius: 10px; background: var(--surface-2); line-height: 1.55; overflow-wrap: anywhere; }
.sub-files { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.sub-files .hw-file { flex: 0 1 auto; max-width: 260px; }
.sub-files .hw-file img { width: 96px; height: 96px; }
.sub-review { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--border); }
.sub-review input[name="feedback"] { flex: 1 1 220px; min-width: 0; height: 40px; }
.sub-grades { flex-shrink: 0; }

@media (max-width: 720px) {
  .q-form .q-types { grid-template-columns: repeat(3, 1fr); }
  .q-item { padding: .85rem 1rem; gap: .6rem; }
  .q-actions { flex-direction: row; flex-wrap: wrap; }
  .q-actions .inline-form { flex-direction: row; }
  .quiz-bar { top: calc(var(--topbar-h) + .25rem); gap: .5rem; padding: .55rem .6rem .55rem .8rem; }
  .quiz-bar .btn { padding: 0 .8rem; }
  .quiz-bar .btn .icon { display: none; }
  .quiz-saved { display: none !important; }
  .tq-text { font-size: .98rem; }
  .result-hero { gap: 1rem; }
  .rq-points input { width: 64px; }
  .sub-review .btn { flex: 1; }
}

input[type=datetime-local] { font-size: .9rem; padding: 0 .6rem; }
input[type=datetime-local]:focus, input[type=search]:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.quiz-results-table td { vertical-align: middle; }
.quiz-results-table .td-who strong { display: block; }
.quiz-results-table .td-who small { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.q-types span { line-height: 1.2; }

/* =====================================================================
   9-cu mərhələ: davranış, nailiyyətlər, görüşlər, QR sənədlər
   ===================================================================== */
.bh-form.is-invalid { box-shadow: 0 0 0 3px var(--danger-soft); }
.bh-students { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .45rem; margin-bottom: 1rem; }
.bh-student { position: relative; display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.bh-student input { position: absolute; opacity: 0; }
.bh-student:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.bh-student:has(input:checked) .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.bh-name { display: flex; flex-direction: column; min-width: 0; font-weight: 700; font-size: .86rem; line-height: 1.25; }
.bh-name small { font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-score { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; font: 800 .72rem var(--font-head); line-height: 1.2; }
.is-plus { color: var(--success); }
.is-minus { color: var(--danger); }
.bh-presets { display: flex; flex-wrap: wrap; gap: .4rem; margin: .35rem 0 .9rem; }
.bh-preset { position: relative; cursor: pointer; }
.bh-preset input { position: absolute; opacity: 0; }
.bh-preset span { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface-2); font-size: .84rem; font-weight: 600; transition: all .15s; }
.bh-preset em { font-style: normal; font: 800 .72rem var(--font-head); opacity: .7; }
.bh-preset.is-praise span .icon { color: var(--success); }
.bh-preset.is-remark span .icon { color: var(--danger); }
.bh-preset.is-praise input:checked + span { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.bh-preset.is-remark input:checked + span { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.bh-preset.is-custom input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.bh-custom-kind { display: flex; gap: 1rem; margin-bottom: .8rem; }
.bh-custom-kind[hidden] { display: none; }
.bh-kind-opt { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .88rem; cursor: pointer; }
.bh-form .btn .num-badge { min-width: 24px; height: 24px; margin-left: .25rem; background: rgba(255, 255, 255, .2); }
.bh-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.bh-feed li { display: flex; align-items: flex-start; gap: .7rem; padding: .55rem .6rem; border-radius: 11px; background: var(--surface-2); }
.bh-feed li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .88rem; line-height: 1.4; }
.bh-dot { display: grid; place-items: center; min-width: 34px; height: 30px; border-radius: 9px; font: 800 .8rem var(--font-head); flex-shrink: 0; }
.bh-feed .is-praise .bh-dot { background: var(--success-soft); color: var(--success); }
.bh-feed .is-remark .bh-dot { background: var(--danger-soft); color: var(--danger); }
.leader-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.leader-list li { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 11px; }
.leader-list li.is-me { background: var(--primary-soft); }
.leader-pos { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); font: 800 .8rem var(--font-head); flex-shrink: 0; }
.leader-list .top-1 .leader-pos { background: #fab416; color: #0e1559; }
.leader-list .top-2 .leader-pos { background: #cbd5e1; color: #1e293b; }
.leader-list .top-3 .leader-pos { background: #e7a96b; color: #3b1f06; }
.leader-name { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; }
.leader-list b { font: 800 .9rem var(--font-head); color: var(--success); }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.badge-card { --bc: var(--gold); display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 1.1rem .9rem; border-radius: 16px; border: 1.5px dashed var(--border-strong); background: var(--surface-2); filter: grayscale(1); opacity: .6; }
.badge-card.is-earned { filter: none; opacity: 1; border-style: solid; border-color: color-mix(in srgb, var(--bc) 45%, var(--border)); background: color-mix(in srgb, var(--bc) 8%, var(--surface)); }
.badge-medal { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--bc); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--bc) 22%, transparent); margin-bottom: .3rem; }
.badge-medal .icon { width: 28px; height: 28px; }
.badge-medal em { position: absolute; right: -6px; bottom: -4px; font: 800 .7rem var(--font-head); font-style: normal; padding: .1rem .35rem; border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.badge-card strong { font: 800 .92rem var(--font-head); }
.badge-card small { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.badge-when { margin-top: auto; display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; color: var(--success); }
.badge-when.is-locked { color: var(--muted); }
.badges-widget { margin-bottom: 1.25rem; }
.badges-strip { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.badge-mini { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bc); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc) 25%, transparent); }
.badges-sum { margin-left: auto; display: flex; align-items: center; gap: .6rem; font: 800 .85rem var(--font-head); flex-wrap: wrap; }
.child-behavior { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin: -.3rem 0 1rem; padding: .6rem .85rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .86rem; }
.child-behavior .icon { color: var(--gold); }
.child-behavior b { font: 800 .82rem var(--font-head); }
.child-behavior .is-badge { color: var(--warn); }
.child-behavior .muted { margin-left: auto; }

/* Görüşlər */
.slot-list { margin-bottom: 1rem; }
.slot-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); }
.slot-row:last-child { border-bottom: 0; }
.slot-time { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: .35rem .3rem; border-radius: 10px; background: var(--surface-2); line-height: 1.15; }
.slot-time b { font: 800 1rem var(--font-head); }
.slot-time small { font-size: .7rem; color: var(--muted); }
.slot-row.st-booked .slot-time { background: var(--primary-soft); color: var(--primary); }
.slot-row.st-cancelled { opacity: .55; }
.slot-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.slot-note { margin: .3rem 0 0; padding: .35rem .6rem; border-radius: 8px; background: var(--accent-soft); font-size: .84rem; }
.slot-status { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 7px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.st-booked .slot-status { background: var(--success-soft); color: var(--success); }
.st-open .slot-status { background: var(--info-soft); color: var(--info); }
.mini-stats-2 { grid-template-columns: repeat(2, 1fr); }
.teacher-pick { display: flex; flex-direction: column; }
.teacher-row { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.1rem; border-top: 1px solid var(--border); color: var(--text); transition: background .15s; }
.teacher-row:hover { background: var(--surface-2); }
.teacher-row.is-active { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.teacher-row.is-empty { opacity: .65; }
.teacher-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.teacher-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-free { font-size: .74rem; font-weight: 700; padding: .2rem .55rem; border-radius: 7px; background: var(--success-soft); color: var(--success); white-space: nowrap; }
.teacher-row.is-empty .teacher-free { background: var(--surface-3); color: var(--muted); }
.slot-pick { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .9rem; }
.slot-pick label { position: relative; cursor: pointer; }
.slot-pick input { position: absolute; opacity: 0; }
.slot-pick span { display: inline-block; padding: .55rem .8rem; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface-2); font: 700 .9rem var(--font-head); transition: all .15s; }
.slot-pick input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.slot-pick input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-soft); }

/* QR sənədlər */
.doc-tabs { margin: 0 1.2rem 1rem; }
.doc-qr { display: flex; align-items: center; gap: 3mm; }
.doc-qr .qr { flex-shrink: 0; }
.doc-qr div { display: flex; flex-direction: column; gap: 1mm; max-width: 42mm; }
.doc-qr small { font-size: .62rem; color: #6c7294; line-height: 1.3; }
.doc-qr b { font: 700 .72rem 'Montserrat', monospace; letter-spacing: .04em; color: #0e1559; }
.rc-sign-qr { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
.cert-page { gap: 8mm; }
.cert-page.is-revoked { position: relative; }
.cert-page.is-revoked::after { content: 'LƏĞV EDİLİB'; position: absolute; top: 40%; left: 10%; right: 10%; text-align: center; font: 800 3rem 'Montserrat', sans-serif; color: rgba(220, 38, 38, .25); transform: rotate(-18deg); }
.cert-meta { display: flex; justify-content: space-between; font-size: .85rem; color: #3a4066; }
.cert-title { text-align: center; font: 800 1.9rem 'Montserrat', sans-serif; letter-spacing: .2em; color: #0e1559; margin: 8mm 0 4mm; }
.cert-text { font-size: 1.08rem; line-height: 1.9; text-indent: 12mm; text-align: justify; color: #11163d; margin: 0; }
.cert-sign { margin-top: auto; display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 10mm; }
.cert-sign-line { display: flex; flex-direction: column; gap: 2mm; }
.cert-sign-line span { border-bottom: 1px solid #11163d; height: 12mm; }
.cert-sign-line small { font-size: .8rem; color: #3a4066; }
.cert-stamp { width: 32mm; height: 32mm; border: 1.5px dashed #ccd1e3; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: #9aa0bf; }
.verify-body { background: var(--bg); }
.verify-card { max-width: 520px; text-align: left; display: flex; flex-direction: column; gap: 1.1rem; }
.verify-brand { display: flex; align-items: center; gap: .8rem; padding-bottom: 1rem; border-bottom: 3px solid var(--gold); }
.verify-brand img { width: 52px; height: 52px; }
.verify-brand div { display: flex; flex-direction: column; line-height: 1.3; }
.verify-brand strong { font: 800 1.1rem var(--font-head); }
.verify-brand small { color: var(--muted); }
.verify-status { display: flex; align-items: center; gap: .9rem; padding: 1rem; border-radius: 14px; }
.verify-status .icon { width: 34px; height: 34px; flex-shrink: 0; }
.verify-status div { display: flex; flex-direction: column; line-height: 1.35; }
.verify-status strong { font: 800 1.1rem var(--font-head); }
.verify-status.is-ok { background: var(--success-soft); color: var(--success); }
.verify-status.is-bad { background: var(--danger-soft); color: var(--danger); }
.verify-status small { color: var(--text-2); }
.verify-data { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.verify-data div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem .9rem; border-bottom: 1px solid var(--border); }
.verify-data div:last-child { border-bottom: 0; }
.verify-data dt { color: var(--muted); font-size: .86rem; }
.verify-data dd { margin: 0; font-weight: 700; text-align: right; }
.verify-form { display: flex; gap: .5rem; }
.verify-form input { flex: 1; height: 46px; min-height: 46px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

@media (max-width: 720px) {
  .bh-students { grid-template-columns: repeat(2, 1fr); }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .slot-row { padding: .75rem .9rem; gap: .65rem; flex-wrap: wrap; }
  .slot-row .row-actions { margin-left: auto; }
  .verify-form { flex-direction: column; }
}
@media print {
  .rc-sign-qr { grid-template-columns: 1fr 1fr 1fr auto; }
}

/* =====================================================================
   10-cu mərhələ: ödənişlər, əvəzetmə, dərs yükü, ehtiyat nüsxə, 2FA
   ===================================================================== */
.type-payment .notif-icon { background: var(--success-soft); color: var(--success); }
.type-substitution .notif-icon { background: var(--accent-soft); color: var(--warn); }
.fee-table .tag-go { margin-left: .25rem; }
.fee-gen { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.fee-gen input[type="month"] { flex: 1; min-width: 150px; }
.fee-chart { height: 130px; }
.fee-recent li a { display: flex; align-items: center; gap: .75rem; width: 100%; color: inherit; text-decoration: none; }
.fee-recent li a b { white-space: nowrap; }
.fee-recent li.is-muted { opacity: .55; }
.fee-recent li.is-muted b { text-decoration: line-through; }
.table tr.is-muted td { opacity: .55; }
.table tr.is-muted td b { text-decoration: line-through; }
.th-num, td.th-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* qəbz */
.receipt-page { min-height: 0; gap: 5mm; }
.receipt-page .cert-title { margin: 4mm 0 2mm; font-size: 1.6rem; }
.receipt-void { text-align: center; font: 800 1rem 'Montserrat', sans-serif; letter-spacing: .15em; color: #dc2626; margin: 0; }
.receipt-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.receipt-table th, .receipt-table td { padding: 3mm 2mm; border-bottom: 1px solid #e3e6f0; text-align: left; vertical-align: top; }
.receipt-table th { width: 42%; font-weight: 600; color: #6c7294; }
.receipt-table td { font-weight: 600; color: #11163d; }
.receipt-amount th, .receipt-amount td { font: 800 1.35rem 'Montserrat', sans-serif; color: #0e1559; background: #fff8e4; }
.receipt-page .cert-sign { margin-top: 6mm; }
.rc-flash { max-width: 210mm; margin: 12px auto 0; padding: .7rem 1rem; border-radius: 10px; display: flex; gap: .5rem; align-items: center; background: #dcfce7; color: #16a34a; font-weight: 600; }
.rc-flash-error { background: #fee2e2; color: #dc2626; }

/* əvəzetmə */
.tag-sub { display: inline-flex; align-items: center; gap: .25rem; margin-top: .3rem; background: var(--primary-soft); color: var(--primary); text-transform: none; letter-spacing: 0; font-size: .74rem; }
[data-theme="dark"] .tag-sub { color: var(--gold); }
.lesson-body .tag { margin-top: .3rem; display: inline-flex; align-items: center; gap: .25rem; text-transform: none; letter-spacing: 0; }
.sub-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.sub-row { display: grid; grid-template-columns: auto 1fr minmax(200px, 300px); align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.sub-row.is-done { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); background: color-mix(in srgb, var(--success-soft) 45%, var(--surface)); }
.sub-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.sub-row select option.is-busy { color: var(--muted); }
.sub-recent li { align-items: flex-start; }
.sub-recent .card-list-name small { margin-top: .15rem; }

/* dərs yükü */
.wl-fill { display: flex; align-items: center; gap: .5rem; min-width: 130px; }
.wl-fill small { font-weight: 700; min-width: 34px; }
.wl-bar { flex: 1; margin: 0; --tone: var(--success); }
.wl-bar.is-mid { --tone: var(--warn); }
.wl-bar.is-low { --tone: var(--danger); }

/* ehtiyat nüsxə */
.bk-info { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .55rem; font-size: .88rem; color: var(--text-2); line-height: 1.5; }

/* 2FA */
.twofa-card .card-head .tag { margin-left: auto; }
.twofa-setup { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start; }
.twofa-qr { padding: 10px; background: #fff; border-radius: 14px; border: 1px solid var(--border); line-height: 0; }
.twofa-steps { margin: 0 0 1rem; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; }
.twofa-secret { display: inline-block; margin-top: .3rem; padding: .3rem .55rem; border-radius: 8px; background: var(--surface-3); font: 700 .88rem ui-monospace, monospace; letter-spacing: .06em; word-break: break-all; }
.otp-input { font: 700 1.25rem ui-monospace, monospace !important; letter-spacing: .3em; text-align: center; }
.twofa-codes { border: 1.5px dashed var(--gold); background: var(--accent-soft); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.twofa-codes p { margin: 0 0 .6rem; }
.twofa-codes ol { margin: 0 0 .8rem; padding-left: 1.4rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.2rem; }
.twofa-codes code { font: 700 .95rem ui-monospace, monospace; letter-spacing: .05em; }
.twofa-manage .field { max-width: 320px; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.twofa-admin { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
[data-copy].is-copied { background: var(--success-soft); color: var(--success); }

@media (max-width: 720px) {
  .sub-row { grid-template-columns: auto 1fr; }
  .sub-row select { grid-column: 1 / -1; }
  .twofa-setup { grid-template-columns: 1fr; justify-items: center; }
  .twofa-codes ol { grid-template-columns: 1fr; }
}
@media print {
  .receipt-page { min-height: 0; box-shadow: none; }
}
.child-fee { margin-top: .4rem; }
input[type=month]:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.toolbar input[type=month], .toolbar input[type=date] { width: auto; }
.fee-gen input[type=month] { height: 38px; }
.show-sm { display: none; }
@media (max-width: 720px) {
  .show-sm { display: block; font-size: .74rem; margin-bottom: .1rem; }
  .fee-table td, .fee-table th { padding-left: .7rem; padding-right: .5rem; }
  .fee-table .td-actions .btn-sm { padding: .35rem .5rem; }
}
/* Siniflər: kartda silmə düyməsi */
.class-card-wrap { position: relative; }
.class-card-wrap .class-card { height: 100%; padding-right: 2.6rem; }
.class-card-del { position: absolute; top: .5rem; right: .5rem; }
.class-card-del .icon-btn { opacity: .55; }
.class-card-wrap:hover .class-card-del .icon-btn, .class-card-del .icon-btn:focus-visible { opacity: 1; }
@media (hover: none) { .class-card-del .icon-btn { opacity: .8; } }
/* Qəbz / arayış — telefonda */
@media (max-width: 600px) {
  .cert-sign { grid-template-columns: auto 1fr; gap: 14px; }
  .cert-sign-line { grid-column: 1 / -1; }
  .cert-stamp { width: 26mm; height: 26mm; }
  .cert-title { font-size: 1.3rem; letter-spacing: .12em; }
  .receipt-table { font-size: .9rem; }
  .receipt-table th { width: 46%; }
  .receipt-amount th, .receipt-amount td { font-size: 1.1rem; }
  .rc-toolbar { padding: .6rem .8rem; gap: .5rem; }
  .rc-toolbar > span { font-size: .8rem; text-align: center; }
}
