/* ==========================================================================
   Davomat — dizayn tizimi
   8px setka · 1 asosiy rang (koʻk) + neytral shkala · holat ranglari faqat semantik
   ========================================================================== */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, sans-serif;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafc;
  --glass: rgba(250, 250, 252, 0.78);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.07);
  --fill-3: rgba(118, 118, 128, 0.2);
  --sep: rgba(60, 60, 67, 0.12);
  --sep-strong: rgba(60, 60, 67, 0.2);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --on-accent: #ffffff;
  --inverse: #1d1d1f;
  --on-inverse: #ffffff;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-press: #0066cc;
  --accent-text: #0066cc;
  --accent-tint: rgba(0, 113, 227, 0.1);
  --focus: rgba(0, 113, 227, 0.32);

  --green: #1e7b34;   --green-bg: rgba(52, 199, 89, 0.14);  --green-dot: #34c759;
  --orange: #a34700;  --orange-bg: rgba(255, 149, 0, 0.16); --orange-dot: #ff9500;
  --red: #c4000f;     --red-bg: rgba(255, 59, 48, 0.11);    --red-dot: #ff3b30;
  --indigo: #3634a3;  --indigo-bg: rgba(88, 86, 214, 0.12); --indigo-dot: #5856d6;
  --teal: #00668f;    --teal-bg: rgba(50, 173, 230, 0.14);  --teal-dot: #32ade6;
  --promo: #1f8f89;   --promo-text: #17736e; --promo-bg: rgba(31, 143, 137, 0.1);
  --gray: #6e6e73;    --gray-bg: rgba(142, 142, 147, 0.14); --gray-dot: #aeaeb2;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 12px 48px rgba(0, 0, 0, 0.18);

  --r-xl: 22px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);

  --sidebar-w: 248px;
  --gutter: clamp(16px, 3vw, 40px);
  --tabbar-h: 56px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #232325;
    --glass: rgba(28, 28, 30, 0.72);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.14);
    --fill-3: rgba(118, 118, 128, 0.34);
    --sep: rgba(255, 255, 255, 0.09);
    --sep-strong: rgba(255, 255, 255, 0.16);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8d8d93;
    --inverse: #f5f5f7;
    --on-inverse: #1d1d1f;
    --accent-hover: #0a7cf0;
    --accent-press: #0062c4;
    --accent-text: #409cff;
    --accent-tint: rgba(10, 132, 255, 0.18);
    --focus: rgba(10, 132, 255, 0.45);
    --green: #30d158;   --green-bg: rgba(48, 209, 88, 0.18);
    --orange: #ff9f0a;  --orange-bg: rgba(255, 159, 10, 0.18);
    --red: #ff6961;     --red-bg: rgba(255, 69, 58, 0.2);
    --indigo: #a5a3ff;  --indigo-bg: rgba(94, 92, 230, 0.26);
    --teal: #64d2ff;    --teal-bg: rgba(100, 210, 255, 0.16);
    --promo-text: #5fd4cc; --promo-bg: rgba(95, 212, 204, 0.12);
    --gray: #a1a1a6;    --gray-bg: rgba(142, 142, 147, 0.22);
    --shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06);
    --shadow-hover: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-pop: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 16px 48px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Asos ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.47 var(--font);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent-text); text-decoration: none; }
svg { flex-shrink: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-tint); }

@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-thumb { background: var(--fill-3); border-radius: 12px; border: 3px solid transparent; background-clip: content-box; }
  ::-webkit-scrollbar-track { background: transparent; }
}

/* ---------- Ilova karkasi ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 12px 16px;
  padding-left: calc(12px + var(--safe-l));
  border-right: 0.5px solid var(--sep-strong);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; }
.brand-icon { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.brand-name { font: 700 17px/1.2 var(--font-display); letter-spacing: -0.02em; }
.brand-org { font-size: 12px; color: var(--text-2); line-height: 1.3; }

.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 12px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-weight: 500;
  transition: background 0.15s var(--ease);
}
.nav-item svg { color: var(--accent); }
.nav-item:hover { background: var(--fill-2); }
.nav-item:active { background: var(--fill); }
.nav-item[aria-current="page"] { background: var(--fill); font-weight: 600; }

.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 4px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px;
  border-radius: 14px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  background: var(--fill-2);
  width: fit-content;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-dot); }
.live-pill.on .live-dot { background: var(--green-dot); animation: pulse 2s var(--ease) infinite; }
.user-row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--r-md); }
.user-row .avatar { width: 32px; height: 32px; font-size: 12px; }
.user-row .name { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.main {
  min-width: 0;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
  padding-right: calc(var(--gutter) + var(--safe-r));
}

.tabbar { display: none; }

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .main {
    padding-top: calc(16px + var(--safe-t));
    padding-left: calc(var(--gutter) + var(--safe-l));
    padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 32px);
  }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--sep-strong);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--text-3);
    font-size: 11px; font-weight: 600; letter-spacing: 0;
    transition: color 0.15s, transform 0.15s var(--ease);
  }
  .tab:active { transform: scale(0.92); }
  .tab[aria-current="page"] { color: var(--accent); }
}

/* ---------- Sahifa sarlavhasi ---------- */
.view { animation: viewIn 0.4s var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head .titles { min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--text-2); }
.large-title { font: 700 clamp(28px, 2.4vw + 12px, 40px)/1.1 var(--font-display); letter-spacing: -0.025em; margin-top: 4px; }
.subtitle { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 8px -6px; font-weight: 500; height: 32px; padding: 0 8px 0 2px; border-radius: 8px; }
.back-link:hover { background: var(--accent-tint); }

.section-title {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  font: 600 20px/1.25 var(--font-display); letter-spacing: -0.015em;
  margin: 32px 0 12px;
}
.section-title .muted { font: 500 15px var(--font); letter-spacing: 0; }

/* ---------- Tugmalar ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s var(--ease), transform 0.12s var(--ease), opacity 0.15s, box-shadow 0.15s;
}
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { background: var(--accent-press); }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--fill-3); }
.btn-tinted { background: var(--accent-tint); color: var(--accent-text); }
.btn-tinted:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.btn-plain { background: transparent; color: var(--accent-text); padding: 0 10px; }
.btn-plain:hover:not(:disabled) { background: var(--accent-tint); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red-dot) 20%, transparent); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--text-2) transparent var(--text-2) var(--text-2);
  animation: spin 0.7s linear infinite;
}
.btn-primary.is-loading::after { border-color: #fff transparent #fff #fff; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--fill); color: var(--text);
  cursor: pointer;
  transition: background 0.15s, transform 0.12s var(--ease);
}
.icon-btn:hover { background: var(--fill-3); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.plain { background: transparent; color: var(--accent-text); }
.icon-btn.plain:hover { background: var(--accent-tint); }
.icon-btn:disabled { opacity: 0.35; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-dot) 55%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- Sana va soat boshqaruvi ---------- */
.clock {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font: 600 17px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.clock .live-dot { background: var(--green-dot); animation: pulse 2s var(--ease) infinite; }
.date-nav {
  display: inline-flex; align-items: center; gap: 2px;
  height: 36px; padding: 0 2px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.date-nav .icon-btn { width: 32px; height: 32px; background: transparent; color: var(--accent-text); }
.date-nav .icon-btn:hover { background: var(--accent-tint); }
.date-pick {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px;
  border-radius: 16px;
  font-weight: 600; font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.date-pick:hover { background: var(--fill-2); }
.date-pick input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: 0; padding: 0;
  -webkit-appearance: none; appearance: none;
}
.date-pick input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ---------- Kartalar ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: clip;
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  min-height: 60px;
  padding: 12px 12px 8px 20px;
}
.card-title { font: 600 17px/1.3 var(--font-display); letter-spacing: -0.015em; }
.card-sub { font-size: 13px; color: var(--text-2); }
.card-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.count {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 22px; padding: 0 8px;
  border-radius: 11px;
  font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--fill); color: var(--text-2);
}
.tone-green { --tone: var(--green); --tone-bg: var(--green-bg); --tone-dot: var(--green-dot); }
.tone-orange { --tone: var(--orange); --tone-bg: var(--orange-bg); --tone-dot: var(--orange-dot); }
.tone-red { --tone: var(--red); --tone-bg: var(--red-bg); --tone-dot: var(--red-dot); }
.tone-indigo { --tone: var(--indigo); --tone-bg: var(--indigo-bg); --tone-dot: var(--indigo-dot); }
.tone-teal { --tone: var(--teal); --tone-bg: var(--teal-bg); --tone-dot: var(--teal-dot); }
.tone-gray { --tone: var(--gray); --tone-bg: var(--gray-bg); --tone-dot: var(--gray-dot); }
.tone-accent { --tone: var(--accent-text); --tone-bg: var(--accent-tint); --tone-dot: var(--accent); }
.count[class*="tone-"] { background: var(--tone-bg); color: var(--tone); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1279px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.kpi {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 132px;
  padding: 16px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: rise 0.5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.kpi:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.kpi:active { transform: scale(0.98); }
.kpi[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--tone, var(--accent)), var(--shadow-hover); }
.kpi-icon {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--tone-bg); color: var(--tone);
}
.kpi-label { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.kpi-value {
  margin-top: 2px;
  font: 700 34px/1.05 var(--font-display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.kpi-value small { font-size: 17px; font-weight: 600; color: var(--text-3); letter-spacing: -0.01em; }
.kpi-sub { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kpi .ring { position: absolute; top: 14px; right: 14px; }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: var(--fill); }
.ring .bar { stroke: var(--green-dot); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 0.9s var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 599px) {
  .kpi { min-height: 116px; padding: 14px; }
  .kpi-value { font-size: 28px; }
  .kpi .ring { width: 36px; height: 36px; }
}

/* ---------- Ogohlantirish banneri ---------- */
.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--r-lg);
  background: var(--tone-bg, var(--fill-2));
  color: var(--tone, var(--text));
  font-weight: 500;
}
.banner .muted { color: inherit; opacity: 0.85; font-weight: 400; }

/* ---------- Roʻyxatlar (iOS uslubi) ---------- */
/* Bosh sahifa: roʻyxatlar, jonli lenta va toʻliq jadval */
.dash {
  display: grid; gap: 16px; margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "late early" "absent feed" "all all";
}
@media (min-width: 1200px) {
  .dash { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "late early absent" "all all all" "feed feed feed"; }
}
@media (min-width: 1800px) {
  .dash { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "late early absent feed" "all all all all"; }
}
@media (max-width: 719px) {
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-areas: "late" "early" "absent" "feed" "all"; }
}
#card-late { grid-area: late; } #card-early { grid-area: early; } #card-absent { grid-area: absent; }
.dash > .feed { grid-area: feed; } #all-card { grid-area: all; }
.dash > .card:not(#all-card) { display: flex; flex-direction: column; }
.mini-scroll { flex: 1; max-height: 372px; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 6px; }
.mini-scroll > .empty { min-height: 100%; align-content: center; }
@media (max-width: 719px) { .mini-scroll { max-height: none; } .feed .mini-scroll { max-height: 420px; } }
.cell {
  position: relative;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 60px;
  padding: 8px 16px 8px 20px;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.cell + .cell::before { content: ''; position: absolute; top: 0; left: 72px; right: 0; height: 0.5px; background: var(--sep); }
.cell:hover { background: var(--fill-2); }
.cell:active { background: var(--fill); }
.cell-main { min-width: 0; }
.cell-title { font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-sub { font-size: 13px; color: var(--text-2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-end { display: grid; justify-items: end; gap: 2px; font-variant-numeric: tabular-nums; }
.cell-time { font-weight: 600; font-size: 15px; }
.delta { font-size: 12px; font-weight: 700; color: var(--tone); }
.empty {
  display: grid; justify-items: center; gap: 8px;
  padding: 32px 24px 40px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tone-bg, var(--fill-2)); color: var(--tone, var(--text-2)); }
.empty strong { color: var(--text); font-size: 15px; }

.avatar {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #a9aeb6, #868b93);
  color: #fff;
  font: 600 14px/1 var(--font-display);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.avatar[data-presence]::after {
  content: ''; position: absolute; right: -1px; bottom: -1px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--surface);
}
.avatar[data-presence="in"]::after { background: var(--green-dot); }
.avatar[data-presence="out"]::after { background: var(--gray-dot); }
.avatar.lg[data-presence]::after { width: 18px; height: 18px; border-width: 3px; }

/* ---------- Holat belgilari ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 12px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  background: var(--tone-bg); color: var(--tone);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tone-dot); }
.badge.plain::before { display: none; }
.badges { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.presence { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.presence::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.presence.in { color: var(--green); }
.presence.in::before { background: var(--green-dot); animation: pulse 2s var(--ease) infinite; }
.presence.out { color: var(--text-2); }
.presence.out::before { border: 1.5px solid var(--gray-dot); width: 7px; height: 7px; }
.presence.none { color: var(--text-3); }
.presence.none::before { display: none; }
.warn { color: var(--orange); display: inline-flex; vertical-align: -3px; }

/* ---------- Asosiy jadval ---------- */
.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 16px 12px 20px;
}
.search {
  position: relative;
  flex: 1 1 220px; max-width: 320px;
}
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; height: 36px;
  padding: 0 12px 0 34px;
  border: 0; border-radius: 10px;
  background: var(--fill-2);
  font-size: 15px;
  outline: none;
  transition: background 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { background: var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-tint); }
@media (max-width: 719px) { .search { max-width: none; flex-basis: 100%; } .search input { font-size: 16px; } }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 16px 12px 20px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 0; border-radius: 16px;
  background: var(--fill-2); color: var(--text);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s var(--ease);
}
.chip:hover { background: var(--fill); }
.chip:active { transform: scale(0.95); }
.chip .n { color: var(--text-2); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--inverse); color: var(--on-inverse); }
.chip[aria-pressed="true"] .n { color: inherit; opacity: 0.7; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.table th {
  padding: 10px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  text-align: left; white-space: nowrap;
  border-top: 0.5px solid var(--sep);
  border-bottom: 0.5px solid var(--sep);
  background: var(--surface-2);
}
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table th button {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer;
}
.table th button:hover { color: var(--text); }
.table th[aria-sort] button { color: var(--text); }
.table th .sort-ico { opacity: 0; transition: opacity 0.15s, transform 0.2s; }
.table th[aria-sort] .sort-ico { opacity: 1; }
.table th[aria-sort="descending"] .sort-ico { transform: rotate(180deg); }
.table td {
  padding: 10px;
  font-size: 14px;
  border-bottom: 0.5px solid var(--sep);
  white-space: nowrap;
  vertical-align: middle;
}
.table tbody tr { cursor: pointer; transition: background 0.12s; }
.table tbody tr:hover td { background: var(--fill-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table .grow { width: 100%; max-width: 0; min-width: 240px; }
.table .who { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.table .who > div { min-width: 0; }
.table .who .avatar { width: 34px; height: 34px; font-size: 12px; }
.table .who-name { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.table .who-pos { font-size: 12.5px; color: var(--text-2); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.table .badges { flex-wrap: nowrap; }
.table .idx { color: var(--text-3); width: 1%; }
.t-late { color: var(--orange); font-weight: 600; }
.t-early { color: var(--indigo); font-weight: 600; }
.t-bad { color: var(--red); font-weight: 600; }
.t-dim { color: var(--text-3); }
.bar {
  position: relative; width: 48px; height: 6px;
  border-radius: 3px; background: var(--fill);
  overflow: hidden; display: inline-block; vertical-align: middle;
}
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--green-dot); transition: width 0.6s var(--ease-out); }
.bar.warn-bar > i { background: var(--orange-dot); }
.bar.bad-bar > i { background: var(--red-dot); }

/* Jadval ↔ roʻyxat: ekran emas, karta kengligiga qarab (sidebar bor-yoʻqligidan qatʼi nazar) */
.cq { container-type: inline-size; }
.only-narrow { display: none; }
@container (max-width: 759px) {
  .only-wide { display: none; }
  .only-narrow { display: block; }
}
@container (max-width: 999px) {
  .cq-lg .only-wide { display: none; }
  .cq-lg .only-narrow { display: block; }
}
@container (max-width: 1179px) {
  .table .opt { display: none; }
}
.list-foot { padding: 12px 20px 16px; font-size: 13px; color: var(--text-2); border-top: 0.5px solid var(--sep); }

/* Jonli lenta */
.feed .cell { grid-template-columns: 32px minmax(0, 1fr) auto; min-height: 52px; }
.feed .cell + .cell::before { left: 64px; }
.dir-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.dir-ico.in { background: var(--green-bg); color: var(--green); }
.dir-ico.out { background: var(--indigo-bg); color: var(--indigo); }
.feed .cell-time { font-size: 13px; color: var(--text-2); font-weight: 600; }
.cell.flash { animation: flash 2.4s var(--ease) both; }
@keyframes flash { 0% { background: var(--accent-tint); transform: translateY(-4px); opacity: 0; } 12% { opacity: 1; transform: none; } 100% { background: transparent; } }

/* ---------- Statistika plitkalari ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
@media (max-width: 599px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tile { padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.tile-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.tile-value { margin-top: 4px; font: 700 26px/1.1 var(--font-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; color: var(--tone, var(--text)); }
.tile-value small { font: 600 14px var(--font); color: var(--text-2); letter-spacing: 0; }
.tile-sub { margin-top: 4px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 3px; background: var(--fill); margin-top: 12px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.8s var(--ease-out); }

/* ---------- Xodim sahifasi ---------- */
.profile { display: flex; align-items: center; gap: 16px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.profile-meta a, .profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.day-row.is-off td { color: var(--text-3); }
.day-row.is-open td { background: var(--fill-2); }
.day-events td { padding: 0 !important; background: var(--surface-2); cursor: default; }
.day-events:hover td { background: var(--surface-2) !important; }
.ev-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 16px 20px; }
.ev {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 6px 0 10px;
  border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ev .src { font-weight: 500; color: var(--text-2); }
.ev .icon-btn { width: 24px; height: 24px; background: transparent; color: var(--red); }
.ev.in svg { color: var(--green); }
.ev.out svg { color: var(--indigo); }
.chev { transition: transform 0.2s var(--ease); color: var(--text-3); }
.is-open .chev { transform: rotate(90deg); }

/* ---------- iOS guruhlangan roʻyxatlar (sozlamalar) ---------- */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
@media (max-width: 1199px) { .settings { grid-template-columns: minmax(0, 1fr); } }
.group-head { margin: 28px 4px 8px 16px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.group-foot { margin: 8px 16px 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.group { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: clip; }
.row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px;
  padding: 8px 16px;
}
.row + .row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--sep); }
.row-label { flex: 1; min-width: 0; font-weight: 500; }
.row-label .muted { display: block; font-size: 13px; font-weight: 400; line-height: 1.35; }
.row-value { color: var(--text-2); font-variant-numeric: tabular-nums; }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--fill-2); }
.row-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--tone-bg, var(--fill)); color: var(--tone, var(--text)); }
.code {
  display: inline-block; max-width: 100%;
  padding: 4px 8px; border-radius: 6px;
  background: var(--fill-2);
  font: 500 13px/1.4 ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  word-break: break-all;
  user-select: all;
}

/* Kalit (switch) */
.switch { position: relative; display: inline-block; width: 51px; height: 31px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute; inset: 0;
  border-radius: 16px;
  background: var(--fill-3);
  transition: background 0.25s var(--ease);
}
.switch span::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.3s var(--spring);
}
.switch input:checked + span { background: var(--green-dot); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.4; }

/* ---------- Formalar ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 479px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field > span em { font-style: normal; color: var(--red); }
.field small { font-size: 12px; color: var(--text-2); }
.input {
  width: 100%; height: 44px;
  padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--fill-2);
  font-size: 16px;
  outline: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { height: auto; min-height: 80px; padding: 12px 14px; resize: vertical; }
select.input {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:hover { background-color: var(--fill); }
.input:focus { background-color: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.input[aria-invalid="true"] { border-color: var(--red-dot); }
.input.sm { height: 34px; width: auto; padding: 0 10px; font-size: 15px; border-radius: var(--r-sm); }
.form-error { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--red-bg); color: var(--red); font-size: 14px; font-weight: 500; }
.form-error:empty { display: none; }
.seg {
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 2px; border-radius: 9px;
  background: var(--fill);
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: grid; place-items: center;
  height: 32px; padding: 0 10px;
  border-radius: 7px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), box-shadow 0.2s;
  white-space: nowrap;
}
.seg input:checked + label { background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.actions .spacer { flex: 1; }

/* ---------- Varaq (modal / bottom sheet) ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); opacity: 0; transition: opacity 0.3s var(--ease); }
.sheet {
  position: relative;
  width: min(100%, 520px);
  max-height: min(88dvh, 820px);
  display: flex; flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.35s var(--spring), opacity 0.25s var(--ease);
}
.sheet.wide { width: min(100%, 760px); }
.sheet:focus { outline: none; }
.sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet-root.open .sheet { opacity: 1; transform: none; }
.sheet-grabber { display: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px 24px; }
.sheet-head h2 { flex: 1; font: 700 20px/1.25 var(--font-display); letter-spacing: -0.02em; }
.sheet-body { padding: 8px 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 599px) {
  .sheet-root { place-items: end stretch; padding: 0; }
  .sheet {
    width: 100%; max-height: calc(100dvh - var(--safe-t) - 24px);
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
    opacity: 1;
    transition: transform 0.45s var(--spring);
  }
  .sheet-grabber { display: block; width: 36px; height: 5px; margin: 6px auto 0; border-radius: 3px; background: var(--fill-3); }
  .sheet-head { padding: 8px 16px 8px 20px; }
  .sheet-body { padding: 8px 20px calc(24px + var(--safe-b)); }
}

/* Kontekst menyu */
.menu {
  position: fixed; z-index: 120;
  min-width: 260px; max-width: calc(100vw - 32px);
  padding: 6px;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--shadow-pop);
  transform-origin: top right;
  animation: menuIn 0.22s var(--spring) both;
}
@keyframes menuIn { from { opacity: 0; transform: scale(0.92); } }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 40px;
  padding: 8px 12px;
  border: 0; border-radius: 8px;
  background: none; color: var(--text);
  text-align: left; font-size: 15px; font-weight: 500;
  cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--accent); color: #fff; outline: none; }
.menu-item:hover .muted, .menu-item:focus-visible .muted { color: rgba(255, 255, 255, 0.8); }
.menu-item .muted { display: block; font-size: 12px; font-weight: 400; }
.menu-sep { height: 0.5px; margin: 6px 8px; background: var(--sep-strong); }

/* ---------- Toast ---------- */
.toasts { position: fixed; top: calc(16px + var(--safe-t)); left: 50%; z-index: 200; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 18px 10px 14px;
  border-radius: 22px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--shadow-pop);
  font-size: 14px; font-weight: 600;
  animation: toastIn 0.45s var(--spring) both;
  pointer-events: auto;
}
.toast.out { animation: toastOut 0.25s var(--ease) both; }
.toast .ti { color: var(--green); display: grid; }
.toast.err .ti { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(0.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(0.97); } }

/* ---------- Yuklanish skeleti ---------- */
.sk { border-radius: 8px; background: linear-gradient(90deg, var(--fill-2) 0%, var(--fill) 50%, var(--fill-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-kpi { height: 132px; border-radius: var(--r-lg); }
.sk-card { height: 300px; border-radius: var(--r-xl); }
.sk-line { height: 14px; margin: 8px 0; }

/* ---------- Kirish ekrani ---------- */
.auth {
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  background:
    radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--bg);
}
.auth-card {
  width: min(100%, 400px);
  padding: 40px 32px 32px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  text-align: center;
  animation: rise 0.6s var(--ease-out) both;
}
.auth-card .brand-icon { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 20px; display: block; }
.auth-card h1 { font: 700 28px/1.15 var(--font-display); letter-spacing: -0.025em; }
.auth-card .form { margin-top: 28px; text-align: left; }
.auth-foot { margin-top: 24px; font-size: 12px; color: var(--text-2); }
@media (max-width: 479px) { .auth-card { padding: 32px 20px 24px; border-radius: 24px; } }

/* ---------- Hamkor loyiha (MFY Nazorat) ---------- */
.promo-mark {
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(160deg, #3bb8af 0%, #14736e 100%);
  color: #fff;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.14);
}
.promo-card, .promo-side {
  display: flex; align-items: center; gap: 12px;
  color: var(--text);
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.promo-body { display: grid; min-width: 0; flex: 1; }
.promo-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--promo-text); }
.promo-title { font-weight: 700; font-size: 15px; line-height: 1.3; letter-spacing: -0.01em; }
.promo-text { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.promo-go { color: var(--promo-text); display: grid; transition: transform 0.2s var(--ease); }
.promo-card:hover .promo-go, .promo-side:hover .promo-go { transform: translateX(2px); }
.promo-card {
  width: min(100%, 400px);
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise 0.6s var(--ease-out) 0.12s both;
}
.promo-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.promo-card:active { transform: scale(0.98); }
.promo-side { padding: 8px; border-radius: var(--r-md); }
.promo-side .promo-title { font-size: 13px; }
.promo-side .promo-text { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-side:hover { background: var(--fill-2); }
.promo-side:active { background: var(--fill); }
.promo-banner {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  margin-top: 16px;
  padding: 16px 16px 16px 20px;
  border-radius: var(--r-xl);
  background: linear-gradient(110deg, var(--promo-bg) 0%, transparent 65%), var(--surface);
  box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease-out) 0.2s both;
}
.promo-banner .promo-title { font-size: 17px; }
.promo-banner .promo-text { font-size: 14px; }
.promo-banner .btn { background: var(--promo-bg); color: var(--promo-text); }
.promo-banner .btn:hover { background: color-mix(in srgb, var(--promo) 20%, transparent); }
.promo-banner .icon-btn { width: 30px; height: 30px; background: transparent; color: var(--text-3); }
.promo-banner .icon-btn:hover { background: var(--fill-2); color: var(--text-2); }
.promo-banner.out { animation: bannerOut 0.25s var(--ease) both; }
@keyframes bannerOut { to { opacity: 0; transform: scale(0.98); } }
@media (max-width: 599px) {
  .promo-banner { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .promo-banner .promo-body { flex-basis: calc(100% - 100px); }
  .promo-banner .btn { order: 3; width: 100%; }
  .promo-banner .icon-btn { position: absolute; top: 8px; right: 8px; }
}
.auth-stack { display: grid; justify-items: center; width: 100%; }
.auth-made { margin-top: 20px; font-size: 12px; color: var(--text-2); text-align: center; }
.auth-made a { color: var(--text-2); font-weight: 600; }
.auth-made a:hover { color: var(--text); }

/* ---------- Yordamchi ---------- */
.stack { display: grid; gap: 16px; }
.hstack { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.help { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.help ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.help b { color: var(--text); font-weight: 600; }
.log { font-size: 13px; }
.log .cell { grid-template-columns: 76px minmax(0, 1fr) auto; min-height: 44px; cursor: default; padding-left: 16px; }
.log .cell + .cell::before { left: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media print {
  .sidebar, .tabbar, .head-actions, .toolbar, .chips, .card-actions { display: none !important; }
  .app { display: block; }
  .card, .kpi, .tile { box-shadow: none; border: 1px solid #ddd; }
}
