:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fbfc;
  --panel-strong: #f2f4f7;
  --panel-glass: rgba(255, 255, 255, .92);
  --text: #101828;
  --text-2: #344054;
  --text-3: #475467;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --scroll: #cbd5e1;
  --ink: #101828;
  --ink-hover: #1f2937;
  --on-ink: #ffffff;
  --brand: #0f9f8e;
  --brand-strong: #087f73;
  --brand-text: #087f73;
  --brand-soft: #e5f7f3;
  --brand-soft-2: #eefdf9;
  --brand-line: #b2ebe3;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --success-bg: #f0fdf4;
  --success-line: #bbf7d0;
  --success-text: #166534;
  --warning: #b7791f;
  --warning-soft: #fef3c7;
  --warning-bg: #fffbeb;
  --warning-line: #fedf89;
  --warning-text: #92400e;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --danger-bg: #fff7f7;
  --danger-line: #fecaca;
  --danger-text: #991b1b;
  --info: #0ea5a7;
  --info-soft: #e0f7fa;
  --info-text: #0e7490;
  --violet: #7c3aed;
  --violet-soft: #f1ecfe;
  --violet-text: #6d28d9;
  --shadow: 0 14px 40px rgba(16, 24, 40, .08);
  --shadow-soft: 0 8px 22px rgba(16, 24, 40, .06);
}

/* Tungi rejim: tizim sozlamasi bo'yicha yoki foydalanuvchi tanlovi (data-theme) bo'yicha */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1220;
    --panel: #111a2b;
    --panel-soft: #152036;
    --panel-strong: #1b2840;
    --panel-glass: rgba(17, 26, 43, .9);
    --text: #e6edf5;
    --text-2: #c9d4e2;
    --text-3: #a9b7c9;
    --muted: #8a9ab0;
    --line: #233149;
    --line-strong: #31425f;
    --scroll: #31425f;
    --ink: #e6edf5;
    --ink-hover: #ffffff;
    --on-ink: #0b1220;
    --brand: #0f9f8e;
    --brand-strong: #0d8a7c;
    --brand-text: #5eead4;
    --brand-soft: rgba(45, 212, 191, .12);
    --brand-soft-2: rgba(45, 212, 191, .08);
    --brand-line: rgba(45, 212, 191, .35);
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, .16);
    --success-bg: rgba(34, 197, 94, .08);
    --success-line: rgba(34, 197, 94, .35);
    --success-text: #86efac;
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, .16);
    --warning-bg: rgba(245, 158, 11, .08);
    --warning-line: rgba(245, 158, 11, .35);
    --warning-text: #fcd34d;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .16);
    --danger-bg: rgba(239, 68, 68, .08);
    --danger-line: rgba(239, 68, 68, .38);
    --danger-text: #fca5a5;
    --info: #22d3ee;
    --info-soft: rgba(34, 211, 238, .14);
    --info-text: #67e8f9;
    --violet: #a78bfa;
    --violet-soft: rgba(167, 139, 250, .16);
    --violet-text: #c4b5fd;
    --shadow: 0 14px 40px rgba(0, 0, 0, .35);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, .28);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #111a2b;
  --panel-soft: #152036;
  --panel-strong: #1b2840;
  --panel-glass: rgba(17, 26, 43, .9);
  --text: #e6edf5;
  --text-2: #c9d4e2;
  --text-3: #a9b7c9;
  --muted: #8a9ab0;
  --line: #233149;
  --line-strong: #31425f;
  --scroll: #31425f;
  --ink: #e6edf5;
  --ink-hover: #ffffff;
  --on-ink: #0b1220;
  --brand: #0f9f8e;
  --brand-strong: #0d8a7c;
  --brand-text: #5eead4;
  --brand-soft: rgba(45, 212, 191, .12);
  --brand-soft-2: rgba(45, 212, 191, .08);
  --brand-line: rgba(45, 212, 191, .35);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, .16);
  --success-bg: rgba(34, 197, 94, .08);
  --success-line: rgba(34, 197, 94, .35);
  --success-text: #86efac;
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, .16);
  --warning-bg: rgba(245, 158, 11, .08);
  --warning-line: rgba(245, 158, 11, .35);
  --warning-text: #fcd34d;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, .16);
  --danger-bg: rgba(239, 68, 68, .08);
  --danger-line: rgba(239, 68, 68, .38);
  --danger-text: #fca5a5;
  --info: #22d3ee;
  --info-soft: rgba(34, 211, 238, .14);
  --info-text: #67e8f9;
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, .16);
  --violet-text: #c4b5fd;
  --shadow: 0 14px 40px rgba(0, 0, 0, .35);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(15, 159, 142, .18); }

body::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
body::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: var(--scroll);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  background: var(--panel-glass);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.brand strong { letter-spacing: .01em; }
.brand small { display: block; color: var(--muted); margin-top: 2px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 159, 142, .22);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.brand-mark.big {
  width: 74px;
  height: 74px;
  border-radius: 14px;
}

.side-nav {
  display: grid;
  gap: 2px;
  padding: 8px 0 14px;
}
.side-nav-group {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.side-nav-group:last-child { border-bottom: 0; }
.side-nav-group > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.side-nav-group > summary::-webkit-details-marker { display: none; }
.side-nav-group > summary:hover { color: var(--text-2); background: var(--panel-soft); }
.side-nav-group > summary:focus-visible {
  outline: 3px solid rgba(15, 159, 142, .22);
  outline-offset: 1px;
}
.nav-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.side-nav-group[open] > summary .nav-chevron { transform: rotate(90deg); }
.side-nav-items {
  display: grid;
  gap: 2px;
  padding: 2px 0 6px;
}
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-2);
  line-height: 1.25;
  font-size: 14.5px;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}
.side-nav a:hover { background: var(--panel-soft); color: var(--text); }
.side-nav a:hover .nav-icon { color: var(--text-2); }
.side-nav a.active {
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 700;
}
.side-nav a.active .nav-icon { color: var(--brand-text); }
.side-nav a.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}

.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  min-height: 74px;
  background: var(--panel-glass);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.topbar h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.topbar p { margin: 4px 0 0; color: var(--muted); }
.mobile-menu { display: none; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top-search input {
  width: min(260px, 34vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--panel-soft);
  color: var(--text);
}
.top-title { min-width: 0; }
.top-title h1 {
  overflow-wrap: anywhere;
}
.top-search input:focus {
  outline: 2px solid rgba(15, 159, 142, .18);
  border-color: var(--brand-line);
  background: var(--panel);
}

.user-chip,
.pill {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.user-chip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill strong { color: var(--text); }

.icon-pill {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text-2);
  cursor: pointer;
}
.icon-pill:hover { background: var(--panel-strong); color: var(--text); }
.icon-pill:focus-visible {
  outline: 3px solid rgba(15, 159, 142, .22);
  outline-offset: 2px;
}
.icon-pill svg,
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--panel);
  box-sizing: content-box;
}
.theme-toggle .theme-icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 8px;
  padding: 9px 13px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--ink-hover); }

.notification-menu { position: relative; }
.notification-menu summary {
  list-style: none;
  cursor: pointer;
}
.notification-menu summary::-webkit-details-marker { display: none; }
.notification-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(340px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 20;
}
.notification-popover a {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
}
.notification-popover a:hover,
.notification-popover a.unread {
  background: var(--brand-soft);
}
.notification-popover small { color: var(--muted); }
.popover-link {
  text-align: center;
  color: var(--brand-text);
  font-weight: 700;
}

.messages { padding: 18px 28px 0; }
.messages.inline {
  padding: 0;
  display: grid;
  gap: 8px;
}
.message {
  position: relative;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.message.success {
  border-color: var(--success-line);
  background: var(--success-soft);
  color: var(--success-text);
}
.message.error {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger-text);
}
.message.warning {
  border-color: var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning-text);
}
.message.info {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-text);
}

.stats-grid,
.content-grid,
.panel,
.tabs {
  margin: 22px 28px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card,
.panel,
.lesson-card,
.shop-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.stat-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -42px auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(15, 159, 142, .08);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--brand-line);
}
.stat-card span { color: var(--muted); }
.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stat-card-head span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.stat-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-text) !important;
  font-weight: 800;
  flex: 0 0 auto;
}
.stat-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 29px;
  letter-spacing: -.01em;
  position: relative;
  z-index: 1;
}
.stat-card small,
.muted { color: var(--muted); }

.content-grid {
  display: grid;
  gap: 18px;
}
.content-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid.two:has(.data-table) { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); }
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel {
  padding: 18px;
  overflow: visible;
}
.panel:hover {
  box-shadow: 0 2px 8px rgba(16, 24, 40, .04);
}
.panel.narrow { max-width: 760px; }
.panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}
.panel p { line-height: 1.55; }
.panel > :last-child { margin-bottom: 0; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 { margin-bottom: 4px; }
.setup-panel {
  margin-bottom: 18px;
}
.setup-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.setup-item {
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.setup-item:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  transform: translateY(-1px);
  text-decoration: none !important;
}
.setup-item.done {
  border-color: var(--success-line);
  background: var(--success-bg);
}
.setup-status {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--brand-text);
  font-weight: 800;
  flex: 0 0 auto;
}
.setup-item.done .setup-status {
  border-color: var(--success-line);
  color: var(--success);
}
.setup-item strong,
.setup-item small {
  display: block;
  min-width: 0;
}
.setup-item small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}
.row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.row-actions a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text-2);
  background: var(--panel);
  font-size: 13px;
  font-weight: 650;
}
.row-actions a:not(.btn):hover {
  border-color: var(--brand-line);
  color: var(--brand-text);
  background: var(--brand-soft);
}
.row-actions a.danger-link:not(.btn) {
  color: var(--danger);
}
.row-actions a.danger-link:not(.btn):hover {
  background: var(--danger-soft);
  border-color: var(--danger-line);
}

.list {
  display: grid;
  gap: 8px;
}
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  min-width: 0;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.list-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.list-row small {
  color: var(--muted);
  text-align: right;
}
.list-row:hover,
.unread-row {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}
a.list-row:hover {
  transform: translateY(-1px);
}
.empty {
  position: relative;
  color: var(--muted);
  text-align: center;
  padding: 26px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
}
.empty::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, var(--brand-line), var(--line)) border-box;
  border: 1px solid transparent;
}
.empty.compact {
  padding: 10px;
  margin: 0;
  border: 0;
  background: transparent;
}
.empty.compact::before { display: none; }

.panel a:not(.btn):not(.list-row):not(.badge):not(.brand),
.data-table a:not(.btn) {
  color: var(--brand-text);
  font-weight: 650;
}
.panel a:not(.btn):not(.list-row):not(.badge):not(.brand):hover,
.data-table a:not(.btn):hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.tabs a {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
}
.tabs a.active {
  color: var(--brand-text);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.data-table caption {
  text-align: left;
  padding-bottom: 10px;
  color: var(--muted);
}
.data-table th,
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  background: var(--panel-soft);
  font-weight: 700;
  color: var(--text-2);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover,
.data-table tbody tr:hover { background: var(--panel-soft); }
.data-table tr.exam-row {
  background: var(--warning-bg);
}
.data-table tr.exam-row:hover {
  background: var(--warning-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  background: var(--panel-strong);
  color: var(--text-3);
  white-space: nowrap;
}
.badge.success { background: var(--success-soft); color: var(--success-text); }
.badge.warning { background: var(--warning-soft); color: var(--warning-text); }
.badge.danger { background: var(--danger-soft); color: var(--danger-text); }
.badge.muted { background: var(--panel-strong); color: var(--muted); }
.danger-link { color: var(--danger); }

.chart-bars {
  display: grid;
  gap: 12px;
}
.chart-row {
  display: grid;
  gap: 6px;
}
.chart-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-size: 13px;
}
.chart-meta small { color: var(--muted); }
.chart-track {
  height: 9px;
  border-radius: 999px;
  background: var(--panel-strong);
  overflow: hidden;
}
.chart-track span {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #35c7b4);
}

.form-grid {
  display: grid;
  gap: 12px;
}
.form-grid p {
  display: grid;
  gap: 6px;
  margin: 0;
}
.form-grid p:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.form-grid label {
  color: var(--text-2);
  font-weight: 600;
}
.form-grid .helptext {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.form-grid .errorlist,
.errorlist {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger-text);
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.signature-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
  margin-bottom: 14px;
}
.signature-preview p {
  margin: 4px 0 0;
}
.signature-preview img {
  width: 190px;
  height: 86px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
}
.signature-editor {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}
.signature-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.signature-editor-head p {
  margin: 4px 0 0;
}
.signature-editor-head img {
  width: 210px;
  height: 92px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
  flex: 0 0 auto;
}
.signature-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  flex-wrap: wrap;
}
.signature-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text-3);
  font-weight: 700;
}
.signature-tab input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.signature-tab.active {
  background: var(--brand-soft);
  color: var(--brand-text);
}
.signature-pane {
  display: grid;
  gap: 8px;
}
.signature-pane[hidden] {
  display: none;
}
.signature-canvas-wrap {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, var(--line), var(--brand-line)) border-box;
  padding: 10px;
}
.signature-canvas {
  display: block;
  width: 100%;
  height: 220px;
  border-radius: 7px;
  background: var(--panel);
  touch-action: none;
  cursor: crosshair;
}
.signature-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.message.compact {
  margin: 0;
  padding: 10px 12px;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.guide-hero > div,
.guide-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.guide-hero h2 {
  margin: 8px 0 10px;
  font-size: 30px;
}
.guide-hero p,
.guide-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.quick-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text-2);
  padding: 8px 12px;
  font-weight: 700;
}
.quick-link:hover {
  border-color: var(--brand);
  color: var(--brand-text);
}
.guide-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--text-2);
  line-height: 1.55;
}
.guide-mini-list {
  display: grid;
  gap: 10px;
}
.guide-mini-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}
.guide-mini-list summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text-2);
}
.guide-mini-list ul,
.guide-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 9px;
  color: var(--text-2);
  line-height: 1.55;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.guide-card h2 {
  margin-bottom: 8px;
}

.video-lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: start;
}
.video-panel {
  overflow: hidden;
}
.video-player-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
  overflow: hidden;
  min-height: 340px;
  display: grid;
  place-items: center;
}
.video-player-shell video {
  width: 100%;
  max-height: 580px;
  display: block;
  background: #0b1220;
}
.video-placeholder {
  text-align: center;
  color: #fff;
  padding: 34px;
}
.video-placeholder p {
  color: #cbd5e1;
  margin: 8px 0 18px;
}
.lesson-description {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}
.lesson-description h3 {
  margin: 0 0 8px;
}
.lesson-description p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
}
.lesson-info-grid {
  grid-template-columns: 1fr;
}
.lesson-action-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.video-mini-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
  display: grid;
  gap: 10px;
}
.video-mini-card video {
  width: 100%;
  max-height: 260px;
  border-radius: 8px;
  background: #0b1220;
}
.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
  min-height: 42px;
  color: var(--text);
  outline: none;
}
input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
  color: var(--muted);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
select[multiple] {
  min-height: 132px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 159, 142, .14);
}
input[type="file"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 159, 142, .14);
}
textarea {
  min-height: 110px;
  resize: vertical;
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.filters .form-control { max-width: 280px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.compact-input {
  width: 110px !important;
  min-width: 90px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  min-height: 40px;
  font-weight: 650;
}
.btn:hover { background: var(--panel-soft); }
.btn:focus-visible,
.icon-btn:focus-visible,
.side-nav a:focus-visible,
.tabs a:focus-visible,
.list-row:focus-visible {
  outline: 3px solid rgba(15, 159, 142, .22);
  outline-offset: 2px;
}
.btn[disabled],
.btn.disabled {
  opacity: .58;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.compact-copy {
  margin-top: 8px;
  min-height: 36px;
  padding: 8px 12px;
}
.btn.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.btn.ghost { background: var(--panel-soft); }
.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn.full {
  width: 100%;
  margin-top: 10px;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.shop-card {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.shop-card:hover,
.lesson-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-soft);
}
.shop-image {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-soft-2), var(--panel-soft));
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  color: var(--brand-text);
}
.shop-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-card h3,
.lesson-card h3 {
  margin: 0;
}
.shop-card p,
.lesson-card p {
  margin: 0;
  color: var(--muted);
}
.shop-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.lesson-list {
  display: grid;
  gap: 14px;
}
.lesson-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}
.timeline-item strong {
  display: inline-block;
  margin-right: 8px;
}
.timeline-item small { color: var(--muted); }
.timeline-item p {
  margin: 8px 0 0;
}
.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.exam-form {
  display: grid;
  gap: 14px;
}
.question-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}
.question-card:focus-within {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px rgba(15, 159, 142, .08);
}
.question-card legend {
  padding: 0 6px;
  font-weight: 750;
}
.question-card label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  color: var(--text-2);
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.question-card label:hover {
  border-color: var(--line);
  background: var(--panel);
}
.question-card input {
  width: auto;
  min-height: auto;
  margin: 2px 0 0;
}
.result-box {
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: var(--brand-soft);
  padding: 16px;
  margin-top: 14px;
  display: grid;
  gap: 4px;
}
.result-box span { color: var(--brand-text); }
.result-box strong { font-size: 28px; }
.salary-hero .result-box {
  margin-bottom: 14px;
}

.workflow-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.workflow-steps span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text-2);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 650;
}
.lesson-number {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text-2);
  font-weight: 800;
}
.exam-row .lesson-number {
  background: var(--warning-soft);
  color: var(--warning-text);
}
.exam-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.exam-meta div,
.assignment-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}
.exam-meta span,
.assignment-box strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}
.exam-meta strong {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}
.assignment-box {
  margin: 14px 0;
}
.assignment-box p {
  margin: 6px 0 0;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(15, 159, 142, .16), transparent 34%),
    var(--bg);
}
.login-page {
  width: min(980px, calc(100vw - 32px));
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.login-visual {
  background: var(--panel-soft);
  display: grid;
  place-items: center;
  padding: 34px;
  border-right: 1px solid var(--line);
}
.visual-card { max-width: 360px; }
.visual-card h2 {
  font-size: 34px;
  margin: 22px 0 10px;
  letter-spacing: -.02em;
}
.visual-card p {
  color: var(--muted);
  line-height: 1.6;
}
.login-card {
  padding: 64px 42px;
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 32px;
}
.login-card form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.login-card label { color: var(--muted); }
.login-card input {
  border-color: var(--line-strong);
}
.login-card .message { margin-top: 14px; }

.danger-zone {
  border-color: var(--danger-line);
  background: linear-gradient(180deg, var(--panel), var(--danger-bg));
}
.danger-zone h2 { color: var(--danger-text); }
.danger-zone .muted {
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.print-sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lesson-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.plan-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.plan-chip span {
  color: var(--text);
  font-weight: 750;
}

.plan-chip small {
  color: var(--muted);
}

.plan-chip.done {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--text);
  font-weight: 700;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.schedule-item:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.schedule-date {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.schedule-date strong {
  font-size: 22px;
  line-height: 1;
}

.schedule-date span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.schedule-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.schedule-item p {
  margin: 0;
  color: var(--muted);
}

.attendance-qr-card,
.backup-box {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
  margin-bottom: 16px;
}

.attendance-qr-card > div:last-child {
  flex: 1;
  min-width: 0;
}

.attendance-qr-card p {
  margin: 4px 0 12px;
}

.attendance-qr-image {
  width: 154px;
  height: 154px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  flex: 0 0 auto;
}

.attendance-qr-image img {
  width: 132px;
  height: 132px;
  display: block;
}

.backup-box {
  align-items: flex-start;
  display: grid;
}

.backup-box ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--text-2);
}

.security-list {
  display: grid;
  gap: 10px;
}

.security-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.security-item.done {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.security-item.warning {
  border-color: var(--warning-line);
  background: var(--warning-bg);
}

.security-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--warning);
}

.security-item.done .security-dot {
  background: var(--success);
}

.security-item strong,
.security-item small {
  display: block;
  min-width: 0;
}

.security-item small {
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar {
    display: none;
  }
  .topbar {
    align-items: stretch;
    flex-direction: column;
    position: sticky;
  }
  .mobile-menu {
    display: block;
    position: relative;
  }
  .mobile-menu summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 13px;
    background: var(--ink);
    color: var(--on-ink);
    font-weight: 800;
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
  }
  .mobile-menu[open] summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
  }
  .mobile-menu-panel {
    position: absolute;
    inset: calc(100% + 8px) 0 auto 0;
    z-index: 30;
    max-height: min(70vh, 620px);
    overflow-y: auto;
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 12px;
  }
  .mobile-menu-group {
    display: grid;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu-group:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .mobile-menu-group p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .mobile-menu-group a {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 11px 12px;
    background: var(--panel-soft);
    color: var(--text-2);
    font-weight: 650;
  }
  .mobile-menu-group a.active,
  .mobile-menu-group a:hover {
    background: var(--brand-soft);
    color: var(--brand-text);
    text-decoration: none;
  }
  .top-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .top-search {
    flex: 1 1 220px;
  }
  .top-search input {
    width: 100%;
  }
  .stats-grid,
  .content-grid.two,
  .content-grid.three,
  .guide-hero,
  .guide-grid,
  .video-lesson-hero,
  .setup-list,
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .comment-form { grid-template-columns: 1fr; }
  .exam-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }
  .topbar,
  .messages,
  .guide-hero,
  .guide-grid,
  .video-lesson-hero,
  .stats-grid,
  .content-grid,
  .panel,
  .tabs {
    margin-left: 14px;
    margin-right: 14px;
  }
  .topbar {
    padding: 14px;
    margin: 0;
    gap: 12px;
  }
  .topbar h1 {
    font-size: 20px;
  }
  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .notification-menu,
  .top-actions > form,
  .top-actions .pill,
  .user-chip,
  .icon-btn {
    width: 100%;
  }
  .notification-menu summary,
  .user-chip,
  .icon-btn {
    justify-content: center;
    text-align: center;
  }
  .notification-popover {
    left: 0;
    right: auto;
    width: 100%;
  }
  .stats-grid,
  .content-grid,
  .tabs {
    gap: 12px;
  }
  .stat-card,
  .panel {
    padding: 14px;
  }
  .stat-card strong {
    font-size: 24px;
  }
  .setup-item,
  .list-row,
  .security-item {
    padding: 11px;
  }
  .security-item {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .security-item .badge {
    grid-column: 2;
    width: fit-content;
  }
  .row-actions {
    justify-content: stretch;
    width: 100%;
  }
  .row-actions .btn,
  .row-actions a:not(.btn),
  .form-actions .btn,
  .form-actions button,
  .filters .btn {
    justify-content: center;
    width: 100%;
  }
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    max-width: 100%;
  }
  .data-table th,
  .data-table td {
    padding: 10px;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .filters .form-control {
    max-width: 100%;
  }
  .form-grid {
    gap: 10px;
  }
  .form-grid p:has(input[type="checkbox"]) {
    align-items: flex-start;
  }
  input,
  select,
  textarea,
  .form-control {
    max-width: 100%;
    min-width: 0;
  }
  .list-row {
    flex-direction: column;
  }
  .list-row small { text-align: left; }
  .panel-head {
    flex-direction: column;
  }
  .exam-meta { grid-template-columns: 1fr; }
  .schedule-item {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .video-player-shell {
    min-height: 220px;
  }
  .attendance-qr-card {
    align-items: stretch;
    flex-direction: column;
  }
  .attendance-qr-image {
    width: 100%;
    height: auto;
    min-height: 176px;
  }
  .backup-box {
    gap: 12px;
  }
  .quick-link-grid {
    grid-template-columns: 1fr;
  }
  .video-panel {
    padding: 12px;
  }
  .signature-editor-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .signature-editor-head img {
    width: 100%;
  }
  .signature-canvas {
    height: 180px;
  }
}

@media (max-width: 430px) {
  .topbar,
  .messages,
  .guide-hero,
  .guide-grid,
  .video-lesson-hero,
  .stats-grid,
  .content-grid,
  .panel,
  .tabs {
    margin-left: 10px;
    margin-right: 10px;
  }
  .panel-head h2,
  .panel h2 {
    font-size: 16px;
  }
  .brand-mark.big {
    width: 58px;
    height: 58px;
  }
  .exam-meta,
  .quick-link-grid {
    gap: 8px;
  }
  .mobile-menu-panel {
    max-height: 76vh;
  }
}

/* ===================================================================
   v2: kartochkalar, bosh sahifa va telefon ko'rinishi
   =================================================================== */

/* --- Faqat telefonda ko'rinadigan elementlar (kompyuterda yashirin) --- */
.nav-toggle,
.drawer-close,
.drawer-profile,
.drawer-search,
.drawer-logout,
.nav-backdrop,
.bottom-nav { display: none; }
.sidebar-top { display: block; }
.icon-pill.nav-toggle svg,
.icon-pill.drawer-close svg { width: 20px; height: 20px; }

/* --- Statistika kartochkalari --- */
.tone-brand   { --tone: var(--brand-text);   --tone-soft: var(--brand-soft); }
.tone-success { --tone: var(--success-text); --tone-soft: var(--success-soft); }
.tone-info    { --tone: var(--info-text);    --tone-soft: var(--info-soft); }
.tone-violet  { --tone: var(--violet-text);  --tone-soft: var(--violet-soft); }
.tone-warning { --tone: var(--warning-text); --tone-soft: var(--warning-soft); }
.tone-danger  { --tone: var(--danger-text);  --tone-soft: var(--danger-soft); }
.tone-calm    { --tone: var(--muted);        --tone-soft: var(--panel-strong); }

.stats-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}
a.stat-card { cursor: pointer; }
.stat-card::after {
  inset: auto -30px -50px auto;
  width: 120px;
  height: 120px;
  background: var(--tone-soft, var(--brand-soft));
  opacity: .55;
}
.stat-card:hover { border-color: var(--tone, var(--brand-line)); }
.stat-card-head { justify-content: flex-start; gap: 10px; position: relative; z-index: 1; }
.stat-card-head .stat-label { color: var(--text-3); font-weight: 650; font-size: 14px; }
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--tone-soft, var(--brand-soft));
  color: var(--tone, var(--brand-text)) !important;
}
.stat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stat-card strong.stat-value {
  margin: 12px 0 2px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tone-danger strong.stat-value { color: var(--danger-text); }
.stat-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.stat-foot small { color: var(--muted); }
.trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.trend.up { background: var(--success-soft); color: var(--success-text) !important; }
.trend.down { background: var(--danger-soft); color: var(--danger-text) !important; }
.trend.flat { background: var(--panel-strong); color: var(--muted) !important; }

/* --- Bosh sahifa: salomlashish va tezkor amallar --- */
.dash-hero {
  margin: 22px 28px 0;
  padding: 22px 24px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .18), transparent 40%),
    linear-gradient(135deg, #0f9f8e 0%, #0b7d8f 55%, #155e75 100%);
  box-shadow: 0 18px 40px rgba(15, 159, 142, .22);
}
.dash-hero h2 { margin: 2px 0 4px; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.01em; }
.dash-hero p { margin: 0; opacity: .9; }
.dash-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75 !important; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.quick-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px 10px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s ease, transform .15s ease;
}
.quick-action:hover { background: rgba(255, 255, 255, .24); transform: translateY(-1px); }
.quick-action:focus-visible { outline: 3px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.quick-action-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .95);
  color: #0b7d8f;
}
.quick-action-icon svg,
.empty-state svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-grid {
  margin: 22px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
}
.dash-grid > .panel { margin: 0; border-radius: 14px; }
.dash-total { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Ustunli grafik */
.column-chart {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding-top: 8px;
}
.column {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}
.column-value {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-height: 14px;
}
.column-bar {
  align-self: end;
  width: min(46px, 100%);
  height: max(var(--h), 4px);
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--brand-line), var(--brand-soft));
  transition: height .4s ease;
}
.column.current .column-bar { background: linear-gradient(180deg, #2dd4bf, var(--brand)); }
.column-label { font-size: 12px; font-weight: 700; color: var(--text-3); }
.column.current .column-label { color: var(--brand-text); }

/* Bugungi darslar */
.timeline { display: grid; gap: 8px; }
.timeline-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.timeline-time {
  font-weight: 800;
  color: var(--brand-text);
  font-variant-numeric: tabular-nums;
}
.timeline-body { display: grid; min-width: 0; }
.timeline-body small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ro'yxat qatorlari: chapda matn, o'ngda qiymat */
.list-row.with-meta { align-items: center; }
.list-row.with-meta > span:first-child { display: grid; gap: 2px; min-width: 0; }
.list-row.with-meta > span:first-child small { text-align: left; }
.amount {
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.amount.danger { color: var(--danger-text); }
.amount.warning { color: var(--warning-text); }

/* Bo'sh holat: tushuntirish va harakat tugmasi */
.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}
.empty-state svg {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-text);
  box-sizing: border-box;
}
.empty-state p { margin: 0; }

/* Yig'iladigan checklist */
details.setup-panel > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
details.setup-panel > summary::-webkit-details-marker { display: none; }
details.setup-panel[open] > summary { margin-bottom: 14px; }
.progress-ring {
  --p: 0;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-text);
  background:
    radial-gradient(closest-side, var(--panel) 76%, transparent 78%),
    conic-gradient(var(--brand) calc(var(--p) * 1%), var(--panel-strong) 0);
}

.panel { border-radius: 14px; }

@media (max-width: 1180px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   Telefon va planshet (980px dan kichik)
   =================================================================== */
@media (max-width: 980px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* Chapdan chiqadigan menyu */
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(320px, 86vw);
    height: 100dvh;
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
    background: var(--panel);
    border-right: 1px solid var(--line);
    box-shadow: 0 0 60px rgba(0, 0, 0, .25);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    transition: transform .25s ease;
  }
  body.nav-open { overflow: hidden; }
  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(2, 6, 23, .5);
    backdrop-filter: blur(2px);
  }
  .sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }
  .sidebar-top .brand { border-bottom: 0; padding: 0 4px; margin: 0; }
  .drawer-close { display: inline-grid; flex: 0 0 auto; }
  .drawer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 4px 10px;
    padding: 12px;
    border-radius: 14px;
    background: var(--brand-soft);
  }
  .drawer-profile strong { display: block; }
  .drawer-profile small { color: var(--brand-text); font-weight: 650; }
  .avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 17px;
  }
  .drawer-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px 6px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--muted);
  }
  .drawer-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .drawer-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 12px 0;
    color: var(--text);
    font-size: 16px;
  }
  .drawer-search input:focus { outline: none; }
  .side-nav { flex: 1; overflow-y: auto; }
  .side-nav a { padding: 12px; font-size: 15px; }
  .side-nav a.active::before { display: none; }
  .drawer-logout { display: block; border-top: 1px solid var(--line); padding-top: 10px; }
  .drawer-logout button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--danger-text);
    font-weight: 700;
    cursor: pointer;
  }
  .drawer-logout button:hover { background: var(--danger-bg); }
  .drawer-logout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* Ixcham yuqori panel: menyu tugmasi, sarlavha, tema, bildirishnoma */
  .topbar {
    flex-direction: row;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top));
    gap: 10px;
  }
  .nav-toggle { display: inline-grid; flex: 0 0 auto; }
  .top-title { flex: 1; min-width: 0; }
  .top-title h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
  }
  .top-title p { font-size: 12px; margin-top: 2px; }
  .top-actions {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    gap: 8px;
  }
  .top-search,
  .user-chip,
  .top-logout { display: none; }
  .notification-menu { width: auto; }
  .notification-menu summary.icon-pill { width: 40px; }
  .notification-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(64px + env(safe-area-inset-top));
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* Pastki menyu (ilovadagidek) */
  .bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--panel-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a,
  .bottom-nav button {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 7px 2px 5px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .bottom-nav a.active { color: var(--brand-text); }
  .bottom-nav a.active svg {
    background: var(--brand-soft);
    border-radius: 999px;
    padding: 3px 14px;
    width: 52px;
    height: 29px;
    box-sizing: border-box;
    margin: -3px 0;
  }

  /* Kontent */
  .dash-hero { margin: 14px 14px 0; padding: 18px; border-radius: 18px; }
  .quick-actions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -2px;
    padding: 2px;
    scroll-snap-type: x mandatory;
  }
  .quick-actions::-webkit-scrollbar { display: none; }
  .quick-action { scroll-snap-align: start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { margin: 14px; gap: 12px; }
  .content-grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { margin: 0; padding-left: 12px; padding-right: 12px; }
  .top-actions { display: flex; }
  .notification-menu,
  .icon-btn { width: auto; }
  .notification-menu summary.icon-pill { width: 40px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; border-radius: 16px; }
  .stat-card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stat-card-head .stat-label { font-size: 13px; }
  .stat-card strong.stat-value { font-size: 21px; margin-top: 6px; }
  .stat-foot small { font-size: 11.5px; line-height: 1.35; }
  .panel { border-radius: 16px; }
  .panel-head { flex-direction: row; align-items: center; }
  .list-row.with-meta { flex-direction: row; }
  .dash-hero h2 { font-size: 21px; }
  .column-chart { height: 170px; gap: 8px; }
  .column-value { display: none; }
  .timeline-row { grid-template-columns: 48px minmax(0, 1fr); }
  .timeline-row .badge { grid-column: 2; width: fit-content; }
  input, select, textarea, .form-control { font-size: 16px; }
}

@media (max-width: 330px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card-head { flex-direction: row; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .stat-card, .quick-action, .column-bar, .nav-chevron { transition: none !important; }
}

/* Kichik tugma (ro'yxat qatori ichida) va tezkor amal hisoblagichi */
.btn.compact-btn { min-height: 0; padding: 7px 12px; font-size: 13px; }
.quick-action-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  color: #0b7d8f;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

/* ===================================================================
   v3: LIQUID GLASS (iOS 26 uslubi) va animatsiyalar
   Shisha qatlam: shaffof fon + orqani xiralashtirish + qirradagi yorug'lik.
   Shisha faqat navigatsiya, kartochka va tugmalarda — matn o'qilishi uchun.
   =================================================================== */

@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --shine { syntax: '<percentage>'; inherits: false; initial-value: -60%; }

:root {
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --radius-glass: 22px;
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-bg-strong: rgba(255, 255, 255, .78);
  --glass-bg-soft: rgba(255, 255, 255, .38);
  --glass-border: rgba(255, 255, 255, .75);
  --glass-edge: rgba(15, 23, 42, .07);
  --glass-highlight: rgba(255, 255, 255, .95);
  --glass-specular: rgba(255, 255, 255, .55);
  --glass-shadow: 0 1px 1px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .08), 0 30px 60px -30px rgba(15, 23, 42, .18);
  --glass-shadow-lift: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 44px rgba(15, 23, 42, .14), 0 40px 80px -36px rgba(15, 159, 142, .35);
  --glass-blur: blur(22px) saturate(180%);
  --ambient-1: rgba(45, 212, 191, .38);
  --ambient-2: rgba(56, 189, 248, .30);
  --ambient-3: rgba(167, 139, 250, .26);
  --ambient-4: rgba(251, 191, 36, .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glass-bg: rgba(20, 28, 46, .55);
    --glass-bg-strong: rgba(20, 28, 46, .78);
    --glass-bg-soft: rgba(255, 255, 255, .05);
    --glass-border: rgba(255, 255, 255, .13);
    --glass-edge: rgba(0, 0, 0, .35);
    --glass-highlight: rgba(255, 255, 255, .22);
    --glass-specular: rgba(255, 255, 255, .12);
    --glass-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .35), 0 30px 60px -30px rgba(0, 0, 0, .6);
    --glass-shadow-lift: 0 2px 4px rgba(0, 0, 0, .25), 0 20px 48px rgba(0, 0, 0, .45), 0 40px 90px -36px rgba(45, 212, 191, .35);
    --ambient-1: rgba(20, 184, 166, .30);
    --ambient-2: rgba(14, 116, 144, .34);
    --ambient-3: rgba(124, 58, 237, .26);
    --ambient-4: rgba(217, 119, 6, .12);
  }
}
:root[data-theme="dark"] {
  --glass-bg: rgba(20, 28, 46, .55);
  --glass-bg-strong: rgba(20, 28, 46, .78);
  --glass-bg-soft: rgba(255, 255, 255, .05);
  --glass-border: rgba(255, 255, 255, .13);
  --glass-edge: rgba(0, 0, 0, .35);
  --glass-highlight: rgba(255, 255, 255, .22);
  --glass-specular: rgba(255, 255, 255, .12);
  --glass-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .35), 0 30px 60px -30px rgba(0, 0, 0, .6);
  --glass-shadow-lift: 0 2px 4px rgba(0, 0, 0, .25), 0 20px 48px rgba(0, 0, 0, .45), 0 40px 90px -36px rgba(45, 212, 191, .35);
  --ambient-1: rgba(20, 184, 166, .30);
  --ambient-2: rgba(14, 116, 144, .34);
  --ambient-3: rgba(124, 58, 237, .26);
  --ambient-4: rgba(217, 119, 6, .12);
}

/* --- Tirik fon: shisha orqasida asta suzuvchi rangli dog'lar --- */
html { background: var(--bg); }
body { background: transparent; }
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
body::before {
  width: 62vmax;
  height: 62vmax;
  left: -18vmax;
  top: -22vmax;
  background:
    radial-gradient(circle at 30% 30%, var(--ambient-1), transparent 60%),
    radial-gradient(circle at 75% 65%, var(--ambient-3), transparent 55%);
  animation: ambient-drift-a 26s var(--ease-soft) infinite alternate;
}
body::after {
  width: 58vmax;
  height: 58vmax;
  right: -20vmax;
  bottom: -24vmax;
  background:
    radial-gradient(circle at 40% 40%, var(--ambient-2), transparent 60%),
    radial-gradient(circle at 70% 30%, var(--ambient-4), transparent 55%);
  animation: ambient-drift-b 32s var(--ease-soft) infinite alternate;
}
@keyframes ambient-drift-a {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(8vmax, 6vmax, 0) rotate(40deg) scale(1.08); }
  100% { transform: translate3d(14vmax, -2vmax, 0) rotate(80deg) scale(.96); }
}
@keyframes ambient-drift-b {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(-10vmax, -6vmax, 0) rotate(-30deg) scale(1.1); }
  100% { transform: translate3d(-4vmax, -12vmax, 0) rotate(-70deg) scale(.95); }
}

/* --- Shisha material (asosiy retsept) --- */
.sidebar,
.topbar,
.panel,
.stat-card,
.bottom-nav,
.notification-popover,
.login-page,
.icon-pill,
.btn,
.tabs,
.message,
.drawer-profile,
.user-chip {
  background-color: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 var(--glass-edge),
    var(--glass-shadow);
}
/* Kursorga ergashadigan yorug'lik aksi (JS --mx/--my ni beradi) */
.panel,
.stat-card,
.btn,
.icon-pill,
.quick-action,
.list-row {
  background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), var(--glass-specular), transparent 42%);
}
.btn.primary,
.btn.danger { background-image: none; }

/* --- Yon menyu: suzib turuvchi shisha panel --- */
.app-shell { padding: 0; }
.sidebar {
  margin: 12px 0 12px 12px;
  height: calc(100vh - 24px);
  top: 12px;
  border-radius: 26px;
  padding: 16px 12px;
}
.brand { border-bottom-color: var(--glass-border); }
.brand-mark {
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(15, 159, 142, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .5s var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.side-nav-group { border-bottom-color: var(--glass-border); }
.side-nav a {
  border-radius: 12px;
  transition: background-color .25s var(--ease-soft), color .2s ease, transform .35s var(--ease-spring);
}
.side-nav a:hover { background-color: var(--glass-bg-soft); }
.side-nav a .nav-icon { transition: transform .4s var(--ease-spring); }
.side-nav a:hover .nav-icon { transform: scale(1.15) rotate(-6deg); }
.side-nav a.active,
.side-nav a.active:hover {
  background: transparent;
  box-shadow: none;
  font-weight: inherit;
}
.side-nav a.active::before { display: none; }

/* Guruhlarning silliq ochilishi */
.side-nav-group::details-content {
  block-size: 0;
  overflow: clip;
  opacity: 0;
  transition: block-size .38s var(--ease-out), opacity .3s ease, content-visibility .38s allow-discrete;
}
.side-nav-group[open]::details-content { block-size: auto; opacity: 1; }
:root { interpolate-size: allow-keywords; }
.side-nav-group[open] .side-nav-items a { animation: slide-in-left .45s var(--ease-out) backwards; }
.side-nav-group[open] .side-nav-items a:nth-child(2) { animation-delay: .03s; }
.side-nav-group[open] .side-nav-items a:nth-child(3) { animation-delay: .06s; }
.side-nav-group[open] .side-nav-items a:nth-child(4) { animation-delay: .09s; }
.side-nav-group[open] .side-nav-items a:nth-child(5) { animation-delay: .12s; }
.side-nav-group[open] .side-nav-items a:nth-child(n+6) { animation-delay: .15s; }
.nav-chevron { transition: transform .4s var(--ease-spring); }

/* --- Yuqori panel: suzib turuvchi asboblar paneli --- */
.topbar {
  margin: 12px 12px 0;
  border-radius: 22px;
  top: 12px;
  transition: box-shadow .3s ease, background-color .3s ease, padding .3s var(--ease-out);
}
body.scrolled .topbar {
  background-color: var(--glass-bg-strong);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-lift);
}
.top-search input {
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  transition: width .45s var(--ease-spring), box-shadow .25s ease, background-color .25s ease;
}
.top-search input:focus {
  width: min(340px, 40vw);
  background: var(--glass-bg-strong);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .18);
}
.user-chip { color: var(--text-2); }

/* Dumaloq shisha tugmalar */
.icon-pill {
  transition: transform .4s var(--ease-spring), background-color .2s ease, box-shadow .25s ease;
}
.icon-pill:hover { transform: translateY(-1px) scale(1.06); box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-lift); }
.icon-pill:active { transform: scale(.9); }
.theme-toggle svg { transition: transform .6s var(--ease-spring); }
.theme-toggle:hover svg { transform: rotate(40deg); }
.notification-menu summary.has-unread svg { animation: bell-ring 2.4s ease-in-out 1s 2; transform-origin: 50% 10%; }
.count-badge { animation: badge-pop .5s var(--ease-spring) both, badge-pulse 2.4s ease-out 1.2s infinite; }
@keyframes bell-ring {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(16deg); }
  20% { transform: rotate(-14deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-6deg); }
  50% { transform: rotate(3deg); }
}
@keyframes badge-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); }
}

/* Bildirishnoma oynasi: shisha, prujinali ochilish */
.notification-popover {
  background-color: var(--glass-bg-strong);
  border-radius: 20px;
  transform-origin: top right;
  animation: pop-in .38s var(--ease-spring) both;
}
.notification-popover a { border-radius: 12px; transition: background-color .2s ease, transform .3s var(--ease-spring); }
.notification-popover a:hover { transform: translateX(3px); }

/* --- Kartochkalar --- */
.panel,
.stat-card { border-radius: var(--radius-glass); }
.stat-card {
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-spring), box-shadow .35s ease, border-color .3s ease;
}
.stat-card:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-lift);
  border-color: var(--glass-border);
}
.stat-card:active { transform: scale(.97); }
.stat-card::after { filter: blur(6px); transition: transform .8s var(--ease-out); }
.stat-card:hover::after { transform: scale(1.25) translate(-6px, -6px); }
.stat-icon {
  border-radius: 13px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: transform .5s var(--ease-spring);
}
.stat-card:hover .stat-icon { transform: translateZ(20px) scale(1.1) rotate(-6deg); }
.panel { transition: box-shadow .35s ease, transform .5s var(--ease-spring); }
.panel:hover { box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-lift); }

.list-row {
  background-color: var(--glass-bg-soft);
  border-color: var(--glass-border);
  border-radius: 14px;
  transition: transform .4s var(--ease-spring), background-color .25s ease, border-color .25s ease, box-shadow .3s ease;
}
.list-row:hover,
.unread-row {
  background-color: var(--brand-soft);
  box-shadow: 0 8px 22px -12px rgba(15, 159, 142, .5);
}
a.list-row:hover { transform: translateX(4px); }
a.list-row:active { transform: scale(.98); }
.timeline-row,
.setup-item,
.exam-meta > div {
  background-color: var(--glass-bg-soft);
  border-color: var(--glass-border);
  border-radius: 14px;
}
.panel-head a:not(.btn) { display: inline-flex; align-items: center; gap: 4px; transition: gap .3s var(--ease-spring); }
.panel-head a:not(.btn)::after { content: "\2192"; transition: transform .3s var(--ease-spring); }
.panel-head a:not(.btn):hover::after { transform: translateX(3px); }

/* --- Tugmalar: shisha va "rangli shisha" (glassProminent) --- */
.btn {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  transition: transform .4s var(--ease-spring), box-shadow .3s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-lift); }
.btn:active { transform: scale(.95); }
.btn.primary {
  background: linear-gradient(135deg, #14b8a6, #0f9f8e 50%, #0e7490);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 6px rgba(0, 0, 0, .12), 0 10px 24px -8px rgba(15, 159, 142, .7);
}
.btn.primary:hover { background: linear-gradient(135deg, #2dd4bf, #14b8a6 50%, #0891b2); }
.btn.danger {
  background: linear-gradient(135deg, #f87171, #dc2626);
  border-color: rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 24px -8px rgba(220, 38, 38, .6);
}
.icon-btn {
  border-radius: 14px;
  transition: transform .4s var(--ease-spring), background-color .2s ease;
}
.icon-btn:active { transform: scale(.94); }

/* Bosilganda suyuqlik to'lqini */
.liquid-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
  animation: liquid-ripple .7s var(--ease-out) forwards;
}
@keyframes liquid-ripple {
  to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* --- Formalar --- */
.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="url"],
select,
textarea {
  border-radius: 14px;
  background-color: var(--glass-bg-strong);
  border-color: var(--glass-border);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06);
  transition: box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .2), inset 0 1px 2px rgba(15, 23, 42, .04);
}

/* --- Jadvallar --- */
.data-table { border-radius: 16px; overflow: hidden; }
.data-table tbody tr { transition: background-color .2s ease; }

/* --- Bosh sahifa salomlashish bloki: tirik suyuq gradient --- */
.dash-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .22), transparent 45%),
    linear-gradient(120deg, #0f9f8e, #0e7490, #6d28d9, #0f9f8e);
  background-size: 100% 100%, 300% 300%;
  animation: hero-flow 18s ease-in-out infinite;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .15), 0 24px 60px -20px rgba(15, 159, 142, .55);
}
.dash-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 45%, transparent 60%);
  background-position: var(--shine) 0;
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: hero-shine 6s ease-in-out 1s infinite;
}
.dash-hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -80px;
  top: -140px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 65%);
  animation: float-orb 9s ease-in-out infinite alternate;
}
@keyframes hero-flow {
  0%, 100% { background-position: 0 0, 0% 50%; }
  50% { background-position: 0 0, 100% 50%; }
}
@keyframes hero-shine {
  0% { --shine: -60%; }
  45%, 100% { --shine: 160%; }
}
@keyframes float-orb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-40px, 30px) scale(1.15); }
}
.dash-hero h2 .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.2s ease-in-out .6s 2; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
.quick-action {
  border-radius: 16px;
  background-color: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .45s var(--ease-spring), background-color .2s ease, box-shadow .3s ease;
}
.quick-action:hover { transform: translateY(-3px) scale(1.03); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 14px 30px -12px rgba(0, 0, 0, .45); }
.quick-action:active { transform: scale(.95); }
.quick-action-icon { border-radius: 11px; transition: transform .5s var(--ease-spring); }
.quick-action:hover .quick-action-icon { transform: rotate(-10deg) scale(1.1); }

/* Grafik ustunlari pastdan o'sib chiqadi */
.column-bar {
  transform-origin: bottom;
  animation: grow-up .9s var(--ease-spring) both;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.column:nth-child(1) .column-bar { animation-delay: .25s; }
.column:nth-child(2) .column-bar { animation-delay: .32s; }
.column:nth-child(3) .column-bar { animation-delay: .39s; }
.column:nth-child(4) .column-bar { animation-delay: .46s; }
.column:nth-child(5) .column-bar { animation-delay: .53s; }
.column:nth-child(6) .column-bar { animation-delay: .6s; }
.column:hover .column-bar { filter: brightness(1.15); }
.column.current .column-bar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 26px -8px rgba(45, 212, 191, .8); }
@keyframes grow-up { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-track span { transform-origin: left; animation: grow-right 1s var(--ease-out) .3s both; }
@keyframes grow-right { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Aylana progress: 0 dan qiymatigacha to'ladi */
.progress-ring { animation: ring-fill 1.4s var(--ease-out) .4s both; }
@keyframes ring-fill { from { --p: 0; } }

/* Trend belgisi */
.trend.up { animation: nudge-up 1.6s ease-in-out 1.2s 2; }
@keyframes nudge-up { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

/* --- Paydo bo'lish animatsiyalari --- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.92) translateY(-6px); } to { opacity: 1; transform: none; } }

.dash-hero { animation: rise-in .8s var(--ease-out) backwards, hero-flow 18s ease-in-out infinite; }
.stats-grid > * { animation: rise-in .7s var(--ease-out) backwards; animation-delay: calc(.08s + var(--i, 0) * 60ms); }
.dash-grid > *,
.content-grid > * { animation: rise-in .75s var(--ease-out) backwards; animation-delay: calc(.2s + var(--i, 0) * 80ms); }
.list > * { animation: slide-in-left .5s var(--ease-out) backwards; animation-delay: calc(.35s + var(--i, 0) * 40ms); }
/* Pastroqdagi bloklar ko'rinishga kirganda paydo bo'ladi (JS .reveal qo'shadi) */
.reveal-pending { opacity: 0; transform: translateY(24px); }
.reveal-in { animation: rise-in .8s var(--ease-out) backwards; }

/* Bo'sh holat ikonkasi suzadi */
.empty-state svg { animation: float-y 3.6s ease-in-out infinite; }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Xabarlar: sirg'alib kiradi va o'zi yo'qoladi */
.message {
  border-radius: 16px;
  animation: toast-in .55s var(--ease-spring) both;
}
.message.leaving { animation: toast-out .45s var(--ease-soft) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.97); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }

/* Fokus halqasi: yumshoq yorug'lik */
:focus-visible { outline-color: rgba(45, 212, 191, .55) !important; }

/* --- Kirish sahifasi --- */
.login-body { background: transparent; }
.login-page {
  border-radius: 30px;
  animation: rise-in .9s var(--ease-out) backwards;
}
.login-visual { background: var(--glass-bg-soft); border-right-color: var(--glass-border); }
.login-visual .brand-mark { animation: float-y 4s ease-in-out infinite; }

/* --- Sahifalar orasida silliq o'tish (View Transitions) --- */
@view-transition { navigation: auto; }
.main { view-transition-name: page; }
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
::view-transition-old(page) { animation: vt-out .22s var(--ease-soft) both; }
::view-transition-new(page) { animation: vt-in .38s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
/* Tema almashganda doira bo'lib yoyiladi */
html.theme-swapping::view-transition-old(root),
html.theme-swapping::view-transition-old(page) { animation: none; }
html.theme-swapping::view-transition-new(root),
html.theme-swapping::view-transition-new(page) {
  animation: theme-reveal .7s var(--ease-out) both;
}
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--tx, 90%) var(--ty, 5%)); }
  to { clip-path: circle(150vmax at var(--tx, 90%) var(--ty, 5%)); }
}

/* ===================================================================
   Telefon: suzuvchi shisha tab-menyu (iOS 26 dagidek)
   =================================================================== */
@media (max-width: 980px) {
  .topbar {
    margin: 8px 10px 0;
    top: 8px;
    border-radius: 22px;
    padding: 8px 10px;
    padding-top: 8px;
  }
  .sidebar {
    margin: 0;
    top: 0;
    inset: 8px auto 8px 8px;
    height: calc(100dvh - 16px);
    border-radius: 28px;
    background-color: var(--glass-bg-strong);
    transform: translateX(-110%) scale(.96);
    transition: transform .55s var(--ease-spring), visibility 0s linear .55s;
  }
  body.nav-open .sidebar {
    transform: none;
    transition: transform .55s var(--ease-spring);
  }
  .nav-backdrop:not([hidden]) { animation: fade-in .3s ease both; }
  @keyframes fade-in { from { opacity: 0; } }
  body.nav-open .side-nav-items a,
  body.nav-open .drawer-profile,
  body.nav-open .drawer-search { animation: slide-in-left .5s var(--ease-out) backwards; }
  body.nav-open .drawer-search { animation-delay: .05s; }

  .bottom-nav {
    inset: auto 12px calc(10px + env(safe-area-inset-bottom)) 12px;
    padding: 6px;
    border-radius: 30px;
    background-color: var(--glass-bg);
  }
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .bottom-nav a,
  .bottom-nav button {
    position: relative;
    border-radius: 24px;
    transition: transform .45s var(--ease-spring), color .2s ease;
  }
  .bottom-nav a:active,
  .bottom-nav button:active { transform: scale(.88); }
  .bottom-nav a > *,
  .bottom-nav button > * { position: relative; z-index: 1; }
  .bottom-nav a.active svg { background: none; padding: 0; width: 23px; height: 23px; margin: 0; }
  /* Faol tab ostidagi "suyuq tomchi" — sahifalar orasida oqib o'tadi */
  .bottom-nav a.active svg { animation: tab-bounce .6s var(--ease-spring) both; }
  @keyframes tab-bounce { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
  .dash-hero { border-radius: 26px; }
  .panel, .stat-card { border-radius: 22px; }
}

/* Shisha qo'llab-quvvatlanmasa: zich fon */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar, .topbar, .panel, .stat-card, .bottom-nav, .notification-popover, .login-page, .icon-pill, .btn, .tabs, .message {
    background-color: var(--panel);
  }
}

/* Harakatni kamaytirish sozlamasi: barcha animatsiyalar o'chadi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  body::before, body::after { animation: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

/* Chop etishda shisha va fon kerak emas */
@media print {
  body::before, body::after { display: none; }
  .sidebar, .topbar, .bottom-nav { display: none; }
}

/* To'lqin effekti uchun konteynerlar */
.quick-action,
.list-row,
.bottom-nav a,
.bottom-nav button { position: relative; overflow: hidden; }
.list-row .liquid-ripple,
.btn:not(.primary):not(.danger) .liquid-ripple { background: radial-gradient(circle, rgba(45, 212, 191, .35), rgba(45, 212, 191, 0) 70%); }

/* Uzun summalar kartochka kengligiga moslashadi */
.stat-card { container-type: inline-size; }
.stat-card strong.stat-value { font-size: clamp(18px, 12.5cqi, 28px); }
/* O'rta ekranlarda yuqori panel bir qatorda qoladi */
.top-title h1 { white-space: nowrap; }
.top-actions { flex-wrap: nowrap; }
@media (max-width: 1280px) {
  .user-chip { display: none; }
  .top-search input { width: min(200px, 22vw); }
}
/* Qidiruv maydoni kunduzgi rejimda ham aniq ko'rinadi */
.top-search input { border-color: var(--line); }
.top-search input::placeholder { color: var(--muted); }

/* Tezkor tugmalar qisqarmaydi: telefonda yonga suriladi */
.quick-action { flex: 0 0 auto; }

/* Sahifalar orasida o'tishda yuqoridagi yuklanish chizig'i */
.nav-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 3px;
  pointer-events: none;
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0;
  background: linear-gradient(90deg, #2dd4bf, #38bdf8, #a78bfa);
  box-shadow: 0 0 12px rgba(45, 212, 191, .7);
}
.nav-progress.done {
  transform: scaleX(1);
  opacity: 0;
  transition: transform .25s ease, opacity .35s ease .2s;
}
.nav-progress.active {
  opacity: 1;
  transition: opacity .1s ease;
  animation: nav-progress 2.4s cubic-bezier(.1, .7, .3, 1) forwards;
}
@keyframes nav-progress {
  0% { transform: scaleX(0); }
  40% { transform: scaleX(.6); }
  100% { transform: scaleX(.92); }
}
html.is-navigating .main { cursor: progress; }

/* ===================================================================
   Suzuvchi shisha tomchi (iOS 26 dagidek): faol bo'lim orqasidagi bitta
   umumiy indikator. Yozuvlar joyida qoladi, faqat tomchi siljiydi va
   harakat paytida suyuqlikdek cho'ziladi.
   =================================================================== */
.side-nav { position: relative; }
.side-nav a,
.bottom-nav a,
.bottom-nav button { z-index: 1; }
.nav-indicator {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
  transition:
    transform .55s cubic-bezier(.3, 1.35, .5, 1),
    width .45s var(--ease-out),
    height .45s var(--ease-out),
    opacity .25s ease;
  will-change: transform;
}
.nav-indicator::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .35), transparent 55%),
    linear-gradient(135deg, rgba(45, 212, 191, .30), rgba(14, 165, 233, .18));
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(15, 159, 142, .15),
    0 8px 22px -10px rgba(15, 159, 142, .65);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  backdrop-filter: blur(6px) saturate(160%);
}
.bottom-nav .nav-indicator::before { border-radius: 24px; }
.nav-indicator.no-anim { transition: none; }
.nav-indicator.hidden { opacity: 0; }
/* Harakat paytida: vertikal menyuda bo'yiga, tab-menyuda eniga cho'ziladi */
.nav-indicator.squish-y::before { animation: liquid-squish-y .6s var(--ease-out); }
.nav-indicator.squish-x::before { animation: liquid-squish-x .6s var(--ease-out); }
@keyframes liquid-squish-y {
  0% { transform: scale(1, 1); }
  30% { transform: scale(.94, 1.32); }
  62% { transform: scale(1.03, .92); }
  82% { transform: scale(.995, 1.02); }
  100% { transform: scale(1, 1); }
}
@keyframes liquid-squish-x {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.35, .9); }
  62% { transform: scale(.94, 1.04); }
  82% { transform: scale(1.02, .995); }
  100% { transform: scale(1, 1); }
}
.side-nav a,
.side-nav a .nav-icon { transition: color .35s ease, background-color .25s var(--ease-soft), transform .4s var(--ease-spring); }
@media (prefers-reduced-motion: reduce) {
  .nav-indicator { transition: opacity .2s ease; }
  .nav-indicator::before { animation: none !important; }
}

/* Tuzatish: to'lqin effekti doim tugma ustida "suzadi", joy egallamaydi
   (aks holda pastki menyu tabi cho'zilib, qolganlari siqilib qolardi). */
.bottom-nav a > .liquid-ripple,
.bottom-nav button > .liquid-ripple,
.liquid-ripple {
  position: absolute;
  z-index: 0;
  margin: 0;
}

/* Tuzatish: jadvalli sahifalarda (ro'yxat + forma) telefonda bloklar ustma-ust
   tushmasin — bitta ustunga o'tadi. */
@media (max-width: 980px) {
  .content-grid.two:has(.data-table) { grid-template-columns: minmax(0, 1fr); }
}

/* ===================================================================
   Telefonda jadval -> shisha kartochkalar
   (JS har bir katakka data-label va cell-* klasslarini beradi)
   =================================================================== */
@media (max-width: 720px) {
  table.data-table.stackable {
    display: block;
    overflow: visible;
    white-space: normal;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .data-table.stackable caption { display: block; text-align: left; }
  /* Sarlavhalar ko'rinmaydi, lekin ekran o'quvchilar uchun saqlanadi */
  .data-table.stackable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .data-table.stackable tbody {
    display: grid;
    gap: 12px;
  }
  .data-table.stackable tr {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px 10px;
    border-radius: 20px;
    background-color: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 var(--glass-edge), var(--glass-shadow);
    animation: rise-in .6s var(--ease-out) backwards;
    transition: transform .4s var(--ease-spring), box-shadow .3s ease;
  }
  .data-table.stackable tr:nth-child(2) { animation-delay: .05s; }
  .data-table.stackable tr:nth-child(3) { animation-delay: .1s; }
  .data-table.stackable tr:nth-child(4) { animation-delay: .15s; }
  .data-table.stackable tr:nth-child(5) { animation-delay: .2s; }
  .data-table.stackable tr:nth-child(n+6) { animation-delay: .25s; }
  .data-table.stackable tr:hover { background-color: var(--glass-bg); }
  .data-table.stackable tr.clickable { cursor: pointer; padding-right: 36px; }
  .data-table.stackable tr.clickable::after {
    content: "\203A";
    position: absolute;
    right: 16px;
    top: 14px;
    font-size: 22px;
    line-height: 1;
    color: var(--muted);
    transition: transform .3s var(--ease-spring);
  }
  .data-table.stackable tr.clickable:active { transform: scale(.98); }
  .data-table.stackable tr.clickable:hover::after { transform: translateX(3px); color: var(--brand-text); }
  .data-table.stackable tr.exam-row { border-color: var(--warning-line); }

  /* Oddiy katak: chapda nom, o'ngda qiymat */
  .data-table.stackable td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px dashed var(--line);
    text-align: right;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .data-table.stackable td:last-child { border-bottom: 0; }
  .data-table.stackable td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 46%;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 650;
    text-align: left;
  }
  .data-table.stackable td[data-label=""]::before { display: none; }

  /* Kartochka sarlavhasi (birinchi ustun) */
  .data-table.stackable td.cell-title {
    justify-content: flex-start;
    padding: 0 0 10px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    font-weight: 800;
    text-align: left;
    color: var(--text);
  }
  .data-table.stackable td.cell-title::before { display: none; }
  .data-table.stackable td.cell-title a { color: var(--text); }

  /* Reyting: o'rin raqami burchakda nishon bo'lib turadi */
  .data-table.stackable td.cell-rank {
    position: absolute;
    top: 12px;
    right: 14px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-text);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .data-table.stackable td.cell-rank::before { display: none; }
  .data-table.stackable tr:has(.cell-rank) .cell-title { padding-right: 48px; }
  .data-table.stackable tr:nth-child(1) .cell-rank { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #78350f; }
  .data-table.stackable tr:nth-child(2) .cell-rank { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; }
  .data-table.stackable tr:nth-child(3) .cell-rank { background: linear-gradient(135deg, #fed7aa, #c2410c); color: #fff; }

  /* Forma maydoni (select, izoh): nom tepada, maydon to'liq kenglikda */
  .data-table.stackable td.cell-field {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    text-align: left;
  }
  .data-table.stackable td.cell-field::before { max-width: none; }
  .data-table.stackable td.cell-field .form-control,
  .data-table.stackable td.cell-field input,
  .data-table.stackable td.cell-field select { width: 100%; max-width: none; }

  /* Amallar: pastda, yonma-yon shisha tugmalar */
  .data-table.stackable td.cell-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 8px;
    width: auto;
    padding: 12px 0 4px;
    border-bottom: 0;
  }
  .data-table.stackable td.cell-actions::before { display: none; }
  .data-table.stackable td.cell-actions > a,
  .data-table.stackable td.cell-actions > button,
  .data-table.stackable td.cell-actions .btn {
    flex: 1 1 calc(50% - 8px);
    width: auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background-color: var(--glass-bg-soft);
    color: var(--brand-text);
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: transform .35s var(--ease-spring), background-color .2s ease;
  }
  .data-table.stackable td.cell-actions > a:active,
  .data-table.stackable td.cell-actions > button:active { transform: scale(.95); }
  .data-table.stackable td.cell-actions .danger-link { color: var(--danger-text); }
  .data-table.stackable td.cell-actions form { flex: 1 1 100%; display: flex; gap: 8px; }
  .data-table.stackable td.cell-actions form .form-control,
  .data-table.stackable td.cell-actions form input:not([type="hidden"]) { flex: 1; min-width: 0; }

  /* Bo'sh holat qatori */
  .data-table.stackable td.cell-wide {
    display: block;
    padding: 18px 8px;
    border: 0;
    text-align: center;
    color: var(--muted);
  }
  .data-table.stackable tr:has(> td.cell-wide:only-child) {
    background-color: transparent;
    border-style: dashed;
    box-shadow: none;
  }
  .data-table.stackable td .badge { flex: 0 0 auto; }
}

/* Telefonda kartochkadagi "O'chirish" qizil; sarlavha + tugmalar tartibli */
@media (max-width: 720px) {
  .panel .data-table.stackable td.cell-actions a.danger-link { color: var(--danger-text); }
  .panel-head:has(> .row-actions) { flex-direction: column; align-items: stretch; gap: 10px; }
  .panel-head > .row-actions { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px; width: 100%; }
  .panel-head > .row-actions .btn { flex: 1 1 0; width: auto; }
}

/* Platforma brendi: "Ilmora platformasida" kichik yozuvi */
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .01em;
}
.powered-by img { width: 16px; height: 16px; border-radius: 5px; }
.sidebar .powered-by { margin: 8px 0 4px; }
@media (min-width: 981px) {
  .sidebar { display: flex; flex-direction: column; }
  .sidebar .side-nav { flex: 1; }
  .sidebar .powered-by { margin-top: auto; padding-top: 12px; }
}

/* Markaz brendi sahifasidagi ko'rinish namunasi */
.brand-preview {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background-color: var(--glass-bg-soft);
}
.brand-preview + .brand-preview { margin-top: 12px; }
.brand-preview-row { display: flex; align-items: center; gap: 12px; }
.brand-preview-row strong { display: block; }
.brand-preview-row small { color: var(--muted); }
.brand-preview p { margin: 10px 0 0; font-size: 13px; }
.brand-mark img { object-fit: contain; }

/* Tuzatish: menyu cho'zilganda bo'sh joy guruhlar orasiga taqsimlanmasin
   (guruhlar tepada zich turadi, ortiqcha joy pastda qoladi). */
.side-nav { align-content: start; }

/* ===================================================================
   Kirish sahifasi: Liquid Glass vitrina + forma
   =================================================================== */
.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px 16px;
}
.login-page {
  width: min(1060px, 100%);
  min-height: 600px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

/* --- Vitrina (chap tomon) --- */
.login-visual {
  position: relative;
  overflow: hidden;
  place-items: center start;
  padding: 48px 48px 44px;
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(45, 212, 191, .22), transparent 60%),
    radial-gradient(80% 70% at 100% 100%, rgba(124, 58, 237, .20), transparent 60%),
    var(--glass-bg-soft);
}
.visual-card {
  position: relative;
  z-index: 1;
  max-width: 440px;
}
.visual-card h2 {
  margin: 18px 0 6px;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--text) 30%, var(--brand-text));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.visual-tagline { margin: 0 0 26px; color: var(--text-3); font-size: 15px; line-height: 1.55; }
.login-visual .brand-mark.big { width: 72px; height: 72px; border-radius: 20px; }

.login-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.login-features li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px 11px 11px;
  border-radius: 16px;
  background-color: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  animation: slide-in-left .6s var(--ease-out) backwards;
  transition: transform .4s var(--ease-spring), background-color .25s ease;
}
.login-features li:nth-child(1) { animation-delay: .25s; }
.login-features li:nth-child(2) { animation-delay: .33s; }
.login-features li:nth-child(3) { animation-delay: .41s; }
.login-features li:nth-child(4) { animation-delay: .49s; }
.login-features li:hover { background-color: var(--glass-bg); }
.login-features strong { display: block; font-size: 14.5px; }
.login-features small { color: var(--muted); font-size: 12.5px; }
.feature-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 212, 191, .25), rgba(14, 165, 233, .18));
  color: var(--brand-text);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.feature-icon svg,
.float-icon svg,
.input-icon,
.pw-toggle svg,
.login-submit-arrow {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.login-roles span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  background-color: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  animation: pop-in .5s var(--ease-spring) backwards;
}
.login-roles span:nth-child(1) { animation-delay: .6s; }
.login-roles span:nth-child(2) { animation-delay: .66s; }
.login-roles span:nth-child(3) { animation-delay: .72s; }
.login-roles span:nth-child(4) { animation-delay: .78s; }

/* Suzuvchi lavhalar (bezak) — sichqonchaga ergashadi (--px, --py) */
.float-card {
  position: absolute;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 18px;
  background-color: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
  pointer-events: none;
  opacity: .9;
}
.fc-1 {
  top: 7%;
  right: 7%;
  translate: calc(var(--px, 0) * -14px) calc(var(--py, 0) * -10px);
  animation: float-card-a 7s ease-in-out infinite, pop-in .7s var(--ease-spring) .5s backwards;
}
.fc-2 {
  bottom: 6%;
  right: 9%;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 168px;
  translate: calc(var(--px, 0) * 18px) calc(var(--py, 0) * 12px);
  animation: float-card-b 8s ease-in-out infinite, pop-in .7s var(--ease-spring) .7s backwards;
}
@keyframes float-card-a { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes float-card-b { 0%, 100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(9px) rotate(-1deg); } }
.float-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.float-icon.success { background: var(--success-soft); color: var(--success-text); }
.float-lines { display: grid; gap: 6px; }
.float-lines b { font-size: 12.5px; }
.float-lines i { display: block; width: 92px; height: 6px; border-radius: 99px; background: var(--line); }
.float-title { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.float-bars { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 6px; height: 54px; }
.float-bars i {
  display: block;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--brand-line), var(--brand-soft));
  transform-origin: bottom;
  animation: grow-up .9s var(--ease-spring) 1s backwards;
}
.float-bars i.now { background: linear-gradient(180deg, #2dd4bf, var(--brand)); }

/* --- Forma (o'ng tomon) --- */
.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 44px;
}
.login-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 28px;
}
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-right: auto; }
.login-mobile-brand .brand-mark { width: 38px; height: 38px; }
.login-card h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 2.6vw, 32px);
  letter-spacing: -.02em;
}
.login-sub { margin: 0 0 22px; color: var(--muted); }
.login-form { display: grid; gap: 16px; margin-top: 4px; }
.login-field label { display: block; margin-bottom: 7px; color: var(--text-2); font-size: 13.5px; font-weight: 700; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
  transition: color .2s ease;
}
.input-wrap:focus-within .input-icon { color: var(--brand-text); }
.login-card .input-wrap input {
  width: 100%;
  min-height: 52px;
  padding: 12px 48px 12px 46px;
  border-radius: 16px;
  font-size: 16px;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .3s var(--ease-spring);
}
.pw-toggle:hover { background-color: var(--glass-bg-soft); color: var(--text); }
.pw-toggle:active { transform: scale(.9); }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .eye-on { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }
.caps-warning {
  margin: 8px 0 0;
  padding: 6px 10px;
  width: fit-content;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning-text);
  font-size: 12.5px;
  font-weight: 700;
  animation: pop-in .35s var(--ease-spring);
}
.login-submit {
  position: relative;
  min-height: 54px;
  margin-top: 6px;
  gap: 10px;
  border-radius: 16px;
  font-size: 16px;
}
.login-submit-arrow { transition: transform .35s var(--ease-spring); }
.login-submit:hover .login-submit-arrow { transform: translateX(4px); }
.login-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.login-submit.loading .login-spinner { display: block; }
.login-submit.loading .login-submit-arrow { display: none; }
.login-submit.loading { pointer-events: none; filter: saturate(.9); }
@keyframes spin { to { transform: rotate(360deg); } }
.login-help { margin: 20px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.login-card h1 .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.2s ease-in-out .8s 2; }
.login-footer { margin: 0; color: var(--muted); font-size: 12.5px; text-align: center; }

/* Xato: kartochka silkinadi */
.login-page.has-error .login-card { animation: shake .55s cubic-bezier(.36, .07, .19, .97) .2s both; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* --- Telefon va planshet --- */
@media (max-width: 980px) {
  .login-page { grid-template-columns: minmax(0, 1fr); min-height: 0; width: min(480px, 100%); }
  .login-visual { display: none; }
  .login-card { padding: 28px 22px 26px; }
  .login-mobile-brand { display: flex; }
  .login-card-top { margin-bottom: 26px; }
}
@media (max-width: 420px) {
  .login-body { padding: 14px 12px; place-items: start center; align-content: start; padding-top: 6vh; }
  .login-page { border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .fc-1, .fc-2 { translate: none; }
}

/* Kirish: login maydoni ostidagi maslahat */
.field-hint { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; }
