/* Bonuz admin — lojuvard (Samarqand koshinlari) + za'faron ball; imzo: termoqog'oz chek lentasi. */
@font-face {
  font-family: "Medeo Sans"; src: url("fonts/MedeoSansVariable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Medeo Mono"; src: url("fonts/MedeoMonoVariable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --paper: #F4F6FA;      /* chinni fon */
  --surface: #FFFFFF;
  --thermal: #FFFDF7;    /* chek lentasi */
  --ink: #101A33;        /* siyoh */
  --ink-2: #4A5470;
  --ink-3: #8790A6;
  --line: #E2E6EF;
  --lapis: #2340C8;      /* asosiy amal */
  --lapis-ink: #1A2F96;
  --lapis-wash: #E9EDFC;
  --saffron: #F0A830;    /* faqat ball */
  --saffron-wash: #FDF3E1;
  --plus: #11845A;
  --minus: #C23A2F;
  --frost: #4F7FE0;      /* muzlatilgan */
  --frost-wash: #E8F0FD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,26,51,.05), 0 8px 24px -12px rgba(16,26,51,.14);
  --f-brand: "Unbounded", system-ui, sans-serif;          /* faqat logotip */
  --f-display: "Medeo Sans", system-ui, sans-serif;
  --f-ui: "Medeo Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Medeo Mono", ui-monospace, "SFMono-Regular", monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font: 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lapis); }
:focus-visible { outline: 2px solid var(--lapis); outline-offset: 2px; border-radius: 6px; }
.num, .mono { font-family: var(--f-mono); font-feature-settings: "tnum" 1; letter-spacing: -.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───────── kirish ───────── */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); }
.wordmark {
  font: 700 34px/1 var(--f-brand); letter-spacing: -.03em; margin: 0 0 6px;
  display: inline-flex; align-items: center;
}
.wordmark .coin-o {
  width: .74em; height: .74em; border-radius: 50%; background: var(--saffron);
  box-shadow: inset 0 0 0 .1em rgba(16,26,51,.14); margin: 0 .02em; transform: translateY(.04em);
}
.login-card .lead { color: var(--ink-2); margin: 0 0 28px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--lapis); box-shadow: 0 0 0 4px var(--lapis-wash); }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.input-prefix:focus-within { border-color: var(--lapis); box-shadow: 0 0 0 4px var(--lapis-wash); }
.input-prefix span { padding-left: 14px; color: var(--ink-3); font-family: var(--f-mono); font-size: 14px; }
.input-prefix .input { border: 0; box-shadow: none; padding-left: 8px; font-family: var(--f-mono); }
.code-input { font: 500 28px var(--f-mono); letter-spacing: .45em; text-align: center; height: 64px; padding-left: .45em; }
.hint { font-size: 13px; color: var(--ink-3); margin: -6px 0 16px; }
.error { color: var(--minus); font-size: 14px; margin: 0 0 12px; min-height: 1em; }

/* ───────── tugmalar ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s var(--ease), border-color .15s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--lapis); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--lapis-ink); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: #CBD2E1; }
.btn-danger { background: var(--minus); color: #fff; }
.btn-block { width: 100%; height: 50px; }
.btn-link { background: none; border: 0; color: var(--lapis); padding: 0; height: auto; font-weight: 600; cursor: pointer; }

/* ───────── karkas ───────── */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--line);
  background: var(--surface); display: flex; flex-direction: column; gap: 22px;
}
.rail .wordmark { font-size: 22px; padding: 0 10px; }
.tenant {
  display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--paper);
}
.tenant small { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tenant select { border: 0; background: none; font-weight: 600; padding: 0; appearance: none; cursor: pointer; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--lapis-wash); color: var(--lapis-ink); font-weight: 600; }
.rail-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 10px; font-size: 13px; color: var(--ink-3); }
.rail-foot .mono { color: var(--ink-2); font-size: 12px; }

.main { padding: 32px clamp(16px, 4vw, 48px) 64px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
h1 { font: 750 28px/1.12 var(--f-display); letter-spacing: -.025em; margin: 0; font-variation-settings: "opsz" 32; }
h2 { font: 600 17px/1.3 var(--f-ui); margin: 0 0 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* ───────── bosh sahifa ───────── */
.overview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.hero { padding: 28px; }
.hero .label { color: var(--ink-2); font-weight: 500; margin: 0 0 10px; }
.hero .big {
  font: 800 clamp(40px, 6.4vw, 68px)/1 var(--f-display); letter-spacing: -.045em;
  font-variation-settings: "opsz" 32; font-feature-settings: "tnum" 1;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.hero .big .num { font-family: var(--f-display); letter-spacing: -.045em; }
.hero .big .coin { width: .62em; height: .62em; vertical-align: .02em; }
.hero .big small { font: 500 16px var(--f-ui); color: var(--ink-3); letter-spacing: 0; }
.hero .sub { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.hero .sub b { font-family: var(--f-mono); font-weight: 500; color: var(--ink); }
.chart { margin-top: 26px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; color: var(--ink-3); }
.legend { display: flex; gap: 14px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.chart svg { width: 100%; height: 130px; display: block; overflow: visible; }
.chart-wrap { position: relative; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; text-align: center; padding: 0 16px; }
.axis-row { display: flex; justify-content: space-between; margin-top: 8px; font: 10px var(--f-mono); color: var(--ink-3); }
.chart .bar-plus { fill: var(--saffron); }
.chart .bar-minus { fill: var(--lapis); }
.chart .axis { fill: var(--ink-3); font: 10px var(--f-mono); }
.chart rect { transition: opacity .15s; }
.chart g:hover rect { opacity: .75; }

.people { margin-top: 24px; }
.split { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--paper); margin: 4px 0 12px; }
.split span { display: block; height: 100%; }
.split-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.split-legend b { font-family: var(--f-mono); font-weight: 500; color: var(--ink); margin-left: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

.feed { margin-top: 24px; }
.feed ul { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed .who { font-weight: 500; cursor: pointer; }
.feed .who:hover { color: var(--lapis); }
.feed .meta { font-size: 12px; color: var(--ink-3); }

/* ───────── IMZO: chek lentasi ───────── */
.tape {
  position: relative; background: var(--thermal); padding: 26px 22px;
  font-family: var(--f-mono); font-size: 12.5px; color: var(--ink);
  filter: drop-shadow(0 10px 18px rgba(16,26,51,.10)) drop-shadow(0 1px 1px rgba(16,26,51,.06));
}
.tape::before, .tape::after {
  content: ""; position: absolute; left: 0; right: 0; height: 9px;
  background:
    linear-gradient(-45deg, var(--thermal) 6.5px, transparent 0) 0 0/12px 9px repeat-x,
    linear-gradient(45deg, var(--thermal) 6.5px, transparent 0) 0 0/12px 9px repeat-x;
}
.tape::before { top: -8px; transform: scaleY(-1); }
.tape::after { bottom: -8px; }
.tape-title { text-align: center; font-weight: 500; letter-spacing: .18em; margin: 0 0 4px; }
.tape-sub { text-align: center; color: var(--ink-3); font-size: 11px; margin: 0 0 16px; }
.tape hr { border: 0; border-top: 1.5px dashed #CFC8B8; margin: 14px 0; }
.tl { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.tl .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl .lead { flex: 1; border-bottom: 1.5px dotted #CFC8B8; transform: translateY(-4px); min-width: 12px; }
.tl .v { white-space: nowrap; }
.tl .v.plus { color: var(--plus); }
.tl .v.minus { color: var(--minus); }
.tl.total { font-weight: 500; font-size: 14px; padding-top: 6px; }
.tl.total .k { letter-spacing: .08em; }
.tape-foot { text-align: center; color: var(--ink-3); font-size: 11px; margin-top: 16px; }
.tape .entry { padding: 7px 0; border-bottom: 1px dashed #E6E0D2; }
.tape .entry:last-child { border-bottom: 0; }
.tape .entry .tl { padding: 0; }
.tape .entry .note { color: var(--ink-3); font-size: 11px; margin-top: 2px; word-break: break-word; }
.coin { display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: var(--saffron); box-shadow: inset 0 0 0 .12em rgba(16,26,51,.13); vertical-align: -.05em; margin-right: .35em; }

/* ───────── mijozlar ───────── */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search { flex: 1 1 280px; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search .input { padding-left: 42px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-weight: 500; color: var(--ink-2); font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 0 14px 10px; }
.table td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: #F8F9FC; }
.table .right { text-align: right; }
.cust-name { font-weight: 600; }
.cust-phone { font-size: 12px; color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.pill-ok { background: #E6F4EE; color: var(--plus); }
.pill-frost { background: var(--frost-wash); color: var(--frost); }
.pill-staff { background: #EEF0F5; color: var(--ink-2); }
.pill-off { background: #FBEAE8; color: var(--minus); }
.balance { font-family: var(--f-mono); font-feature-settings: "tnum" 1; }
.balance.neg { color: var(--minus); }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; color: var(--ink-3); font-size: 13px; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ───────── panel (drawer) ───────── */
.scrim { position: fixed; inset: 0; background: rgba(16,26,51,.32); opacity: 0; animation: fade .2s var(--ease) forwards; z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--paper);
  z-index: 41; overflow-y: auto; padding: 24px; box-shadow: -20px 0 40px -20px rgba(16,26,51,.25);
  transform: translateX(24px); opacity: 0; animation: slide .25s var(--ease) forwards;
}
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer-close { border: 0; background: var(--surface); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; border: 1px solid var(--line); }
.bal-big { font: 800 44px/1 var(--f-display); letter-spacing: -.045em; margin: 4px 0 6px; font-variation-settings: "opsz" 32; font-feature-settings: "tnum" 1; }
.bal-big.neg { color: var(--minus); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.actions { display: grid; gap: 10px; margin-bottom: 24px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.action-row .btn { flex: 1; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.sign { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sign button { border: 0; background: var(--surface); width: 48px; height: 46px; font: 600 18px var(--f-mono); cursor: pointer; }
.sign button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.inline { display: flex; gap: 10px; align-items: center; }
.inline .input { flex: 1; }
.confirm-line { font-size: 14px; color: var(--ink-2); }
.confirm-line b { color: var(--ink); font-family: var(--f-mono); font-weight: 500; }

/* ───────── mijozlar: Excel kabi jadval ───────── */
.xl-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.xl-head h1 { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.cx-count { font: 500 15px var(--f-mono); color: var(--ink-3); letter-spacing: 0; }
.xl-head .search { flex: 0 1 300px; }
.xl-head .search .input { height: 40px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip .dot { margin: 0; }
.chip b { font: 500 12px var(--f-mono); color: var(--ink-3); }
.chip:hover { border-color: #CBD2E1; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] b { color: #C3CADB; }

.xl-wrap { padding: 0; overflow: hidden; }
.xl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.xl thead th {
  position: sticky; top: 0; z-index: 2; background: #F8F9FC; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); padding: 0;
}
.xl thead th:not(:has(button)) { padding: 10px 12px; }
.xl thead th button {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 38px; padding: 0 12px; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer;
}
.xl thead th.r button { justify-content: flex-end; }
.xl thead th button:hover { color: var(--ink); background: #EEF1F7; }
.xl .arrow { width: 0; height: 0; border: 4px solid transparent; opacity: 0; }
.xl th[aria-sort="descending"] .arrow { opacity: 1; border-top-color: var(--lapis); margin-top: 4px; }
.xl th[aria-sort="ascending"] .arrow { opacity: 1; border-bottom-color: var(--lapis); margin-bottom: 4px; }
.xl th[aria-sort="descending"], .xl th[aria-sort="ascending"] { color: var(--lapis-ink); }
.xl td { padding: 0 12px; height: 40px; border-bottom: 1px solid #EEF1F6; white-space: nowrap; }
.xl td.r, .xl th.r { text-align: right; }
.xl tbody tr[data-id] { cursor: pointer; transition: background .1s; }
.xl tbody tr[data-id]:nth-child(even) { background: #FBFCFE; }
.xl tbody tr[data-id]:hover { background: #F2F5FB; }
.xl tbody tr[data-id]:focus-visible { outline: 2px solid var(--lapis); outline-offset: -2px; }
.xl tbody tr[aria-expanded="true"] { background: var(--lapis-wash) !important; }
.xl tbody tr[data-id] td:first-child { position: relative; padding-left: 18px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.xl tbody tr[data-id] td:first-child::before {
  content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--plus);
}
.xl tbody tr.st-frozen td:first-child::before { background: var(--frost); }
.xl tbody tr.st-staff td:first-child::before { background: var(--ink-3); }
.xl-name { font-weight: 600; }
.xl-sub { display: none; }
.xl-muted { color: var(--ink-3); }
.xl-bal { font-weight: 500; }
.xl-bal.zero { color: var(--ink-3); font-weight: 400; }
.xl-bal.neg { color: var(--minus); }
.xl .pill { padding: 2px 8px; font-size: 11.5px; }
.xl-detail td { height: auto; padding: 0; background: #F7F9FD; white-space: normal; border-bottom: 1px solid var(--line); }
.xl-panel { padding: 16px 18px 16px 18px; border-left: 3px solid var(--lapis); animation: rise .2s var(--ease); }
.xl-panel-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.xl-sum-bal { font: 700 28px/1.1 var(--f-display); letter-spacing: -.03em; font-feature-settings: "tnum" 1; display: flex; align-items: center; gap: 2px; }
.xl-sum-bal .coin { width: .62em; height: .62em; }
.xl-sum-bal.neg { color: var(--minus); }
.xl-sum .xl-muted { font-size: 13px; }
.xl-hist { font-family: var(--f-mono); font-size: 12px; min-width: 0; }
.xl-hist .tl { padding: 2px 0; }
.xl-hist .k { color: var(--ink-2); }
.xl-acts { display: grid; gap: 8px; }
.xl-acts .btn { height: 38px; font-size: 14px; }
.xl-adjust { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.xl-adjust .sign button { height: 40px; }
.xl-adjust .input { height: 40px; }
.xl-adjust [data-f="pts"] { width: 130px; }
.xl-adjust [data-f="note"] { flex: 1 1 280px; }
.xl-adjust .btn { height: 40px; }
.xl-adjust .confirm-line { flex-basis: 100%; margin: 0; }
.xl-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; color: var(--ink-3); font-size: 13px; flex-wrap: wrap; }
.xl-pager nav { display: flex; gap: 4px; align-items: center; }
.xl-pager button {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  font: 500 13px var(--f-mono); color: var(--ink-2); cursor: pointer;
}
.xl-pager button[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.xl-pager button:disabled { opacity: .4; cursor: default; }
.xl-pager .gap { padding: 0 4px; }
@media (max-width: 1100px) {
  .xl .hide-md { display: none; }
  .xl-panel-grid { grid-template-columns: 1fr; gap: 14px; }
  .xl-acts { grid-auto-flow: column; justify-content: start; }
}
@media (max-width: 760px) {
  .xl .hide-sm { display: none; }
  .xl-head .search { flex: 1 1 100%; order: 2; }
  .chips { order: 3; overflow-x: auto; flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .chip { flex: none; }
  .xl td { height: 52px; }
  .xl-sub { display: block; font-size: 12px; color: var(--ink-3); }
  .xl-dash { display: none; }
  .xl tbody tr[data-id]:not(:has(.xl-name)) .xl-sub { font-size: 13.5px; color: var(--ink); }
  .xl tbody tr[data-id] td:first-child { max-width: 200px; }
  .xl-acts { grid-auto-flow: row; }
}

/* ───────── kampaniya / hamkor / sozlama ───────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.calc { display: grid; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--saffron-wash); }
.calc .eq { font: 800 32px/1.1 var(--f-display); letter-spacing: -.035em; font-variation-settings: "opsz" 32; }
.calc .expl { color: var(--ink-2); font-size: 14px; }
.stubs { display: grid; gap: 22px; }
.partner { display: grid; gap: 10px; }
.partner-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.partner .name { font-weight: 600; font-size: 16px; }
.partner .prefix { font-size: 12px; color: var(--ink-3); }
.perms { display: flex; gap: 6px; flex-wrap: wrap; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #CED4E0; transition: background .15s; pointer-events: none; }
.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,.2); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--lapis); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--lapis); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.key-box { font: 500 13px var(--f-mono); background: var(--ink); color: #fff; padding: 14px; border-radius: 12px; word-break: break-all; }
.warn { background: var(--saffron-wash); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.preview { display: grid; gap: 10px; }
.preview .tl { font-family: var(--f-mono); font-size: 13px; }
.audit li { grid-template-columns: 1fr auto; }

/* ───────── toast, holatlar ───────── */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; pointer-events: none; }
#toast div { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; box-shadow: var(--shadow); animation: rise .25s var(--ease); }
#toast div.bad { background: var(--minus); }
.skeleton { background: linear-gradient(90deg, #ECEFF5 0%, #F5F7FB 50%, #ECEFF5 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 10px; }
@keyframes fade { to { opacity: 1; } }
@keyframes slide { to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.reveal { animation: rise .35s var(--ease) both; }

/* ───────── mobil ───────── */
.mobile-head { display: none; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.mobile-head .wordmark { font-size: 20px; margin: 0; }
@media (max-width: 1080px) {
  .overview { grid-template-columns: 1fr; }
  .overview .tape { max-width: 460px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 30;
    flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
  }
  .rail .wordmark, .rail .tenant, .rail-foot { display: none; }
  .nav { grid-auto-flow: column; width: 100%; }
  .nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 4px; text-align: center; }
  .main { padding: 20px 16px 96px; }
  .mobile-head { display: flex; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
  .table td { border: 0; padding: 0; }
  .table td.hide-sm { display: none; }
  .drawer { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
