/* ==========================================================================
   Ishonch CRM — dizayn tizimi
   Tashqi kutubxonalarsiz: barcha uslublar shu faylda.
   ========================================================================== */

/* ---------------------------------------------------------------- tokenlar */
:root {
  --c-bg: #f1f5f9;
  --c-surface: #ffffff;
  --c-surface-2: #f8fafc;
  --c-surface-3: #f1f5f9;
  --c-border: #e2e8f0;
  --c-border-strong: #cbd5e1;

  --c-text: #0f172a;
  --c-text-soft: #475569;
  --c-text-muted: #94a3b8;

  --c-primary: #2563eb;
  --c-primary-dark: #1d4ed8;
  --c-primary-soft: #dbeafe;
  --c-primary-text: #1e40af;

  --c-success: #059669;
  --c-success-soft: #d1fae5;
  --c-success-text: #065f46;

  --c-warning: #d97706;
  --c-warning-soft: #fef3c7;
  --c-warning-text: #92400e;

  --c-danger: #dc2626;
  --c-danger-soft: #fee2e2;
  --c-danger-text: #991b1b;

  --c-info: #0891b2;
  --c-info-soft: #cffafe;
  --c-info-text: #155e75;

  --c-muted-soft: #e2e8f0;
  --c-muted-text: #475569;

  --sidebar-w: 260px;
  --topbar-h: 62px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --sh-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-md: 0 2px 8px rgba(15, 23, 42, .08);
  --sh-lg: 0 8px 28px rgba(15, 23, 42, .12);
  --sh-xl: 0 20px 48px rgba(15, 23, 42, .18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

[data-theme="dark"] {
  --c-bg: #0b1120;
  --c-surface: #131c31;
  --c-surface-2: #1a2437;
  --c-surface-3: #202c42;
  --c-border: #26334d;
  --c-border-strong: #33405c;

  --c-text: #e8eefc;
  --c-text-soft: #a9b6d0;
  --c-text-muted: #6b7a99;

  --c-primary: #3b82f6;
  --c-primary-dark: #2563eb;
  --c-primary-soft: #1e3a8a;
  --c-primary-text: #bfdbfe;

  --c-success: #10b981;
  --c-success-soft: #064e3b;
  --c-success-text: #a7f3d0;

  --c-warning: #f59e0b;
  --c-warning-soft: #78350f;
  --c-warning-text: #fde68a;

  --c-danger: #ef4444;
  --c-danger-soft: #7f1d1d;
  --c-danger-text: #fecaca;

  --c-info: #06b6d4;
  --c-info-soft: #164e63;
  --c-info-text: #a5f3fc;

  --c-muted-soft: #26334d;
  --c-muted-text: #a9b6d0;

  --sh-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-md: 0 2px 10px rgba(0, 0, 0, .4);
  --sh-lg: 0 10px 30px rgba(0, 0, 0, .5);
  --sh-xl: 0 24px 56px rgba(0, 0, 0, .6);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 { margin: 0 0 .5rem; font-weight: 650; line-height: 1.3; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }

img { max-width: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border-strong); border-radius: 20px; border: 2px solid var(--c-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-muted); }

.icon { vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- layout */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  transition: transform .22s ease;
}

.sidebar__brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--c-border);
  flex: none;
}
.sidebar__logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--c-primary), #7c3aed);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; flex: none;
}
.sidebar__title { font-weight: 680; font-size: 14px; line-height: 1.2; }
.sidebar__subtitle { font-size: 11px; color: var(--c-text-muted); }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-group { margin-bottom: 14px; }
.nav-group__title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--c-text-muted); padding: 0 10px 6px; font-weight: 650;
}
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-md);
  color: var(--c-text-soft); font-weight: 520; font-size: 13.5px;
  margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--c-surface-3); color: var(--c-text); text-decoration: none; }
.nav-link.is-active { background: var(--c-primary); color: #fff; box-shadow: var(--sh-sm); }
.nav-link.is-active .icon { color: #fff; }
.nav-link__badge {
  margin-left: auto; background: var(--c-danger); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 20px;
}
.nav-link.is-active .nav-link__badge { background: rgba(255,255,255,.28); }

.sidebar__footer { padding: 12px; border-top: 1px solid var(--c-border); flex: none; }

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 40;
}
.topbar__title { font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

.content { padding: 20px; flex: 1; max-width: 1600px; width: 100%; }

.sidebar-toggle { display: none; }

/* ------------------------------------------------------------------ tugma */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-md);
  border: 1px solid transparent; background: var(--c-surface-3); color: var(--c-text);
  font-family: inherit; font-size: 13.5px; font-weight: 560; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; background: var(--c-border); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* Rangli tugmalar hover'da o'z rangini saqlab, biroz to'qlashadi.
   `background` qayta e'lon qilinishi shart - aks holda `.btn:hover`dagi
   kulrang fon ustun kelib qoladi. */
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-success { background: var(--c-success); color: #fff; }
.btn-success:hover { background: var(--c-success); color: #fff; filter: brightness(.9); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: var(--c-danger); color: #fff; filter: brightness(.9); }
.btn-warning { background: var(--c-warning); color: #fff; }
.btn-warning:hover { background: var(--c-warning); color: #fff; filter: brightness(.9); }
.btn-ghost { background: transparent; border-color: var(--c-border); color: var(--c-text-soft); }
.btn-ghost:hover { background: var(--c-surface-3); color: var(--c-text); border-color: var(--c-border-strong); }
.btn-link { background: transparent; color: var(--c-primary); padding: 4px 6px; }
.btn-link:hover { background: var(--c-primary-soft); color: var(--c-primary); }

/* Ranglilar ichidagi «xatarli» harakat tugmasi (masalan o'chirish) */
.btn-ghost.text-danger:hover { background: var(--c-danger-soft); color: var(--c-danger); border-color: var(--c-danger-soft); }
.btn-ghost.text-warning:hover { background: var(--c-warning-soft); color: var(--c-warning); border-color: var(--c-warning-soft); }

.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.btn-icon { padding: 7px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

.btn-group { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ karta */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}
/* Burchaklarni ichki bloklar o'zi yumaloqlaydi — `overflow: hidden` qo'llanmaydi,
   aks holda jadval qatoridagi ochiladigan menyular kesilib qolardi. */
.card > *:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.card > *:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card > *:only-child { border-radius: var(--r-lg); }
/* Kartochka ichidagi forma - burchak uning oxirgi bloki bo'ylab yumaloqlanadi */
.card > form:last-child > *:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card > form:first-child > *:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }

a.card { display: block; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: var(--sh-md); border-color: var(--c-primary);
}
.card__header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--c-border);
  background: var(--c-surface-2);
}
.card__title { font-weight: 640; font-size: 14px; display: flex; align-items: center; gap: 8px; margin: 0; }
.card__subtitle { font-size: 12px; color: var(--c-text-muted); }
.card__actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }
.card__footer { padding: 12px 16px; border-top: 1px solid var(--c-border); background: var(--c-surface-2); }

/* ------------------------------------------------------------- statistika */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 13px; margin-bottom: 18px;
  align-items: stretch;
}
.stat {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 14px 15px; box-shadow: var(--sh-sm);
  display: flex; gap: 12px; align-items: center;
  min-height: 84px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  color: inherit;
}
a.stat { cursor: pointer; }
a.stat:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: var(--sh-md); border-color: var(--c-border-strong);
}
a.stat:hover .stat__label { color: var(--c-text-soft); }

.stat__icon {
  width: 42px; height: 42px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: var(--c-primary-soft); color: var(--c-primary-text);
}
.stat__icon--success { background: var(--c-success-soft); color: var(--c-success-text); }
.stat__icon--warning { background: var(--c-warning-soft); color: var(--c-warning-text); }
.stat__icon--danger { background: var(--c-danger-soft); color: var(--c-danger-text); }
.stat__icon--info { background: var(--c-info-soft); color: var(--c-info-text); }
.stat__icon--muted { background: var(--c-muted-soft); color: var(--c-muted-text); }

.stat__body {
  min-width: 0; flex: 1;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
}
.stat__label {
  font-size: 12px; color: var(--c-text-muted); font-weight: 540;
  line-height: 1.3; transition: color .15s;
}
.stat__value {
  font-size: 22px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2;
  color: var(--c-text);
  overflow-wrap: anywhere;
}
/* Pul summalari: uzun raqam kartochkadan chiqib ketmasin */
.stat__value--sm { font-size: 17.5px; letter-spacing: -.02em; }
.stat__value--xs { font-size: 15.5px; }
.stat__unit {
  font-size: 11.5px; font-weight: 550; color: var(--c-text-muted);
  margin-left: 3px; letter-spacing: 0;
}
.stat__hint {
  font-size: 11.5px; color: var(--c-text-muted); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat__hint--up { color: var(--c-success); }
.stat__hint--down { color: var(--c-danger); }
.stat__value.is-negative { color: var(--c-danger); }
.stat__value.is-positive { color: var(--c-success); }

/* ----------------------------------------------------------------- jadval */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: inherit; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 10px 13px; text-align: left; vertical-align: middle; }
.table thead th {
  background: var(--c-surface-2);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .045em;
  color: var(--c-text-muted); font-weight: 650; white-space: nowrap;
  border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 2;
}
.table tbody tr { border-bottom: 1px solid var(--c-border); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--c-surface-2); }
.table tfoot td { background: var(--c-surface-2); font-weight: 680; border-top: 2px solid var(--c-border-strong); }
.table .num, .table .right { text-align: right; font-variant-numeric: tabular-nums; }
.table .center { text-align: center; }
.table td.actions { text-align: right; white-space: nowrap; width: 1%; }
.table--compact th, .table--compact td { padding: 7px 10px; font-size: 12.5px; }
.table--fixed { table-layout: fixed; }

.sort-link { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.sort-link:hover { color: var(--c-primary); text-decoration: none; }
.sort-arrow { font-size: 9px; color: var(--c-primary); }

.row-link { color: var(--c-text); font-weight: 560; }
.row-link:hover { color: var(--c-primary); }

/* ----------------------------------------------------------------- badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 620; white-space: nowrap;
  background: var(--c-muted-soft); color: var(--c-muted-text);
}
.badge-success { background: var(--c-success-soft); color: var(--c-success-text); }
.badge-warning { background: var(--c-warning-soft); color: var(--c-warning-text); }
.badge-danger  { background: var(--c-danger-soft);  color: var(--c-danger-text); }
.badge-info    { background: var(--c-info-soft);    color: var(--c-info-text); }
.badge-primary { background: var(--c-primary-soft); color: var(--c-primary-text); }
.badge-muted   { background: var(--c-muted-soft);   color: var(--c-muted-text); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
a.badge { transition: filter .15s; }
a.badge:hover { text-decoration: none; filter: brightness(.94); }

/* ---------------------------------------------------------------- avatar */
.avatar {
  border-radius: 50%; object-fit: cover; flex: none;
  display: inline-grid; place-items: center;
  font-weight: 660; color: #fff; letter-spacing: .02em;
  background: var(--c-primary);
}
.avatar-c1 { background: #2563eb; } .avatar-c2 { background: #7c3aed; }
.avatar-c3 { background: #0891b2; } .avatar-c4 { background: #059669; }
.avatar-c5 { background: #d97706; } .avatar-c6 { background: #dc2626; }
.avatar-c7 { background: #db2777; } .avatar-c8 { background: #475569; }

.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-cell__body { min-width: 0; }
.user-cell__name { font-weight: 570; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-cell__meta { font-size: 11.5px; color: var(--c-text-muted); }

/* ----------------------------------------------------------------- forma */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.form-grid--single { grid-template-columns: 1fr; }
.form-row { margin-bottom: 14px; }
.form-row--full { grid-column: 1 / -1; }

.form-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--c-text-soft); }
.form-label .req { color: var(--c-danger); margin-left: 2px; }

.form-control, .form-select {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--c-border-strong); border-radius: var(--r-md);
  background: var(--c-surface); color: var(--c-text);
  font-family: inherit; font-size: 13.5px; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 18%, transparent);
}
.form-control::placeholder { color: var(--c-text-muted); }
.form-control[readonly], .form-control[disabled], .form-select[disabled] {
  background: var(--c-surface-3); color: var(--c-text-muted); cursor: not-allowed;
}
textarea.form-control { resize: vertical; min-height: 70px; }
select[multiple].form-select { padding: 6px; }

.form-file {
  width: 100%; padding: 7px; font-size: 13px;
  border: 1px dashed var(--c-border-strong); border-radius: var(--r-md);
  background: var(--c-surface-2); color: var(--c-text-soft);
}

.form-check { width: 16px; height: 16px; accent-color: var(--c-primary); cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.check-row label { font-size: 13.5px; cursor: pointer; margin: 0; }

.form-hint { font-size: 11.5px; color: var(--c-text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--c-danger); margin-top: 4px; font-weight: 550; }
.has-error .form-control, .has-error .form-select { border-color: var(--c-danger); }

/* Oylik usuliga qarab ko'rinadigan maydonlar: o'rovchi div grid'ni buzmasin */
.salary-field { display: contents; }

/* Modal ichidagi «ichma-ich» qo'shish tugmalari */
.quick-nested {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--c-border);
}

/* --------------------------------------------------- ruxsat belgilari */
.perm-group { margin-bottom: 18px; }
.perm-group:last-child { margin-bottom: 0; }
.perm-group__title {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-text-muted); font-weight: 680; margin-bottom: 8px;
}
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.perm-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px; border: 1px solid var(--c-border);
  border-radius: var(--r-md); background: var(--c-surface);
  cursor: pointer; transition: border-color .13s, background .13s;
}
.perm-item:hover { border-color: var(--c-border-strong); background: var(--c-surface-2); }
.perm-item:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.perm-item input { margin-top: 2px; flex: none; }
.perm-item__body { display: flex; flex-direction: column; min-width: 0; }
.perm-item__label { font-size: 13px; font-weight: 570; color: var(--c-text); }
.perm-item__hint { font-size: 11.5px; color: var(--c-text-muted); line-height: 1.3; }
.perm-item--danger:has(input:checked) {
  border-color: var(--c-danger); background: var(--c-danger-soft);
}
.perm-item--danger:has(input:checked) .perm-item__label { color: var(--c-danger-text); }

/* ------------------------------------------- to'lov formasidagi qarz paneli */
.pay-state {
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-surface-2); overflow: hidden; margin-top: 4px;
}
.pay-state--debt { border-color: var(--c-danger); background: var(--c-danger-soft); }
.pay-state--paid { border-color: var(--c-success); background: var(--c-success-soft); }
.pay-state--advance { border-color: var(--c-info); background: var(--c-info-soft); }

.pay-state__head { display: flex; align-items: center; gap: 11px; padding: 11px 13px; }
.pay-state__icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--c-surface); color: var(--c-text-soft);
}
.pay-state--debt .pay-state__icon { color: var(--c-danger); }
.pay-state--paid .pay-state__icon { color: var(--c-success); }
.pay-state--advance .pay-state__icon { color: var(--c-info); }
.pay-state__title { font-weight: 620; font-size: 13.5px; }
.pay-state__sub { font-size: 12px; color: var(--c-text-soft); }
.pay-state__amount {
  font-size: 17px; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pay-state--debt .pay-state__amount { color: var(--c-danger-text); }
.pay-state--paid .pay-state__amount { color: var(--c-success-text); }
.pay-state--advance .pay-state__amount { color: var(--c-info-text); }

.pay-state__list { border-top: 1px solid var(--c-border); background: var(--c-surface); }
.pay-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 13px; font-size: 12.5px;
  border-bottom: 1px solid var(--c-border);
}
.pay-row:last-child { border-bottom: none; }
.pay-row__period { font-weight: 570; }
.pay-row__group { color: var(--c-text-muted); }
.pay-row__amount { margin-left: auto; font-weight: 640; font-variant-numeric: tabular-nums; }
.pay-row__use {
  border: none; background: var(--c-primary-soft); color: var(--c-primary-text);
  border-radius: var(--r-sm); padding: 3px 9px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.pay-row__use:hover { background: var(--c-primary); color: #fff; }

.form-section { margin-bottom: 22px; }
.form-section__title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-text-muted); font-weight: 680;
  padding-bottom: 7px; margin-bottom: 14px; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 7px;
}
.form-actions {
  display: flex; gap: 9px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--c-border); margin-top: 6px;
}

.alert-list { background: var(--c-danger-soft); color: var(--c-danger-text);
  border-radius: var(--r-md); padding: 11px 14px; margin-bottom: 16px; font-size: 13px; }
.alert-list ul { margin: 0; padding-left: 18px; }

/* ---------------------------------------------------------------- filter */
.toolbar {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px;
}
.toolbar__spacer { flex: 1; }

.search-box { position: relative; flex: 1; min-width: 190px; max-width: 380px; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); }
.search-box input { padding-left: 35px; }

.filter-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px; align-items: end;
}
.filter-bar .form-row { margin: 0; }
.filter-bar__actions { display: flex; gap: 7px; }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px; font-size: 12px;
  background: var(--c-primary-soft); color: var(--c-primary-text); font-weight: 550;
}
.chip a { color: inherit; opacity: .7; display: inline-flex; }
.chip a:hover { opacity: 1; text-decoration: none; }

.tab-row {
  display: flex; gap: 3px; flex-wrap: wrap;
  border-bottom: 1px solid var(--c-border); margin-bottom: 16px;
}
.tab {
  padding: 9px 15px; border-radius: var(--r-md) var(--r-md) 0 0;
  color: var(--c-text-soft); font-weight: 570; font-size: 13.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit;
}
.tab:hover { color: var(--c-text); background: var(--c-surface-2); text-decoration: none; }
.tab.is-active { color: var(--c-primary); border-bottom-color: var(--c-primary); background: transparent; }
.tab__count {
  background: var(--c-surface-3); color: var(--c-text-muted);
  font-size: 11px; padding: 0 6px; border-radius: 20px; font-weight: 650;
}

/* ------------------------------------------------------------ pagination */
.pagination {
  display: flex; gap: 5px; align-items: center; flex-wrap: wrap;
  padding: 13px 16px; border-top: 1px solid var(--c-border);
}
.pagination__info { font-size: 12.5px; color: var(--c-text-muted); margin-right: auto; }
.page-link {
  min-width: 33px; height: 33px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-border); border-radius: var(--r-sm);
  color: var(--c-text-soft); font-size: 13px; font-weight: 560; background: var(--c-surface);
}
.page-link:hover { background: var(--c-surface-3); text-decoration: none; color: var(--c-text); }
.page-link.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.page-link.is-disabled { opacity: .4; pointer-events: none; }
.page-ellipsis { padding: 0 4px; color: var(--c-text-muted); }

/* ----------------------------------------------------------- empty/loader */
.empty {
  text-align: center; padding: 46px 20px; color: var(--c-text-muted);
}
.empty__icon {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--c-surface-3); color: var(--c-text-muted);
}
.empty__title { font-weight: 640; color: var(--c-text-soft); margin-bottom: 5px; font-size: 15px; }
.empty__text { font-size: 13px; max-width: 400px; margin: 0 auto 16px; }

.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--c-border-strong); border-top-color: var(--c-primary);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.is-loading { position: relative; pointer-events: none; opacity: .65; }
.skeleton {
  background: linear-gradient(90deg, var(--c-surface-3) 25%, var(--c-surface-2) 50%, var(--c-surface-3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ----------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

.modal {
  background: var(--c-surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-xl); width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  animation: modalIn .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal--wide { max-width: 780px; }
.modal--narrow { max-width: 420px; }

.modal__header {
  padding: 16px 18px; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 10px;
}
.modal__title { font-weight: 660; font-size: 15.5px; margin: 0; }
.modal__close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--c-text-muted); padding: 5px; border-radius: var(--r-sm); display: flex;
}
.modal__close:hover { background: var(--c-surface-3); color: var(--c-text); }
.modal__body { padding: 18px; overflow-y: auto; }
.modal__footer {
  padding: 14px 18px; border-top: 1px solid var(--c-border);
  display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap;
}

.modal__icon {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--c-danger-soft); color: var(--c-danger);
}
.modal__icon--warning { background: var(--c-warning-soft); color: var(--c-warning); }
.modal__icon--info { background: var(--c-info-soft); color: var(--c-info); }

/* ----------------------------------------------------------------- toast */
/* Xabarlar o'ng pastda chiqadi — yuqoridagi tugmalarni to'smaydi */
.toast-stack {
  position: fixed; bottom: 16px; right: 16px; z-index: 300;
  display: flex; flex-direction: column-reverse; gap: 9px; max-width: 380px;
}
.toast {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-primary);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  padding: 12px 14px; animation: toastIn .24s cubic-bezier(.2, .9, .3, 1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.toast.is-hiding { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(16px) scale(.97); } }
.toast--success { border-left-color: var(--c-success); }
.toast--error   { border-left-color: var(--c-danger); }
.toast--warning { border-left-color: var(--c-warning); }
.toast--info    { border-left-color: var(--c-info); }
.toast__icon { flex: none; margin-top: 1px; }
.toast--success .toast__icon { color: var(--c-success); }
.toast--error .toast__icon   { color: var(--c-danger); }
.toast--warning .toast__icon { color: var(--c-warning); }
.toast--info .toast__icon    { color: var(--c-info); }
.toast__body { flex: 1; font-size: 13.5px; min-width: 0; }
.toast__close { background: none; border: none; color: var(--c-text-muted); cursor: pointer; padding: 0; display: flex; }
.toast__close:hover { color: var(--c-text); }

/* -------------------------------------------------------------- dropdown */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 208px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  box-shadow: var(--sh-lg); padding: 5px; z-index: 90;
  display: none; max-height: min(420px, 70vh); overflow-y: auto;
}
.dropdown.is-open .dropdown__menu { display: block; animation: modalIn .14s ease; }
.dropdown__item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--c-text-soft); font-size: 13.5px; width: 100%;
  background: none; border: none; font-family: inherit; text-align: left; cursor: pointer;
}
.dropdown__item:hover { background: var(--c-surface-3); color: var(--c-text); text-decoration: none; }
.dropdown__item--danger { color: var(--c-danger); }
.dropdown__item--danger:hover { background: var(--c-danger-soft); }
.dropdown__divider { height: 1px; background: var(--c-border); margin: 5px 0; }
.dropdown__header { padding: 8px 10px; font-size: 11.5px; color: var(--c-text-muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }

.bell { position: relative; }
.bell__dot {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--c-danger); color: #fff; border-radius: 20px;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--c-surface);
}

.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: var(--r-sm); }
.notif-item:hover { background: var(--c-surface-3); text-decoration: none; }
.notif-item.is-unread { background: var(--c-primary-soft); }
.notif-item__icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--c-surface-3); color: var(--c-text-soft); }
.notif-item__title { font-size: 13px; font-weight: 570; color: var(--c-text); }
.notif-item__text { font-size: 12px; color: var(--c-text-muted); }
.notif-item__time { font-size: 11px; color: var(--c-text-muted); margin-top: 2px; }

/* --------------------------------------------------------------- profile */
.profile-header {
  display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap;
  padding: 18px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--r-lg);
  margin-bottom: 16px; box-shadow: var(--sh-sm);
}
.profile-header__name { font-size: 20px; font-weight: 700; margin-bottom: 3px; }
.profile-header__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--c-text-soft); }
.profile-header__meta span { display: inline-flex; align-items: center; gap: 5px; }
.profile-header__actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }

.detail-list { display: grid; gap: 1px; background: var(--c-border); border-radius: var(--r-md); overflow: hidden; }
.detail-list__row { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 1px; background: var(--c-border); }
.detail-list__label { background: var(--c-surface-2); padding: 9px 12px; font-size: 12.5px; color: var(--c-text-muted); font-weight: 550; }
.detail-list__value { background: var(--c-surface); padding: 9px 12px; font-size: 13.5px; word-break: break-word; }

/* --------------------------------------------------------------- davomat */
.att-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border-bottom: 1px solid var(--c-border);
  transition: background .12s;
}
.att-row:last-child { border-bottom: none; }
.att-row:hover { background: var(--c-surface-2); }
.att-row__student { flex: 1; min-width: 150px; }
.att-row__options { display: flex; gap: 4px; flex-wrap: wrap; }

.att-opt { position: relative; }
.att-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.att-opt label {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--c-border-strong); background: var(--c-surface);
  font-size: 12.5px; font-weight: 570; color: var(--c-text-soft);
  transition: all .13s; user-select: none; white-space: nowrap;
}
.att-opt label:hover { border-color: var(--c-text-muted); }
.att-opt input:focus-visible + label { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.att-opt input:checked + label[data-tone="present"]   { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.att-opt input:checked + label[data-tone="late"]      { background: var(--c-warning); border-color: var(--c-warning); color: #fff; }
.att-opt input:checked + label[data-tone="absent"]    { background: var(--c-danger);  border-color: var(--c-danger);  color: #fff; }
.att-opt input:checked + label[data-tone="excused"]   { background: var(--c-info);    border-color: var(--c-info);    color: #fff; }
.att-opt input:checked + label[data-tone="unexcused"] { background: #991b1b;          border-color: #991b1b;          color: #fff; }

.att-cell {
  width: 26px; height: 26px; border-radius: var(--r-sm);
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 700;
}
.att-cell--present   { background: var(--c-success-soft); color: var(--c-success-text); }
.att-cell--late      { background: var(--c-warning-soft); color: var(--c-warning-text); }
.att-cell--absent    { background: var(--c-danger-soft);  color: var(--c-danger-text); }
.att-cell--excused   { background: var(--c-info-soft);    color: var(--c-info-text); }
.att-cell--unexcused { background: var(--c-danger-soft);  color: var(--c-danger-text); }
.att-cell--empty     { background: var(--c-surface-3);    color: var(--c-text-muted); }

/* ---------------------------------------------------------------- jadval */
.week-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.day-col {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
}
.day-col.is-today { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.day-col__header {
  padding: 9px 12px; background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border); font-size: 12.5px; font-weight: 640;
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
}
.day-col.is-today .day-col__header { background: var(--c-primary-soft); color: var(--c-primary-text); }
.day-col__body { padding: 8px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

.lesson-card {
  display: block; padding: 9px 11px; border-radius: var(--r-md);
  background: var(--c-surface-2); border-left: 3px solid var(--c-primary);
  font-size: 12.5px; color: var(--c-text); transition: background .13s, transform .1s;
}
.lesson-card:hover { background: var(--c-surface-3); text-decoration: none; transform: translateX(2px); }
.lesson-card__time { font-weight: 660; font-variant-numeric: tabular-nums; }
.lesson-card__group { font-weight: 570; margin: 1px 0; }
.lesson-card__meta { font-size: 11.5px; color: var(--c-text-muted); }
.lesson-card--done { border-left-color: var(--c-success); }
.lesson-card--cancelled { border-left-color: var(--c-text-muted); opacity: .6; }

/* --------------------------------------------------------------- progress */
.progress { height: 7px; background: var(--c-surface-3); border-radius: 20px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--c-primary); border-radius: 20px; transition: width .4s ease; }
.progress__bar--success { background: var(--c-success); }
.progress__bar--warning { background: var(--c-warning); }
.progress__bar--danger { background: var(--c-danger); }
.progress--lg { height: 10px; }

/* ---------------------------------------------------------------- grafik */
.chart-box { position: relative; width: 100%; }
.chart-box canvas { display: block; width: 100% !important; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; margin-top: 10px; justify-content: center; }
.chart-legend__item { display: inline-flex; align-items: center; gap: 6px; color: var(--c-text-soft); }
.chart-legend__dot { width: 10px; height: 10px; border-radius: 3px; }

.chart-tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--c-text); color: var(--c-surface);
  padding: 6px 10px; border-radius: var(--r-sm); font-size: 12px;
  white-space: nowrap; box-shadow: var(--sh-md); transform: translate(-50%, -130%);
  opacity: 0; transition: opacity .12s;
}
.chart-tooltip.is-visible { opacity: 1; }

.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-item__head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.bar-item__name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-item__value { font-weight: 640; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ----------------------------------------------------------------- login */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 55%, #0f172a 100%);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--c-surface);
  border-radius: var(--r-xl); box-shadow: var(--sh-xl); padding: 30px 28px;
}
.login-card__logo {
  width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--c-primary), #7c3aed);
  color: #fff; display: grid; place-items: center; font-size: 21px; font-weight: 700;
}
.login-card__title { text-align: center; font-size: 19px; margin-bottom: 4px; }
.login-card__subtitle { text-align: center; color: var(--c-text-muted); font-size: 13px; margin-bottom: 22px; }
.login-hint { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-border);
  font-size: 12px; color: var(--c-text-muted); text-align: center; }

/* ---------------------------------------------------------------- xatolik */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.error-page__code { font-size: 76px; font-weight: 800; color: var(--c-primary); line-height: 1; letter-spacing: -.03em; }
.error-page__title { font-size: 21px; margin: 10px 0 6px; }
.error-page__text { color: var(--c-text-muted); max-width: 440px; margin: 0 auto 22px; }

/* Mustaqil xatolik sahifasi (yon menyusiz) */
.error-body { background: var(--c-bg); margin: 0; }

.error-shell {
  min-height: 100vh; display: grid; place-items: center;
  padding: 24px; box-sizing: border-box;
}

.error-card {
  width: 100%; max-width: 460px; text-align: center;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 36px 30px 30px;
  box-shadow: var(--sh-lg, 0 12px 34px rgba(15, 23, 42, .10));
}

.error-card__badge {
  width: 68px; height: 68px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--c-primary-soft); color: var(--c-primary);
}
.error-card__badge--403 { background: var(--c-warning-soft); color: var(--c-warning-text); }
.error-card__badge--500 { background: var(--c-danger-soft); color: var(--c-danger-text); }

.error-card__code {
  font-size: 54px; font-weight: 800; line-height: 1;
  color: var(--c-text); letter-spacing: -.03em;
}
.error-card__title { font-size: 19px; margin: 10px 0 8px; color: var(--c-text); }
.error-card__text { color: var(--c-text-soft); margin: 0 0 22px; line-height: 1.55; }

.error-card__actions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}

.error-card__hint {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-border);
  font-size: 12.5px; color: var(--c-text-muted); line-height: 1.5;
}

/* --------------------------------------------------------------- utilita */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.flex-1 { flex: 1; } .flex-wrap { flex-wrap: wrap; }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }

.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; }
.text-lg { font-size: 16px; } .text-xl { font-size: 19px; }
.text-muted { color: var(--c-text-muted); }
.text-soft { color: var(--c-text-soft); }
.text-success { color: var(--c-success); }
.text-danger { color: var(--c-danger); }
.text-warning { color: var(--c-warning); }
.text-primary { color: var(--c-primary); }
.text-right { text-align: right; } .text-center { text-align: center; }
.font-bold { font-weight: 700; } .font-semi { font-weight: 600; }
.nums { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.divider { height: 1px; background: var(--c-border); margin: 16px 0; }

.kbd {
  font-family: var(--mono); font-size: 11px; padding: 1px 5px;
  background: var(--c-surface-3); border: 1px solid var(--c-border);
  border-radius: 4px; color: var(--c-text-soft);
}

.code-box {
  font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: .12em;
  background: var(--c-surface-3); padding: 8px 14px; border-radius: var(--r-md);
  display: inline-block; color: var(--c-primary);
}

/* ------------------------------------------------------------ telefon */
/* `+998` inputning ichida emas, yonida turadi — o'chirib bo'lmaydi */
.phone-field { position: relative; display: block; }

.phone-field__prefix {
  position: absolute; left: 1px; top: 1px; bottom: 1px;
  display: flex; align-items: center; padding: 0 9px 0 11px;
  font-size: 13.5px; font-weight: 600; color: var(--c-text-soft);
  background: var(--c-surface-3); border-radius: var(--r-sm) 0 0 var(--r-sm);
  pointer-events: none; user-select: none;
}

.phone-field__input {
  padding-left: 58px !important;
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- parol */
.pass-field { position: relative; display: block; }
.pass-field .form-control { padding-right: 40px; }

.pass-field__eye {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border: 0; cursor: pointer;
  background: none; color: var(--c-text-muted); border-radius: var(--r-sm);
}
.pass-field__eye:hover { color: var(--c-text); background: var(--c-surface-3); }

/* Jonli tekshiruv natijasi (parol mosligi, login bandligi) */
.field-note {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; margin-top: 5px; line-height: 1.35;
}
.field-note--ok   { color: var(--c-success-text); }
.field-note--bad  { color: var(--c-danger-text); }
.field-note--wait { color: var(--c-text-muted); }

.form-control.is-ok  { border-color: var(--c-success); }
.form-control.is-bad { border-color: var(--c-danger); }

/* Parol kuchi ko'rsatkichi */
.pass-meter { display: flex; gap: 4px; margin-top: 6px; }
.pass-meter__bar {
  height: 4px; flex: 1; border-radius: 2px; background: var(--c-border);
  transition: background .15s ease;
}
.pass-meter__bar.is-on--weak   { background: var(--c-danger); }
.pass-meter__bar.is-on--medium { background: var(--c-warning); }
.pass-meter__bar.is-on--strong { background: var(--c-success); }

/* Uzun hisobotdagi ogohlantirish */
.report-note {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--c-info-soft); color: var(--c-info-text);
  border-radius: var(--r-md); padding: 11px 14px; font-size: 13px; line-height: 1.5;
}
.report-note svg { flex: none; margin-top: 2px; }

/* ------------------------------------------------- sozlamalar ro'yxatlari */
.ref-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle;
  box-shadow: 0 0 0 2px var(--c-surface), 0 0 0 3px rgba(0, 0, 0, .08);
}

/* Yashirilgan yozuv ko'zga tashlanmasin, lekin o'qilsin */
.ref-row--off > td { opacity: .55; }
.ref-row--off:hover > td { opacity: 1; }

.ref-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.ref-actions form { display: inline-flex; margin: 0; }
.ref-actions .is-disabled { opacity: .35; cursor: not-allowed; }

/* Rang tanlagich brauzer standart ramkasisiz */
.form-input--color {
  padding: 3px; height: 38px; cursor: pointer;
  min-width: 64px; max-width: 96px;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .grid-side { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-xl); }
  .sidebar.is-open { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .content { padding: 14px; }
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 55;
    animation: fadeIn .15s ease;
  }
}

@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat__icon { width: 36px; height: 36px; }
  .stat__value { font-size: 18px; }
  .card__header { padding: 11px 13px; }
  .card__body { padding: 13px; }
  .table th, .table td { padding: 8px 10px; font-size: 12.5px; }
  .topbar { padding: 0 13px; gap: 9px; }
  .topbar__title { font-size: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { max-width: 100%; }
  .toast-stack { left: 12px; right: 12px; max-width: none; bottom: 12px; top: auto; }
  .profile-header__actions { margin-left: 0; width: 100%; }
  .hide-sm { display: none !important; }
  .pagination { padding: 10px 12px; }
  .att-row { flex-wrap: wrap; }
}

@media print {
  .sidebar, .topbar, .toolbar, .pagination, .card__actions, .btn, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  body { background: #fff; }
}
