/* ═══════════════════════════════════════════════════════════════════════
   SoftClub HR Control — панели идоракунӣ (v4)
   Телефон (< 700px): менюи поён · Планшет (700–1099px): панели нишонаҳо ·
   Компютер (≥ 1100px): менюи пурраи паҳлӯ. Ҳеҷ китобхонаи беруна.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F3F4F7;
  --surface-3: #E8EAEF;
  --border: #E6E8EC;
  --border-2: #D5D9E0;
  --text: #111827;
  --text-2: #4B5563;
  --text-3: #8B93A1;

  --brand: #4F46E5;
  --brand-2: #6366F1;
  --brand-soft: #EEF0FF;
  --brand-text: #4338CA;

  --ok: #16A34A;     --ok-soft: #E3F6EA;     --ok-text: #15803D;
  --warn: #F59E0B;   --warn-soft: #FEF3D7;   --warn-text: #B45309;
  --danger: #EF4444; --danger-soft: #FDE8E8; --danger-text: #B91C1C;
  --info: #0EA5E9;   --info-soft: #E2F3FC;   --info-text: #0369A1;
  --violet: #8B5CF6; --violet-soft: #EFEAFE; --violet-text: #6D28D9;
  --muted: #A3ABB8;  --muted-soft: #F1F3F6;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 14px rgba(17, 24, 39, .05);
  --shadow-lg: 0 24px 64px rgba(17, 24, 39, .22);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;

  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --side-w: 0px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0B0F17;
  --surface: #121826;
  --surface-2: #192133;
  --surface-3: #222B3F;
  --border: #232C3E;
  --border-2: #2F3A50;
  --text: #E8ECF3;
  --text-2: #A9B2C3;
  --text-3: #6E788B;

  --brand: #818CF8;
  --brand-2: #A5B4FC;
  --brand-soft: #1D2347;
  --brand-text: #A5B4FC;

  --ok: #34D399;     --ok-soft: #0F2E23;     --ok-text: #6EE7B7;
  --warn: #FBBF24;   --warn-soft: #33270C;   --warn-text: #FCD34D;
  --danger: #F87171; --danger-soft: #3A1719; --danger-text: #FCA5A5;
  --info: #38BDF8;   --info-soft: #0C2A3B;   --info-text: #7DD3FC;
  --violet: #A78BFA; --violet-soft: #251C45; --violet-text: #C4B5FD;
  --muted: #5B6578;  --muted-soft: #1A2131;

  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
a { color: var(--brand-text); }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.num, .kpi__value, .mini b { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ─────────────── Логотип ─────────────── */
.logo {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), #7C3AED);
  color: #fff; font-weight: 800; letter-spacing: .4px; font-size: 14px;
}
.logo--sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.logo--lg { width: 60px; height: 60px; border-radius: 18px; font-size: 22px; }

/* ─────────────── Тугмаҳо ─────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 10px;
  border: 1px solid transparent; font-weight: 600; font-size: 14.5px;
  background: var(--surface-2); color: var(--text);
  transition: transform .08s, background .15s, border-color .15s, opacity .15s;
  white-space: nowrap; text-decoration: none; user-select: none;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 17px; height: 17px; }
.btn span:empty { display: none; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-2); }
:root[data-theme="dark"] .btn--primary { color: #0B0F17; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.05); background: var(--danger); }
.btn--ok { background: var(--ok); color: #fff; }
.btn--ok:hover { filter: brightness(1.05); background: var(--ok); }
:root[data-theme="dark"] .btn--ok, :root[data-theme="dark"] .btn--danger { color: #0B0F17; }
.btn--ghost { background: var(--surface); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--soft { background: var(--brand-soft); color: var(--brand-text); }
.btn--soft:hover { background: var(--brand-soft); filter: brightness(.97); }
.btn--soft-danger { background: var(--danger-soft); color: var(--danger-text); }
.btn--soft-danger:hover { background: var(--danger-soft); filter: brightness(.97); }
.btn--soft-ok { background: var(--ok-soft); color: var(--ok-text); }
.btn--soft-ok:hover { background: var(--ok-soft); filter: brightness(.97); }
.btn--link { background: none; padding: 0 4px; min-height: 32px; color: var(--brand-text); }
.btn--link:hover { background: none; text-decoration: underline; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn--lg { min-height: 48px; font-size: 15.5px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { width: 34px; min-height: 34px; padding: 0; }
.btn.is-loading { opacity: .65; pointer-events: none; }

.iconbtn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  transition: background .15s;
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn.is-spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--brand-text); font-weight: 600; font-size: 13.5px; }
.linkbtn:hover { text-decoration: underline; }

/* ─────────────── Майдонҳо ─────────────── */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--sm { gap: 8px; }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field__hint { font-size: 12.5px; color: var(--text-3); }
.input, .field input, .field select, .field textarea, .select {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--border-2); border-radius: 10px;
  background: var(--surface); outline: none;
  font-size: 16px; /* iOS zoom намекунад */
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 88px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
select.input, select.select, .field select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B93A1' stroke-width='2.2' 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 10px center; background-size: 16px;
}
input[type="date"].input, input[type="month"].input, input[type="time"].input { min-width: 0; }
.field__wrap { position: relative; display: block; }
.field__wrap input { padding-right: 46px; }
.field__eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; background: none; color: var(--text-3);
  display: grid; place-items: center; border-radius: 8px;
}
.field__eye svg { width: 18px; height: 18px; }

.alert { padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.alert--danger { background: var(--danger-soft); color: var(--danger-text); }
.alert--warn { background: var(--warn-soft); color: var(--warn-text); }
.alert--info { background: var(--brand-soft); color: var(--brand-text); }
.alert--ok { background: var(--ok-soft); color: var(--ok-text); }

/* Switch */
.switch { position: relative; display: inline-flex; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3);
  position: relative; transition: background .2s;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s;
}
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Сегментҳо */
.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.seg button {
  border: 0; background: none; padding: 7px 14px; border-radius: 8px;
  font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap;
}
.seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .seg button.is-active { background: var(--surface-3); }
.seg--block { display: flex; }
.seg--block button { flex: 1; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text-2);
}
.chip b { color: var(--text); font-weight: 700; }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip.is-active b { color: var(--surface); }
.chip .dot { width: 8px; height: 8px; }

.daychips { display: flex; gap: 6px; flex-wrap: wrap; }
.daychips button {
  width: 44px; height: 40px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface); font-weight: 700; font-size: 13.5px; color: var(--text-3);
}
.daychips button.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .daychips button.is-on { color: #0B0F17; }

/* ─────────────── Pills / тегҳо ─────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 3px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 650;
  background: var(--surface-2); color: var(--text-2); line-height: 1.35;
}
.pill svg { width: 13px; height: 13px; }
.pill--ok { background: var(--ok-soft); color: var(--ok-text); }
.pill--warn { background: var(--warn-soft); color: var(--warn-text); }
.pill--danger { background: var(--danger-soft); color: var(--danger-text); }
.pill--info { background: var(--info-soft); color: var(--info-text); }
.pill--violet { background: var(--violet-soft); color: var(--violet-text); }
.pill--muted { background: var(--muted-soft); color: var(--text-3); }
.pill--brand { background: var(--brand-soft); color: var(--brand-text); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ─────────────── Вуруд ─────────────── */
.login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 10% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(700px 400px at 110% 110%, var(--violet-soft), transparent 60%),
    var(--bg);
}
.login__box {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow);
}
.login__brand { text-align: center; margin-bottom: 22px; }
.login__brand .logo { margin: 0 auto 14px; }
.login__brand h1 { font-size: 22px; font-weight: 800; }
.login__brand p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.login__tg { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0 18px; color: var(--text-2); font-size: 14px; }
.login__foot { text-align: center; color: var(--text-3); font-size: 12.5px; margin: 18px 0 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--surface-3); border-top-color: var(--brand); animation: spin .8s linear infinite; }

/* ─────────────── Скелет ─────────────── */
.app { min-height: 100vh; min-height: 100dvh; }
.side { display: none; }
.shell { min-width: 0; margin-left: var(--side-w); }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--border); }
.topbar__title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar__text { min-width: 0; }
.topbar h1 { font-size: 19px; font-weight: 750; letter-spacing: -.2px; }
.topbar small { display: block; color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; gap: 8px; flex-shrink: 0; }

.main {
  padding: 8px 16px calc(var(--tabbar-h) + var(--safe-b) + 24px);
  max-width: 1320px; margin: 0 auto;
}
.view { display: none; }
.view.is-active { display: flex; flex-direction: column; gap: 16px; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Менюи поён */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.tab {
  position: relative; border: 0; background: none; color: var(--text-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-active { color: var(--brand-text); }
.tab.is-active svg { stroke-width: 2.3; }
.badge-dot {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; line-height: 1; font-style: normal;
}
.topbar__settings { display: grid; }

/* Планшет: панели нишонаҳо */
@media (min-width: 700px) {
  :root { --side-w: 76px; }
  .tabbar { display: none; }
  .topbar__logo, .topbar__settings { display: none; }
  .main { padding: 8px 24px 40px; }
  .topbar { padding: 14px 24px; }
  .side {
    position: fixed; inset: 0 auto 0 0; z-index: 35; width: var(--side-w);
    display: flex; flex-direction: column; gap: 6px; padding: 16px 10px;
    background: var(--surface); border-right: 1px solid var(--border);
  }
  .side__brand { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 0 14px; }
  .side__brand-text { display: none; }
  .side__brand b { display: block; font-size: 15px; }
  .side__brand small { color: var(--text-3); font-size: 12px; }
  .side__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .side__foot { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
  .side__link {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
    background: none; color: var(--text-2); font-weight: 600; font-size: 14.5px; text-align: left;
  }
  .side__link span { display: none; }
  .side__link:hover { background: var(--surface-2); color: var(--text); }
  .side__link.is-active { background: var(--brand-soft); color: var(--brand-text); }
  .side__link .badge-dot { top: 5px; left: auto; right: 8px; }
}

/* Компютер: менюи пурра */
@media (min-width: 1100px) {
  :root { --side-w: 244px; }
  .side { padding: 20px 14px; }
  .side__brand { justify-content: flex-start; padding: 0 8px 18px; }
  .side__brand-text { display: block; }
  .side__link { justify-content: flex-start; }
  .side__link span { display: inline; }
  .side__link .badge-dot { position: static; margin-left: auto; }
  .main { padding: 8px 32px 48px; }
  .topbar { padding: 18px 32px 14px; }
  .topbar h1 { font-size: 22px; }
}

/* ─────────────── Картаҳо ва ҷойгиршавӣ ─────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); min-width: 0;
}
.card__head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px 0;
}
.card__head h2 { font-size: 15px; font-weight: 700; }
.card__head .spacer { flex: 1; }
.card__note { color: var(--text-3); font-size: 13px; font-weight: 500; }
.card__body { padding: 14px 16px 16px; }
.card__body--flush { padding: 6px 0 4px; }
.card--pad { padding: 16px; }
.card--accent { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); }

.grid { display: grid; gap: 16px; min-width: 0; }
.grid-2, .grid-3 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
  .grid-3 .span-2 { grid-column: span 2; }
}
@media (min-width: 1100px) { .grid-21 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px; margin: 6px 0 -4px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Салом */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 0 2px; }
.hello h2 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.hello p { margin: 3px 0 0; color: var(--text-2); font-size: 14px; }

/* KPI */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid--start { align-items: start; }
@media (max-width: 480px) { .rq__id { display: none; } }
.kpi {
  display: flex; flex-direction: column; gap: 4px; text-align: left; min-width: 0;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
button.kpi { cursor: pointer; transition: border-color .15s, transform .08s; }
button.kpi:hover { border-color: var(--border-2); }
button.kpi:active { transform: scale(.98); }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi__label { font-size: 13px; color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.kpi__ico svg { width: 16px; height: 16px; }
.kpi__value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.kpi__sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi--ok .kpi__ico { background: var(--ok-soft); color: var(--ok-text); }
.kpi--warn .kpi__ico { background: var(--warn-soft); color: var(--warn-text); }
.kpi--danger .kpi__ico { background: var(--danger-soft); color: var(--danger-text); }
.kpi--info .kpi__ico { background: var(--info-soft); color: var(--info-text); }
.kpi--violet .kpi__ico { background: var(--violet-soft); color: var(--violet-text); }
.kpi--brand .kpi__ico { background: var(--brand-soft); color: var(--brand-text); }

/* Ҳисоби имрӯз (ҳалқа) */
.today { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring__c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring__c b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.ring__c small { display: block; color: var(--text-3); font-size: 12px; margin-top: 4px; }
.today__legend { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.lg-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px;
  border: 0; background: none; text-align: left; width: 100%; font-size: 14px; color: var(--text-2);
}
button.lg-row:hover { background: var(--surface-2); }
.lg-row b { margin-left: auto; color: var(--text); font-size: 15px; }

/* ─────────────── Рӯйхатҳо ─────────────── */
.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--border); }
.item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 0;
  background: none; border: 0; width: 100%; text-align: left; color: inherit;
}
button.item, .item[role="button"] { cursor: pointer; transition: background .12s; }
button.item:hover, .item[role="button"]:hover { background: var(--surface-2); }
.item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.item__name { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__sub { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__text { color: var(--text-2); font-size: 13.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.item__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; text-align: right; }
.item__time { font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; }
.item__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.item__actions { display: flex; gap: 6px; flex-shrink: 0; }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
}
.avatar--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.avatar--lg { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; }
.avatar.is-off { filter: grayscale(1); opacity: .55; }

/* Карточкаи дархост */
.rq { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; cursor: pointer; transition: background .12s; position: relative; }
.rq:hover { background: var(--surface-2); }
.rq__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rq__top { display: flex; align-items: baseline; gap: 8px; }
.rq__name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq__id { color: var(--text-3); font-size: 12.5px; flex-shrink: 0; }
.rq__time { color: var(--text-3); font-size: 12.5px; margin-left: auto; flex-shrink: 0; }
.rq__reason { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.rq__meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rq__quick { display: flex; gap: 8px; margin-top: 4px; }
.rq__quick .btn { flex: 1; max-width: 160px; }
.rq__del {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; border: 0;
  background: none; color: var(--text-3); display: grid; place-items: center; margin: -4px -6px 0 0;
}
.rq__del:hover { background: var(--danger-soft); color: var(--danger-text); }
.rq__del svg { width: 17px; height: 17px; }
.rq__check {
  display: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-2);
  flex-shrink: 0; margin-top: 9px; place-items: center; color: #fff;
}
.rq__check svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.is-selecting .rq__check { display: grid; }
.is-selecting .rq__del { display: none; }
.rq.is-selected { background: var(--brand-soft); }
.rq.is-selected .rq__check { background: var(--brand); border-color: var(--brand); }
.rq.is-selected .rq__check svg { opacity: 1; }
.rq.is-removing { opacity: .35; pointer-events: none; }

/* ─────────────── Филтрҳо ─────────────── */
.filters { display: grid; gap: 10px; }
.filters__row { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .filters__row { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.filters__range { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search input { padding-left: 40px; padding-right: 40px; }
.search__clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--text-3); display: grid; place-items: center; border-radius: 8px; }
.search__clear svg { position: static; transform: none; width: 16px; height: 16px; }

.resultbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.resultbar b { color: var(--text); }
.resultbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.toolbar__group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Навигатсияи сана/моҳ */
.nav-date { display: flex; align-items: center; gap: 6px; }
.nav-date__label {
  position: relative; min-width: 0; padding: 0 12px; height: 38px; border-radius: 10px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 14.5px; white-space: nowrap;
}
.nav-date__label small { font-weight: 500; color: var(--text-3); font-size: 11.5px; line-height: 1.1; }
.nav-date__label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* ─────────────── Ҷадвали моҳ ─────────────── */
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--border); }
.matrix { border-collapse: separate; border-spacing: 0; font-size: 12.5px; width: max-content; min-width: 100%; }
.matrix th, .matrix td { padding: 0; text-align: center; border-bottom: 1px solid var(--border); }
.matrix thead th { position: sticky; top: 0; background: var(--surface); z-index: 3; font-weight: 600; color: var(--text-3); }
.matrix tbody tr:hover td { background: var(--surface-2); }
.matrix tbody tr:hover .m-name { background: var(--surface-2); }
.matrix .m-name {
  position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left;
  min-width: 190px; max-width: 220px; padding: 6px 12px; border-right: 1px solid var(--border);
}
.matrix thead .m-name { z-index: 4; }
.m-person { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; width: 100%; }
.m-person b { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; color: var(--text); }
.m-person small { color: var(--text-3); font-size: 12px; }
.m-day { width: 34px; min-width: 34px; padding: 6px 0 !important; line-height: 1.15; }
.m-day b { display: block; font-size: 13px; color: var(--text); }
.m-day small { display: block; font-size: 10.5px; }
.m-day.is-off { color: var(--text-3); }
.m-day.is-off b { color: var(--text-3); }
.m-day.is-today b { color: #fff; background: var(--brand); border-radius: 6px; width: 24px; margin: 0 auto; }
:root[data-theme="dark"] .m-day.is-today b { color: #0B0F17; }
td.m-off { background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--surface-2) 5px 7px); }
.m-sum { min-width: 58px; padding: 6px 10px !important; font-weight: 700; font-size: 13px; white-space: nowrap; }
.m-sum small { display: block; font-weight: 500; color: var(--text-3); font-size: 11px; }
.matrix tfoot td { font-size: 11.5px; color: var(--text-3); padding: 6px 0; border-bottom: 0; }
.matrix tfoot .m-name { font-weight: 600; }

.mc {
  width: 28px; height: 28px; margin: 4px auto; border-radius: 8px; border: 0; padding: 0;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 750; line-height: 1;
  background: transparent; color: var(--text-3); cursor: pointer; transition: transform .08s;
}
.mc:hover { transform: scale(1.12); }
.mc svg { width: 14px; height: 14px; stroke-width: 3; }
.mc--on_time { background: var(--ok-soft); color: var(--ok-text); }
.mc--late { background: var(--warn-soft); color: var(--warn-text); }
.mc--absent { background: var(--danger-soft); color: var(--danger-text); }
.mc--leave { background: var(--info-soft); color: var(--info-text); }
.mc--pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border-2); color: var(--text-3); }
.mc--none { color: var(--border-2); }
.mc--future { cursor: default; color: transparent; }
.mc--future:hover { transform: none; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* Тасмаи хурди моҳ (телефон) */
.strip { display: flex; gap: 2px; height: 20px; }
.strip i { flex: 1; border-radius: 3px; background: var(--surface-2); min-width: 3px; }
.strip i.s-on_time { background: var(--ok); }
.strip i.s-late { background: var(--warn); }
.strip i.s-absent { background: var(--danger); }
.strip i.s-leave { background: var(--info); }
.strip i.s-pending { background: var(--muted); }
.strip i.s-off { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.strip i.s-future { background: transparent; }
.strip i.s-none { background: var(--surface-3); }
.strip i.is-today { outline: 2px solid var(--brand); outline-offset: 1px; }

.person { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 0; background: none; width: 100%; text-align: left; color: inherit; cursor: pointer; }
.person:hover { background: var(--surface-2); }
.person__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person__who { flex: 1; min-width: 0; }
.person__who b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person__who small { display: block; color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person__score { text-align: right; flex-shrink: 0; }
.person__score b { display: block; font-size: 19px; font-weight: 800; line-height: 1.1; }
.person__score small { color: var(--text-3); font-size: 11.5px; }
.person__nums { display: flex; gap: 6px; flex-wrap: wrap; }

/* Тақвими корманд */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal__wd { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-3); padding-bottom: 2px; }
.cal__d {
  aspect-ratio: 1 / 1; min-height: 40px; border-radius: 10px; border: 0; padding: 3px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--surface-2); color: var(--text-2); font-size: 12px; cursor: pointer;
}
.cal__d b { font-size: 14px; font-weight: 700; color: var(--text); }
.cal__d small { font-size: 10.5px; font-weight: 650; line-height: 1; }
.cal__d.s-on_time { background: var(--ok-soft); color: var(--ok-text); }
.cal__d.s-late { background: var(--warn-soft); color: var(--warn-text); }
.cal__d.s-absent { background: var(--danger-soft); color: var(--danger-text); }
.cal__d.s-leave { background: var(--info-soft); color: var(--info-text); }
.cal__d.s-pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border-2); }
.cal__d.s-off { background: transparent; background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--surface-2) 5px 7px); color: var(--text-3); cursor: default; }
.cal__d.s-off b { color: var(--text-3); }
.cal__d.s-future { background: transparent; cursor: default; }
.cal__d.s-future b { color: var(--text-3); font-weight: 500; }
.cal__d.is-today { outline: 2px solid var(--brand); outline-offset: 1px; }
.cal__d.is-empty { visibility: hidden; }

/* ─────────────── Графикҳо ─────────────── */
.cols { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 20px; }
.col { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; min-width: 3px; }
.col__bar { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 2px 2px; overflow: hidden; min-height: 0; transition: height .35s ease; }
.col__bar i { display: block; width: 100%; }
.col__n { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.col.is-today .col__bar { box-shadow: 0 0 0 2px var(--brand); }
.col.is-mark .col__bar { outline: 2px dashed var(--brand); outline-offset: 2px; }
.axis { display: flex; gap: 3px; margin-top: 6px; }
.axis span { flex: 1; text-align: center; font-size: 11px; color: var(--text-3); white-space: nowrap; min-width: 3px; overflow: visible; }
.chart-legend { margin-top: 12px; }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut__c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut__c b { display: block; font-size: 24px; font-weight: 800; line-height: 1; }
.donut__c small { color: var(--text-3); font-size: 12px; }
.dlist { flex: 1; min-width: 180px; display: grid; gap: 8px; }
.dlist__row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.dlist__row i { width: 12px; height: 12px; border-radius: 4px; }
.dlist__row b { font-variant-numeric: tabular-nums; }
.dlist__row em { font-style: normal; color: var(--text-3); font-size: 13px; min-width: 38px; text-align: right; }

.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar__top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 5px; }
.hbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__val { color: var(--text-3); flex-shrink: 0; font-size: 13px; }
.hbar__val b { color: var(--text); font-size: 14px; }
.hbar__track { height: 8px; border-radius: 99px; background: var(--surface-2); display: flex; overflow: hidden; }
.hbar__track i { display: block; height: 100%; }
.hbar__sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.hbar.is-link { cursor: pointer; }
.hbar.is-link:hover .hbar__label { color: var(--brand-text); }

.heat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.heat__cell { aspect-ratio: 1.2 / 1; border-radius: 6px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.heat__cell small { font-size: 10px; font-weight: 500; opacity: .7; }

.stackbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.stackbar i { display: block; height: 100%; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .split--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mini { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.mini b { display: block; font-size: 18px; font-weight: 800; }
.mini small { color: var(--text-3); font-size: 12px; }

.insights { display: grid; gap: 8px; }
.insight { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.insight svg { width: 18px; height: 18px; color: var(--warn); margin-top: 1px; }
.insight b { color: var(--text); }

/* Ҷадвали рейтинг */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table th.is-sorted { color: var(--brand-text); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table .who { display: flex; align-items: center; gap: 10px; }
.bar-inline { display: inline-block; width: 60px; height: 6px; border-radius: 99px; background: var(--surface-2); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.bar-inline i { display: block; height: 100%; border-radius: 99px; }

/* Танзимот */
.setting { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.setting + .setting { border-top: 1px solid var(--border); }
.setting__text { flex: 1; min-width: 0; }
.setting__text b { display: block; font-weight: 650; font-size: 14.5px; }
.setting__text small { display: block; color: var(--text-3); font-size: 13px; margin-top: 1px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; }

.schedule-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.schedule-bar__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); flex-shrink: 0; }
.schedule-bar__text { flex: 1; min-width: 180px; }
.schedule-bar__text b { display: block; font-size: 15px; }
.schedule-bar__text small { color: var(--text-3); font-size: 13px; }
.schedule-bar--off .schedule-bar__ico { background: var(--warn-soft); color: var(--warn-text); }

/* Бе маълумот ва скелет */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 32px 16px; text-align: center; color: var(--text-3); }
.empty svg { width: 34px; height: 34px; stroke-width: 1.6; margin-bottom: 4px; color: var(--border-2); }
.empty b { color: var(--text-2); font-size: 15px; }
.empty span { font-size: 13.5px; max-width: 340px; }
.skeleton { border-radius: 12px; min-height: 64px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton--sm { min-height: 86px; }
.skeleton--lg { min-height: 220px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ─────────────── Sheet ─────────────── */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(8, 12, 20, .45); animation: fadein .18s; }
@keyframes fadein { from { opacity: 0; } }
.sheet__panel {
  position: relative; width: 100%; max-height: 92vh; max-height: 92dvh;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slideup .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slideup { from { transform: translateY(40px); } }
.sheet__grip { width: 40px; height: 5px; border-radius: 99px; background: var(--surface-3); margin: 8px auto 0; flex-shrink: 0; }
.sheet__x { position: absolute; top: 10px; right: 12px; z-index: 2; width: 34px; height: 34px; }
.sheet__body { overflow-y: auto; padding: 14px 18px calc(22px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.sheet__title { font-size: 19px; font-weight: 800; padding-right: 40px; letter-spacing: -.2px; }
.sheet__text { color: var(--text-2); font-size: 14.5px; margin: 0; }
.sheet__actions { display: flex; gap: 10px; }
.sheet__actions > .btn { flex: 1; }
@media (min-width: 700px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet__panel { max-width: 560px; border-radius: 20px; max-height: 88vh; }
  .sheet--wide .sheet__panel { max-width: 780px; }
  .sheet__grip { display: none; }
  .sheet__body { padding: 22px 24px 24px; }
}

.detail-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.detail-head b { display: block; font-size: 18px; font-weight: 800; }
.detail-head small { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
.quote { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 15px; overflow-wrap: anywhere; border-left: 3px solid var(--border-2); }
.info { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; }
.info__row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; font-size: 14px; }
.info__row + .info__row { border-top: 1px solid var(--border); }
.info__row span { color: var(--text-3); }
.info__row b { text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px;
  border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface);
  font-weight: 650; font-size: 13.5px; color: var(--text-2);
}
.choice button .dot { width: 12px; height: 12px; }
.choice button.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }

/* ─────────────── Панели интихоб ва toast ─────────────── */
.selbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 45;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  display: flex; align-items: center; gap: 8px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: calc(100% - 24px); max-width: 520px;
}
.selbar__count { flex: 1; text-align: center; font-weight: 700; font-size: 14px; }
@media (min-width: 700px) { .selbar { bottom: 20px; left: calc(50% + var(--side-w) / 2); } }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 80;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 24px); padding: 11px 14px 11px 16px; border-radius: 12px;
  background: #1F2937; color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: toastin .2s ease-out;
}
:root[data-theme="dark"] .toast { background: #E8ECF3; color: #111827; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } }
.toast--ok { background: #166534; color: #fff; }
.toast--danger { background: #B91C1C; color: #fff; }
:root[data-theme="dark"] .toast--ok { background: #34D399; color: #062016; }
:root[data-theme="dark"] .toast--danger { background: #F87171; color: #2A0707; }
.toast__action { border: 0; background: rgba(255, 255, 255, .16); color: inherit; font-weight: 700; padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
:root[data-theme="dark"] .toast__action { background: rgba(0, 0, 0, .1); }
@media (min-width: 700px) { .toast { bottom: 24px; left: calc(50% + var(--side-w) / 2); } }

/* Телефонҳои хурд */
@media (max-width: 380px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .kpi { padding: 12px; }
  .kpi__value { font-size: 22px; }
  .ring { width: 112px; height: 112px; }
  .seg button { padding: 7px 10px; }
}
@media (max-width: 699px) {
  .hide-phone { display: none !important; }
}
@media (min-width: 700px) {
  .only-phone { display: none !important; }
}
@media print {
  .side, .tabbar, .topbar__actions, .selbar, .toast { display: none !important; }
  .shell { margin: 0; }
}

/* ── Ислоҳҳои телефон ва планшет ── */
.filters__top { display: flex; gap: 8px; }
.filters__top .search { flex: 1; min-width: 0; }
.badge-inline { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 12px; margin-left: 6px; }
:root[data-theme="dark"] .badge-inline { color: #0B0F17; }
@media (max-width: 699px) {
  .filters:not(.is-open) .filters__row, .filters:not(.is-open) .filters__range { display: none !important; }
  .today { flex-wrap: nowrap; gap: 14px; }
  .ring { width: 108px; height: 108px; }
  .ring__c b { font-size: 22px; }
  .today__legend { min-width: 0; }
  .lg-row { padding: 6px 4px; font-size: 13.5px; }
  .schedule-bar { flex-wrap: nowrap; padding: 12px; }
  .schedule-bar__text { min-width: 0; }
  .schedule-bar__text small { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .schedule-bar__ico { width: 36px; height: 36px; }
  .resultbar__actions .btn { padding: 0 10px; }
  .toolbar { gap: 8px; }
}
@media (min-width: 700px) {
  .cal__d { aspect-ratio: 1.7 / 1; min-height: 46px; }
  .sheet--wide .cal { gap: 6px; }
}
@media (max-width: 420px) {
  .kpi__ico { display: none; }
  .kpi__label { white-space: normal; }
}

/* ── Тоза кардани база: дар телефон — зери ҳам, дар компютер — паҳлӯи ҳам ── */
.danger-note { margin: 8px 16px 4px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.danger-list { display: flex; flex-direction: column; }
.danger-item { display: grid; gap: 10px; padding: 14px 16px; }
.danger-item + .danger-item { border-top: 1px solid var(--border); }
.danger-item__text { min-width: 0; }
.danger-item__text b { display: block; font-size: 14.5px; font-weight: 650; }
.danger-item__text small { display: block; margin-top: 2px; color: var(--text-3); font-size: 13px; line-height: 1.4; }
.danger-item__action { display: flex; gap: 8px; min-width: 0; }
.danger-item__action .input { flex: 1; min-width: 0; }
.danger-item__action .btn { flex-shrink: 0; }
@media (max-width: 699px) {
  .danger-item__action > .btn:only-child { width: 100%; }
}
@media (min-width: 700px) {
  .danger-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
  .danger-item__action { justify-content: flex-end; }
  .danger-item__action .input { width: 180px; flex: none; }
}

/* ── Имтиёзи дер омадан: соатҳои аниқ ── */
.gracechips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .gracechips { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.gracechips button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px;
  border-radius: 11px; border: 1.5px solid var(--border-2); background: var(--surface); color: var(--text-2);
}
.gracechips b { font-size: 16px; font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.gracechips small { font-size: 11.5px; color: var(--text-3); }
.gracechips button.is-on { border-color: var(--brand); background: var(--brand-soft); }
.gracechips button.is-on b, .gracechips button.is-on small { color: var(--brand-text); }
.grace-explain {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); font-size: 14px; color: var(--text-2);
}
.grace-explain p { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.grace-explain .dot { flex-shrink: 0; transform: translateY(-1px); }
/* Рӯзҳои ҳафта: ҳамеша дар як сатр */
.daychips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); max-width: 420px; }
.daychips button { width: auto; }
.grace-explain b { color: var(--text); }


/* ═══════════════════════════════════════════════════════════════════════
   v4.2 — фишурда, ором ва равон
   Ҳамаи андозаҳо каме хурдтар, фосилаҳо камтар, ҳаракатҳо нарм.
   ═══════════════════════════════════════════════════════════════════════ */
:root { --r-lg: 14px; --tabbar-h: 58px; }
html { scroll-behavior: smooth; }
body { font-size: 14.5px; }

/* Сарлавҳа ва ҷойгиршавӣ */
.topbar { padding-top: calc(8px + var(--safe-t)); padding-bottom: 8px; }
.topbar h1 { font-size: 18px; }
.main { padding-top: 4px; }
.view.is-active { gap: 12px; animation: fade .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grid, .grid-2, .grid-3 { gap: 12px; }
@media (min-width: 1100px) {
  :root { --side-w: 224px; }
  .topbar { padding: 14px 32px 10px; }
  .topbar h1 { font-size: 20px; }
  .main { padding-bottom: 36px; }
}
#home-hello:empty, .hello.is-merged { display: none; }

/* Картаҳо: сояи нозук, канори нарм */
.card { box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.card__head { padding: 12px 14px 0; }
.card__head h2 { font-size: 14px; letter-spacing: -.1px; }
.card__note { font-size: 12.5px; }
.card__body { padding: 12px 14px 14px; }
.section-title { font-size: 11.5px; margin: 4px 0 -2px; }

/* KPI */
.kpis { gap: 10px; }
.kpi { padding: 12px 14px; border-radius: 12px; gap: 2px; box-shadow: var(--shadow-sm); }
.kpi__label { font-size: 12.5px; }
.kpi__value { font-size: 22px; }
.kpi__ico { width: 26px; height: 26px; border-radius: 8px; }
.kpi__ico svg { width: 14px; height: 14px; }
@media (hover: hover) {
  button.kpi:hover, button.item:hover, .person:hover, .rq:hover { background: var(--surface-2); }
  button.kpi:hover { border-color: var(--border-2); transform: translateY(-1px); }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: scale(.97); }
}
button.kpi { transition: transform .15s ease, border-color .15s, background .15s; }

/* Тугмаҳо ва майдонҳо */
.btn { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 9px; transition: transform .12s ease, background .15s, border-color .15s, opacity .15s, box-shadow .15s; }
.btn--sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn--lg { min-height: 44px; font-size: 15px; border-radius: 10px; }
.btn--primary { box-shadow: 0 1px 2px rgba(79, 70, 229, .25); }
.iconbtn { width: 36px; height: 36px; border-radius: 9px; }
.input, .field input, .field select, .field textarea, .select { min-height: 40px; border-radius: 9px; padding: 8px 12px; }
@media (min-width: 700px) {
  .input, .field input, .field select, .field textarea, .select { font-size: 14.5px; }
}
.field { gap: 5px; }
.field__label { font-size: 12.5px; }
.stack { gap: 12px; }
.seg { border-radius: 10px; }
.seg button { padding: 6px 12px; font-size: 13.5px; transition: background .15s, color .15s, box-shadow .15s; }
.chip { padding: 5px 11px; font-size: 13px; transition: background .15s, color .15s, border-color .15s; }
.pill { padding: 2px 8px; font-size: 12px; }

/* Рӯйхатҳо */
.item, .rq { padding: 10px 14px; gap: 10px; transition: background .15s; }
.person { padding: 12px 14px; gap: 8px; transition: background .15s; }
.avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.avatar--sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11.5px; }
.avatar--lg { width: 52px; height: 52px; border-radius: 15px; font-size: 18px; }
.item__name, .rq__name { font-size: 14.5px; }
.item__sub { font-size: 12.5px; }
.rq__reason { font-size: 13.5px; }
.setting { padding: 10px 14px; }
.setting__text b { font-size: 14px; }
.setting__text small { font-size: 12.5px; }

/* Давомоти имрӯз ва графикҳо */
.today { gap: 18px; }
.ring { width: 116px; height: 116px; }
.ring__c b { font-size: 24px; }
.lg-row { padding: 5px 8px; font-size: 13.5px; transition: background .15s; }
.cols { height: 132px; padding-top: 18px; }
.col__bar { transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.legend { gap: 4px 12px; font-size: 12px; }
.donut { width: 132px; height: 132px; }
.mini { padding: 9px 11px; border-radius: 10px; }
.mini b { font-size: 16px; }
.mc { width: 26px; height: 26px; border-radius: 7px; }
.m-day { width: 32px; min-width: 32px; }

/* Менюи паҳлӯ: нишони фаъол ва ҳаракати нарм */
.side__link { min-height: 40px; font-size: 14px; transition: background .15s, color .15s; }
@media (min-width: 1100px) {
  .side__link.is-active::before {
    content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--brand);
  }
}

/* Менюи поён: тугмаи фаъол бо заминаи нарм */
.tab { gap: 2px; font-size: 10.5px; transition: color .15s; }
.tab svg { width: 21px; height: 21px; padding: 3px 12px; box-sizing: content-box; border-radius: 99px; transition: background .2s; }
.tab.is-active svg { background: var(--brand-soft); }
.badge-dot { top: 3px; }

/* Sheet ва toast */
.sheet__body { gap: 12px; }
.sheet__title { font-size: 18px; }
.sheet__panel { animation: slideup .26s cubic-bezier(.2, .8, .2, 1); }
.toast { border-radius: 11px; padding: 10px 12px 10px 14px; font-size: 13.5px; }

/* Салом дар сарлавҳа (саҳифаи асосӣ) */
.topbar__hello { font-size: 18px; }
@media (max-width: 380px) { .topbar h1 { font-size: 17px; } }
/* Сутунҳо: ҳатто агар 1–3 рӯз бошад, паҳн нашаванд */
.cols, .axis { justify-content: center; }
.col, .axis span { max-width: 64px; }
/* Кормандон: филтр ва тартиб дар як сатр */
.toolbar__group--fill { flex-wrap: nowrap; }
.toolbar__group--fill .select { width: auto; min-width: 0; }
@media (max-width: 699px) {
  .toolbar__group--fill { width: 100%; }
  .toolbar__group--fill .select { flex: 1; }
}
.hint-line { margin: 2px 4px 0; color: var(--text-3); font-size: 12.5px; line-height: 1.5; text-align: center; }
