/* =========================================================
   صافي | Safy — Admin dashboard prototype styles
   Semantic tokens on top of ../assets/brand.css
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #F1F6F8;
  --bg-tint: radial-gradient(1100px 520px at 100% -8%, rgba(11, 163, 179, .085), transparent 62%), radial-gradient(900px 520px at -8% 108%, rgba(201, 240, 107, .12), transparent 60%);
  --surface: #FFFFFF;
  --surface-2: #F7FAFB;
  --surface-3: #EEF4F6;
  --sunken: #F2F7F8;
  --border: #E2EAEE;
  --border-2: #CFDCE2;
  --text: #0A2230;
  --text-2: #4A6573;
  --text-3: #7A92A0;
  --brand: #08707E;
  --brand-2: #0BA3B3;
  --brand-hover: #075E6B;
  --brand-soft: #E3F6F8;
  --brand-text: #08707E;
  --on-brand: #FFFFFF;
  --pos: #12915A; --pos-bg: #E3F7EC;
  --neg: #D93C2E; --neg-bg: #FFE9E6;
  --warn: #B86E00; --warn-bg: #FFF2DB;
  --info: #2B72D6; --info-bg: #E4EFFD;
  --amber: #C98500; --amber-bg: #FFF3D6;
  --violet: #7454E0; --violet-bg: #EFEAFE;
  --citrus-ink: #4E6B0C; --citrus-bg: #F1FBD5;
  --row-hover: #F4FAFB;
  --row-sel: #E9F7F9;
  --shadow: 0 1px 2px rgba(6, 40, 52, .04), 0 8px 24px -14px rgba(6, 40, 52, .18);
  --shadow-lg: 0 24px 60px -18px rgba(6, 40, 52, .32), 0 6px 16px -8px rgba(6, 40, 52, .12);
  --ring: 0 0 0 3px rgba(11, 163, 179, .28);
  --overlay: rgba(3, 26, 31, .46);
  --skel: #E6EEF1; --skel-2: #F4F8FA;
  --pill-mix: #000;
  --grid-line: #E8EFF2;
  --phone-bg: #F4F8F9;
  --sb-w: 268px;
  --top-h: 64px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #061419;
  --bg-tint: radial-gradient(1100px 520px at 100% -8%, rgba(11, 163, 179, .12), transparent 62%), radial-gradient(900px 520px at -8% 108%, rgba(201, 240, 107, .05), transparent 60%);
  --surface: #0B1F28;
  --surface-2: #0E2731;
  --surface-3: #12303B;
  --sunken: #081A21;
  --border: #173542;
  --border-2: #224758;
  --text: #E3EFF2;
  --text-2: #A2B8C2;
  --text-3: #7590A0;
  --brand: #08707E;
  --brand-2: #38C2CF;
  --brand-hover: #098A99;
  --brand-soft: rgba(56, 194, 207, .12);
  --brand-text: #5FD0DB;
  --pos: #42D48D; --pos-bg: rgba(66, 212, 141, .12);
  --neg: #FF7C70; --neg-bg: rgba(255, 92, 77, .14);
  --warn: #FFB547; --warn-bg: rgba(255, 176, 32, .13);
  --info: #74AEFF; --info-bg: rgba(47, 128, 237, .16);
  --amber: #FFC24D; --amber-bg: rgba(255, 176, 32, .13);
  --violet: #AE97FF; --violet-bg: rgba(142, 108, 239, .16);
  --citrus-ink: #C9F06B; --citrus-bg: rgba(201, 240, 107, .11);
  --row-hover: #0E2630;
  --row-sel: #0F2E38;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -16px rgba(0, 0, 0, .65);
  --shadow-lg: 0 28px 70px -20px rgba(0, 0, 0, .75), 0 6px 16px -8px rgba(0, 0, 0, .4);
  --ring: 0 0 0 3px rgba(56, 194, 207, .35);
  --overlay: rgba(0, 8, 12, .62);
  --skel: #10303B; --skel-2: #163B48;
  --pill-mix: #fff;
  --grid-line: #14313D;
  --phone-bg: #0A1C24;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #061419;
    --bg-tint: radial-gradient(1100px 520px at 100% -8%, rgba(11, 163, 179, .12), transparent 62%), radial-gradient(900px 520px at -8% 108%, rgba(201, 240, 107, .05), transparent 60%);
    --surface: #0B1F28;
    --surface-2: #0E2731;
    --surface-3: #12303B;
    --sunken: #081A21;
    --border: #173542;
    --border-2: #224758;
    --text: #E3EFF2;
    --text-2: #A2B8C2;
    --text-3: #7590A0;
    --brand: #08707E;
    --brand-2: #38C2CF;
    --brand-hover: #098A99;
    --brand-soft: rgba(56, 194, 207, .12);
    --brand-text: #5FD0DB;
    --pos: #42D48D; --pos-bg: rgba(66, 212, 141, .12);
    --neg: #FF7C70; --neg-bg: rgba(255, 92, 77, .14);
    --warn: #FFB547; --warn-bg: rgba(255, 176, 32, .13);
    --info: #74AEFF; --info-bg: rgba(47, 128, 237, .16);
    --amber: #FFC24D; --amber-bg: rgba(255, 176, 32, .13);
    --violet: #AE97FF; --violet-bg: rgba(142, 108, 239, .16);
    --citrus-ink: #C9F06B; --citrus-bg: rgba(201, 240, 107, .11);
    --row-hover: #0E2630;
    --row-sel: #0F2E38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -16px rgba(0, 0, 0, .65);
    --shadow-lg: 0 28px 70px -20px rgba(0, 0, 0, .75), 0 6px 16px -8px rgba(0, 0, 0, .4);
    --ring: 0 0 0 3px rgba(56, 194, 207, .35);
    --overlay: rgba(0, 8, 12, .62);
    --skel: #10303B; --skel-2: #163B48;
    --pill-mix: #fff;
    --grid-line: #14313D;
    --phone-bg: #0A1C24;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-ui); font-size: 14px; line-height: 1.55;
  color: var(--text); background-color: var(--bg); background-image: var(--bg-tint); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(11, 163, 179, .22); }
.ic { width: 18px; height: 18px; flex: none; stroke-width: 2; }
.ic.sm { width: 15px; height: 15px; }
.ic.xs { width: 13px; height: 13px; }
.ic.lg { width: 22px; height: 22px; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.num, .tbl td, .kpi-val { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.b { font-weight: 600; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp { flex: 1; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.end { text-align: end; }
.center { text-align: center; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--grad-night); color: #fff; display: flex; flex-direction: column; z-index: 50;
  isolation: isolate;
}
.sidebar::before, .sidebar::after {
  content: ""; position: absolute; border-radius: 50%; z-index: -1; pointer-events: none;
}
.sidebar::before { width: 260px; height: 260px; inset-block-end: -90px; inset-inline-end: -110px; background: radial-gradient(circle at 35% 35%, rgba(201, 240, 107, .16), rgba(201, 240, 107, 0) 65%); }
.sidebar::after { width: 140px; height: 140px; inset-block-end: 120px; inset-inline-start: -70px; background: radial-gradient(circle at 40% 40%, rgba(125, 218, 226, .14), rgba(125, 218, 226, 0) 70%); }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 14px; }
.sb-head .safy-lockup { --lk: 30px !important; }
.sb-env { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; border-radius: 99px; background: rgba(201, 240, 107, .16); color: var(--citrus-400); }
.sb-close { display: none; color: #fff; opacity: .8; padding: 6px; border-radius: 8px; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.sb-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); background-clip: content-box; }
.nav-g { margin-top: 14px; }
.nav-gl { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .46); padding: 0 12px 6px; }
.nav-i {
  position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 11px;
  color: rgba(255, 255, 255, .78); font-weight: 400; font-size: 13.5px; transition: background .18s, color .18s;
}
.nav-i:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-i .ic { width: 18px; height: 18px; opacity: .9; }
.nav-i.on { background: linear-gradient(90deg, rgba(201, 240, 107, .16), rgba(201, 240, 107, .06)); color: #fff; font-weight: 500; }
[dir="rtl"] .nav-i.on { background: linear-gradient(270deg, rgba(201, 240, 107, .16), rgba(201, 240, 107, .06)); }
.nav-i.on::before { content: ""; position: absolute; inset-inline-start: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--citrus-400); }
[dir="rtl"] .nav-i.on::before { border-radius: 4px 0 0 4px; }
.nav-i.on .ic { color: var(--citrus-400); opacity: 1; }
.nav-b { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; font-variant-numeric: tabular-nums; }
.nav-b.hot { background: var(--citrus-400); color: var(--aqua-950); }
.nav-b.alert { background: var(--coral-500); color: #fff; }
.sb-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sb-store { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.sb-store .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--citrus-400); box-shadow: 0 0 0 4px rgba(201, 240, 107, .18); animation: pulse 2s infinite; }
.sb-store b { font-size: 12.5px; font-weight: 500; display: block; }
.sb-store small { font-size: 11px; color: rgba(255, 255, 255, .6); }
.sb-scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  display: flex; align-items: center; gap: 10px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.tb-menu { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs b { color: var(--text); font-weight: 600; font-size: 14px; }
.tb-search {
  margin-inline-start: auto; display: flex; align-items: center; gap: 8px; width: min(360px, 34vw); height: 40px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); font-size: 13px; transition: border-color .2s, box-shadow .2s;
}
.tb-search:hover { border-color: var(--border-2); }
.tb-search span { flex: 1; text-align: start; }
kbd { font-family: var(--font-ui); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3); direction: ltr; }
.tb-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); transition: background .18s, color .18s; }
.tb-btn:hover { background: var(--surface-3); color: var(--text); }
.tb-btn .bdg { position: absolute; top: 7px; inset-inline-end: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--coral-500); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--bg); box-sizing: content-box; }
.tb-lang { width: auto; padding: 0 10px; font-weight: 600; font-size: 13px; gap: 6px; display: inline-flex; align-items: center; }
.tb-me { display: flex; align-items: center; gap: 8px; padding: 4px; padding-inline-end: 10px; border-radius: 12px; transition: background .18s; }
.tb-me:hover { background: var(--surface-3); }
.tb-me .who { text-align: start; line-height: 1.2; }
.tb-me .who b { font-size: 12.5px; font-weight: 600; display: block; }
.tb-me .who small { font-size: 11px; color: var(--text-3); }
.view { width: 100%; max-width: 1520px; margin-inline: auto; padding: 24px 28px 96px; }
.view.enter { animation: viewIn .38s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.proto-link {
  position: fixed; inset-block-end: 16px; inset-inline-start: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 99px;
  background: var(--aqua-950); color: #fff; font-size: 12px; font-weight: 500; box-shadow: 0 8px 22px -8px rgba(3, 42, 49, .6); border: 1px solid rgba(255, 255, 255, .12);
}
.proto-link:hover { text-decoration: none; background: var(--aqua-900); }
.proto-link .ic { color: var(--citrus-400); }
body.has-shell .proto-link { display: none; }
.sb-proto { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; margin-bottom: 8px; border-radius: 10px; font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .82); border: 1px dashed rgba(255, 255, 255, .22); }
.sb-proto:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.sb-proto .ic { color: var(--citrus-400); width: 16px; height: 16px; }
.sb-proto small { margin-inline-start: auto; font-size: 10.5px; color: rgba(255, 255, 255, .5); }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph .sub { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 12.5px; margin-bottom: 6px; }
.back:hover { color: var(--brand-text); text-decoration: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; min-height: 44px; flex-wrap: wrap; }
.card-h h2 { display: flex; align-items: center; gap: 8px; }
.card-h h2 .ic { color: var(--brand-text); }
.card-h .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-b { padding: 16px 18px 18px; }
.card-f { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.card-f > .row { flex-wrap: wrap; }
.card.pad { padding: 18px; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--surface-2); }
.sec-t { font-size: 12px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-32 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sticky-col { position: sticky; top: calc(var(--top-h) + 16px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 11px;
  font-size: 13.5px; font-weight: 500; white-space: nowrap; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: background .18s, border-color .18s, box-shadow .18s, transform .12s, color .18s; user-select: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn .ic { width: 17px; height: 17px; }
.btn-p { background: var(--brand); border-color: transparent; color: var(--on-brand); box-shadow: 0 6px 16px -8px rgba(8, 112, 126, .7); }
.btn-p:hover { background: var(--brand-hover); border-color: transparent; }
.btn-citrus { background: var(--citrus-400); color: var(--aqua-950); border-color: transparent; }
.btn-citrus:hover { background: var(--citrus-500); border-color: transparent; }
.btn-danger { background: var(--coral-600); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #cc3a2d; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-text); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand-soft) 70%, var(--brand-2) 18%); border-color: transparent; }
.btn-ok { background: var(--pos-bg); color: var(--pos); border-color: transparent; }
.btn-ok:hover { background: color-mix(in srgb, var(--pos-bg) 80%, var(--pos) 14%); border-color: transparent; }
.btn-no { background: var(--neg-bg); color: var(--neg); border-color: transparent; }
.btn-no:hover { background: color-mix(in srgb, var(--neg-bg) 80%, var(--neg) 14%); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-xs { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn-xs .ic { width: 14px; height: 14px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-i { width: 38px; padding: 0; }
.btn-i.btn-sm { width: 32px; }
.btn-i.btn-xs { width: 28px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn.loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn:not(.btn-p).loading::after { border-color: var(--border-2); border-top-color: var(--brand-2); }
.link { color: var(--brand-text); font-weight: 500; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ibtn { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--text-3); transition: background .15s, color .15s; }
.ibtn:hover { background: var(--surface-3); color: var(--text); }
.ibtn.danger:hover { background: var(--neg-bg); color: var(--neg); }

/* ---------- forms ---------- */
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > label, .lbl { font-size: 12.5px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.lbl .req { color: var(--neg); }
.hint { font-size: 11.5px; color: var(--text-3); }
.inp, .sel, .ta {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13.5px; transition: border-color .18s, box-shadow .18s, background .18s; min-width: 0;
}
.inp::placeholder, .ta::placeholder { color: var(--text-3); }
.inp:hover, .sel:hover, .ta:hover { border-color: var(--border-2); }
.inp:focus, .sel:focus, .ta:focus { border-color: var(--brand-2); box-shadow: var(--ring); outline: none; }
.inp.sm, .sel.sm { height: 34px; font-size: 13px; border-radius: 9px; padding: 0 10px; }
.ta { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.sel { appearance: none; -webkit-appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A92A0' stroke-width='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; cursor: pointer; }
[dir="rtl"] .sel { background-position: left 10px center; }
.inp-g { position: relative; display: flex; align-items: center; }
.inp-g > .ic { position: absolute; inset-inline-start: 12px; color: var(--text-3); pointer-events: none; }
.inp-g > .inp { padding-inline-start: 38px; }
.inp-g .suf { position: absolute; inset-inline-end: 10px; font-size: 12px; color: var(--text-3); pointer-events: none; }
.inp-g .suf-btn { position: absolute; inset-inline-end: 6px; }
.inp-g > .inp.has-suf { padding-inline-end: 52px; }
/* inputs whose own direction differs from the page (e.g. email in RTL) — keep padding on the icon side */
[dir="rtl"] .inp-g > .ic ~ .inp[dir="ltr"] { padding-left: 12px; padding-right: 38px; }
[dir="rtl"] .inp-g > .ic ~ .inp[dir="ltr"].has-suf { padding-left: 52px; }
[dir="ltr"] .inp-g > .ic ~ .inp[dir="rtl"] { padding-right: 12px; padding-left: 38px; }
.inp.num, .inp[type="number"] { font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-inner-spin-button { opacity: .4; }
input[type="date"], input[type="time"], input[type="datetime-local"] { min-height: 40px; }
input[type="color"] { -webkit-appearance: none; appearance: none; width: 40px; height: 40px; padding: 3px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.fgrid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fgrid .full { grid-column: 1 / -1; }

.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.chk input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--surface); display: inline-grid; place-items: center; transition: background .15s, border-color .15s; flex: none; cursor: pointer; margin: 0; }
.chk input:checked, .chk input:indeterminate { background: var(--brand); border-color: var(--brand); }
.chk input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-inline-end: 0; transform: rotate(-45deg) translate(1px, -1px); }
[dir="rtl"] .chk input:checked::after { border-inline-end: 2px solid #fff; border-inline-start: 0; transform: rotate(-45deg) translate(1px, -1px); border-right: 0; border-left: 2px solid #fff; }
.chk input:indeterminate::after { content: ""; width: 8px; height: 2px; background: #fff; border-radius: 2px; }
.chk input:focus-visible { box-shadow: var(--ring); }
.rad input { border-radius: 50%; }
.rad input:checked::after { width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 0 !important; transform: none !important; }

.sw { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw .tr { width: 38px; height: 22px; border-radius: 99px; background: var(--border-2); position: relative; transition: background .2s; flex: none; }
.sw .tr::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .22s var(--ease-spring); }
.sw input:checked + .tr { background: var(--brand-2); }
.sw input:checked + .tr::after { transform: translateX(16px); }
[dir="rtl"] .sw input:checked + .tr::after { transform: translateX(-16px); }
.sw input:focus-visible + .tr { box-shadow: var(--ring); }
.sw.sm .tr { width: 32px; height: 18px; }
.sw.sm .tr::after { width: 12px; height: 12px; }
.sw.sm input:checked + .tr::after { transform: translateX(14px); }
[dir="rtl"] .sw.sm input:checked + .tr::after { transform: translateX(-14px); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border); flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: background .18s, color .18s, box-shadow .18s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(6, 40, 52, .12); }
.seg.sm button { height: 28px; padding: 0 10px; font-size: 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: color .18s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand-text); }
.tab.on::after { content: ""; position: absolute; inset-inline: 8px; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--brand-2); animation: grow .25s var(--ease-out); }
.tab .cnt { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.tab.on .cnt { background: var(--brand-soft); color: var(--brand-text); }
@keyframes grow { from { transform: scaleX(.3); opacity: .3; } }
.ltabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--surface-3); }
.ltabs button { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.ltabs button.on { background: var(--surface); color: var(--brand-text); box-shadow: 0 1px 2px rgba(6, 40, 52, .12); }

/* ---------- chips & pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; color: color-mix(in srgb, var(--c, #7A92A0) 80%, var(--pill-mix)); background: color-mix(in srgb, var(--c, #7A92A0) 13%, transparent); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, #7A92A0); flex: none; }
.pill.lg { height: 28px; padding: 0 12px; font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.chip .ic { width: 13px; height: 13px; }
.chip-pos { background: var(--pos-bg); color: var(--pos); }
.chip-neg { background: var(--neg-bg); color: var(--neg); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-brand { background: var(--brand-soft); color: var(--brand-text); }
.chip-amber { background: var(--amber-bg); color: var(--amber); }
.chip-violet { background: var(--violet-bg); color: var(--violet); }
.chip-citrus { background: var(--citrus-bg); color: var(--citrus-ink); }
.chip-zero { background: var(--surface-3); color: var(--text-3); }
.chip-out { background: transparent; border: 1px solid var(--border); }
.chip.k { font-weight: 600; letter-spacing: .02em; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11.5px; direction: ltr; }
.tier { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 99px; font-size: 11.5px; font-weight: 600; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); white-space: nowrap; }
.tier i { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 50%, #fff), var(--tc)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.new { background: var(--info-bg); color: var(--info); }
.badge.best { background: var(--amber-bg); color: var(--amber); }
.badge.flash { background: var(--neg-bg); color: var(--neg); }
.badge.offer { background: var(--citrus-bg); color: var(--citrus-ink); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 rgba(18, 161, 94, .5); animation: ping 1.8s infinite; display: inline-block; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(18, 161, 94, .45); } 80%, 100% { box-shadow: 0 0 0 8px rgba(18, 161, 94, 0); } }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes spin { to { transform: rotate(360deg); } }

.av { width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; flex: none; font-weight: 600; font-size: 13px; color: #fff; background: var(--avc, var(--aqua-600)); letter-spacing: 0; }
.av.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.av.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }
.av.xl { width: 72px; height: 72px; border-radius: 20px; font-size: 26px; }
.av.round { border-radius: 50%; }
.thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--tb, var(--surface-3)); display: grid; place-items: center; flex: none; overflow: hidden; }
.thumb svg { width: 88%; height: 88%; }
.thumb.sm { width: 36px; height: 36px; border-radius: 10px; }
.thumb.lg { width: 64px; height: 64px; border-radius: 14px; }
.thumbs { display: flex; }
.thumbs .thumb { border: 2px solid var(--surface); margin-inline-start: -10px; }
.thumbs .thumb:first-child { margin-inline-start: 0; }
.ent { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ent b { font-weight: 500; display: block; font-size: 13.5px; }
.ent small { color: var(--text-3); font-size: 12px; display: block; }
.ent .t { min-width: 0; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; position: relative; }
.tbl-wrap.scroll { max-height: calc(100vh - 270px); min-height: 280px; overflow: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 500; text-align: start; padding: 0 14px; height: 42px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.tbl th:first-child { border-start-start-radius: 0; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--row-hover); }
.tbl tbody tr.sel { background: var(--row-sel); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .w1 { width: 1%; }
.tbl td.end, .tbl th.end { text-align: end; }
.tbl td.wrap { white-space: normal; }
.tbl .ra { opacity: .0; transition: opacity .15s; display: inline-flex; gap: 2px; }
.tbl tr:hover .ra, .tbl tr:focus-within .ra { opacity: 1; }
.tbl.compact td { padding: 8px 12px; }
.tbl.compact th { height: 36px; padding: 0 12px; }
.tbl tr.flash-in { animation: rowIn 1.6s var(--ease-out); }
@keyframes rowIn { 0% { background: var(--citrus-bg); } 100% { background: transparent; } }
.tbl tr.leaving { animation: rowOut .45s var(--ease-out) forwards; }
@keyframes rowOut { to { opacity: 0; transform: translateX(-24px); } }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.pager { display: flex; gap: 4px; }
.pager button { min-width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; display: inline-grid; place-items: center; padding: 0 8px; }
.pager button.on { background: var(--brand); color: #fff; border-color: transparent; }
.pager button:hover:not(.on) { background: var(--surface-3); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.filters .inp-g { flex: 1 1 220px; max-width: 320px; }
.filters .sel, .filters .inp { width: auto; height: 36px; font-size: 13px; border-radius: 10px; }
.filters .inp-g .inp { width: 100%; }
.bulk {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--aqua-950); color: #fff; font-size: 13px; flex-wrap: wrap;
  animation: slideDown .25s var(--ease-out);
}
.bulk .btn { height: 30px; font-size: 12.5px; background: rgba(255, 255, 255, .1); color: #fff; border-color: transparent; }
.bulk .btn:hover { background: rgba(255, 255, 255, .18); }
.bulk .sel { height: 30px; width: auto; background-color: rgba(255, 255, 255, .1); color: #fff; border-color: transparent; font-size: 12.5px; }
.bulk .sel option { color: var(--text); background: var(--surface); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } }
.cbar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 70px; }
.cbar i { display: block; height: 100%; border-radius: inherit; background: var(--bc, var(--brand-2)); transition: width .6s var(--ease-out); }
.meter { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.meter small { font-size: 11px; color: var(--text-3); display: flex; justify-content: space-between; gap: 6px; }

/* ---------- KPI ---------- */
.kpi { position: relative; padding: 16px 16px 14px; overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-l { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--kbg, var(--brand-soft)); color: var(--kc, var(--brand-text)); }
.kpi-ic .ic { width: 18px; height: 18px; }
.kpi-val { font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.kpi-val small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-inline-start: 3px; letter-spacing: 0; }
.kpi-f { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.delta.up { color: var(--pos); background: var(--pos-bg); }
.delta.down { color: var(--neg); background: var(--neg-bg); }
.delta .ic { width: 13px; height: 13px; }
.kpi .vs { font-size: 11.5px; color: var(--text-3); }
.spark { width: 92px; height: 34px; flex: none; overflow: visible; }
.kpi.hero { background: var(--grad-night); color: #fff; border-color: transparent; }
.kpi.hero .kpi-l, .kpi.hero .vs { color: rgba(255, 255, 255, .7); }
.kpi.hero .kpi-ic { background: rgba(201, 240, 107, .16); color: var(--citrus-400); }
.kpi.hero .delta.up { background: rgba(201, 240, 107, .18); color: var(--citrus-400); }
.kpi.hero .kpi-val small { color: rgba(255, 255, 255, .6); }
.kpi.hero::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; inset-block-start: -70px; inset-inline-end: -50px; background: radial-gradient(circle, rgba(201, 240, 107, .2), transparent 70%); pointer-events: none; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--border); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.mini-stats > div { background: var(--surface); padding: 12px 14px; }
.mini-stats b { display: block; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-stats small { font-size: 11.5px; color: var(--text-3); }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; height: 260px; direction: ltr; }
.chart svg { display: block; overflow: visible; }
.chart .gl { stroke: var(--grid-line); stroke-width: 1; }
.chart .ax { fill: var(--text-3); font-size: 11px; font-family: var(--font-ui); }
.chart .hl { stroke: var(--border-2); stroke-dasharray: 3 3; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; min-width: 160px; padding: 10px 12px; border-radius: 12px; background: var(--aqua-950); color: #fff; font-size: 12px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; direction: inherit; }
.chart-tip.on { opacity: 1; transform: none; }
.chart-tip b { display: block; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .65); margin-bottom: 6px; }
.chart-tip .r { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-variant-numeric: tabular-nums; }
.chart-tip .r i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.dash { height: 2px; width: 14px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--text-3) 0 4px, transparent 4px 7px) !important; }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { width: 168px; height: 168px; flex: none; position: relative; }
.donut svg { transform: rotate(-90deg); }
.donut circle.seg { transition: stroke-dasharray .8s var(--ease-out), opacity .2s; }
.donut-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-c b { font-size: 26px; font-weight: 600; display: block; line-height: 1.1; }
.donut-c small { font-size: 11.5px; color: var(--text-3); }
.dl { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.dl a { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); padding: 3px 6px; border-radius: 8px; }
.dl a:hover { background: var(--surface-3); text-decoration: none; color: var(--text); }
.dl a i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.dl a b { margin-inline-start: auto; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar { display: flex; flex-direction: column; gap: 10px; }
.hbar-r { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 12.5px; }
.hbar-r .cbar { grid-column: 1 / -1; height: 7px; }
.vbars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.vbars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.vbars i { width: 100%; max-width: 28px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); transition: height .7s var(--ease-out); }
.vbars small { font-size: 10.5px; color: var(--text-3); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border); transition: background .15s; min-width: 0; }
.li:first-child { border-top: 0; }
.li:hover { background: var(--row-hover); }
.li.click { cursor: pointer; }
.li .rank { width: 22px; font-size: 12px; font-weight: 600; color: var(--text-3); text-align: center; flex: none; font-variant-numeric: tabular-nums; }
.li .meta { margin-inline-start: auto; text-align: end; flex: none; }
.li .meta b { display: block; font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.li .meta small { color: var(--text-3); font-size: 11.5px; }
.feed .li.new { animation: feedIn .9s var(--ease-out); }
@keyframes feedIn { 0% { opacity: 0; transform: translateY(-10px); background: var(--citrus-bg); } 40% { opacity: 1; transform: none; background: var(--citrus-bg); } 100% { background: transparent; } }
.ic-box { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ibg, var(--brand-soft)); color: var(--icc, var(--brand-text)); flex: none; }
.ic-box .ic { width: 18px; height: 18px; }
.ic-box.sm { width: 30px; height: 30px; border-radius: 9px; }
.ic-box.sm .ic { width: 15px; height: 15px; }
.ic-box.lg { width: 48px; height: 48px; border-radius: 14px; }
.ic-box.lg .ic { width: 22px; height: 22px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 20px; color: var(--text-2); }
.empty .ill { width: 88px; height: 88px; border-radius: 28px; background: var(--grad-fresh); display: grid; place-items: center; color: var(--brand); margin-bottom: 6px; position: relative; }
:root[data-theme="dark"] .empty .ill { background: var(--surface-3); color: var(--brand-text); }
.empty .ill .ic { width: 34px; height: 34px; }
.empty .ill::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--citrus-400); inset-block-start: -4px; inset-inline-end: -4px; opacity: .8; }
.empty b { color: var(--text); font-size: 15px; font-weight: 600; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s; text-align: start; }
.qa:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-2); text-decoration: none; }
.qa b { font-size: 13px; font-weight: 600; color: var(--text); }
.qa small { font-size: 11.5px; color: var(--text-3); }

/* ---------- overlays ---------- */
.ov { position: fixed; inset: 0; z-index: 200; background: var(--overlay); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ov.closing { animation: fadeOut .18s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.dlg { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .28s var(--ease-spring); display: flex; flex-direction: column; }
.dlg.lg { width: min(760px, 100%); }
.dlg.sm { width: min(420px, 100%); }
.ov.closing .dlg { animation: popOut .18s ease forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes popOut { to { opacity: 0; transform: scale(.97); } }
.dlg-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 6px; }
.dlg-h h2 { font-size: 16.5px; }
.dlg-h p { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.dlg-b { padding: 14px 20px; }
.dlg-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px 18px; flex-wrap: wrap; }
.x { margin-inline-start: auto; }
.drw-ov { place-items: stretch; justify-items: end; padding: 0; }
.drw { width: min(560px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: drwIn .34s var(--ease-out); border-inline-start: 1px solid var(--border); }
.drw.wide { width: min(980px, 100%); }
[dir="rtl"] .drw { animation-name: drwInR; }
@keyframes drwIn { from { transform: translateX(40px); opacity: .2; } }
@keyframes drwInR { from { transform: translateX(-40px); opacity: .2; } }
.ov.closing .drw { animation: fadeOut .18s ease forwards; }
.drw-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drw-h h2 { font-size: 16.5px; }
.drw-b { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drw-f { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); justify-content: flex-end; background: var(--surface-2); flex-wrap: wrap; }

.toasts { position: fixed; z-index: 400; inset-block-end: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px 8px 14px; border-radius: 14px; background: var(--aqua-950); color: #fff; box-shadow: 0 16px 40px -12px rgba(3, 26, 31, .55); font-size: 13.5px; animation: toastIn .38s var(--ease-spring); max-width: 520px; border: 1px solid rgba(255, 255, 255, .08); }
[dir="rtl"] .toast { padding: 8px 14px 8px 10px; }
.toast.out { animation: toastOut .25s ease forwards; }
.toast .ti { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(201, 240, 107, .18); color: var(--citrus-400); flex: none; }
.toast.err .ti { background: rgba(255, 92, 77, .2); color: #FF8A7E; }
.toast.info .ti { background: rgba(125, 218, 226, .18); color: var(--aqua-300); }
.toast .ti .ic { width: 15px; height: 15px; }
.toast button { color: var(--citrus-400); font-weight: 600; font-size: 13px; padding: 4px 8px; border-radius: 8px; }
.toast button:hover { background: rgba(255, 255, 255, .08); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

.pop { position: fixed; z-index: 300; min-width: 200px; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: popm .18s var(--ease-out); }
@keyframes popm { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text); text-align: start; }
.mi:hover, .mi:focus-visible { background: var(--surface-3); text-decoration: none; }
.mi .ic { width: 16px; height: 16px; color: var(--text-3); }
.mi.danger { color: var(--neg); }
.mi.danger .ic { color: var(--neg); }
.mi-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.pop-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.pop-h b { font-size: 14px; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; text-align: start; width: 100%; }
.notif:hover { background: var(--surface-3); }
.notif.unread { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.notif .t { font-size: 13px; font-weight: 500; line-height: 1.4; }
.notif small { font-size: 11.5px; color: var(--text-3); }

/* command palette */
.cmdk-ov { place-items: start center; padding-top: 12vh; }
.cmdk { width: min(640px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; animation: pop .24s var(--ease-spring); }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.cmdk-in input { flex: 1; height: 56px; border: 0; background: transparent; font-size: 15.5px; outline: none; }
.cmdk-in .ic { color: var(--text-3); }
.cmdk-list { max-height: min(440px, 58vh); overflow-y: auto; padding: 6px; }
.cmdk-g { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px 4px; }
.cmdk-i { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; width: 100%; text-align: start; }
.cmdk-i.on { background: var(--brand-soft); }
.cmdk-i.on .go { opacity: 1; }
.cmdk-i .go { margin-inline-start: auto; opacity: 0; color: var(--brand-text); }
.cmdk-i b { font-weight: 500; font-size: 13.5px; display: block; }
.cmdk-i small { font-size: 12px; color: var(--text-3); }
.cmdk-f { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); background: var(--surface-2); }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--skel) 0%, var(--skel-2) 50%, var(--skel) 100%); background-size: 200% 100%; animation: sk 1.1s linear infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.lg-brand { position: relative; overflow: hidden; background: var(--grad-night); color: #fff; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.lg-brand .safy-lockup { --lk: 44px !important; }
.lg-hero { max-width: 460px; }
.lg-hero h2 { font-size: 34px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.lg-hero h2 em { font-style: normal; color: var(--citrus-400); }
.lg-hero p { margin-top: 14px; color: rgba(255, 255, 255, .72); font-size: 15px; max-width: 420px; }
.lg-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.lg-stat { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); min-width: 130px; }
.lg-stat b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lg-stat small { color: rgba(255, 255, 255, .65); font-size: 12px; }
.lg-foot { font-size: 12px; color: rgba(255, 255, 255, .5); display: flex; gap: 16px; }
.bubbles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bubbles span { position: absolute; bottom: -120px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08) 38%, rgba(125, 218, 226, .1) 70%); border: 1px solid rgba(255, 255, 255, .16); animation: rise linear infinite; }
.bubbles span.c { background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .55), rgba(201, 240, 107, .22) 45%, rgba(201, 240, 107, .06) 75%); border-color: rgba(201, 240, 107, .3); }
@keyframes rise { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translateY(-55vh) translateX(18px); } 100% { transform: translateY(-115vh) translateX(-10px); opacity: 0; } }
.lg-form { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.lg-box { width: min(400px, 100%); }
.lg-box h1 { font-size: 26px; }
.lg-box .sub { color: var(--text-2); margin-top: 6px; }
.lg-tools { position: absolute; top: 20px; inset-inline-end: 20px; display: flex; gap: 6px; }
.demo-hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--citrus-bg); color: var(--text); font-size: 12.5px; border: 1px dashed color-mix(in srgb, var(--citrus-600) 50%, transparent); }
.demo-hint .ic { color: var(--citrus-ink); margin-top: 1px; }
.otp { display: flex; gap: 10px; justify-content: space-between; direction: ltr; }
.otp input { width: 100%; max-width: 56px; height: 60px; text-align: center; font-size: 24px; font-weight: 600; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; font-variant-numeric: tabular-nums; }
.otp input:focus { border-color: var(--brand-2); box-shadow: var(--ring); outline: none; transform: translateY(-1px); }
.otp input.filled { border-color: var(--brand-2); background: var(--brand-soft); }
.otp.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.step-in { animation: viewIn .35s var(--ease-out); }

/* ---------- order details ---------- */
.stepper { display: flex; align-items: flex-start; gap: 0; position: relative; padding: 4px 0; }
.stp { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; min-width: 0; }
.stp::before { content: ""; position: absolute; top: 17px; inset-inline-start: calc(-50% + 22px); inset-inline-end: calc(50% + 22px); height: 3px; border-radius: 3px; background: var(--border); }
.stp:first-child::before { display: none; }
.stp.done::before, .stp.cur::before { background: var(--brand-2); }
.stp .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); border: 2px solid var(--border); position: relative; z-index: 1; transition: all .35s var(--ease-out); }
.stp .dot .ic { width: 16px; height: 16px; }
.stp.done .dot { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.stp.cur .dot { background: var(--surface); border-color: var(--brand-2); color: var(--brand-text); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.stp.cur .dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--brand-2); opacity: .5; animation: ring 1.8s infinite; }
@keyframes ring { from { transform: scale(.85); opacity: .6; } to { transform: scale(1.25); opacity: 0; } }
.stp b { font-size: 12.5px; font-weight: 600; }
.stp small { font-size: 11px; color: var(--text-3); }
.stp.todo b { color: var(--text-3); font-weight: 500; }
.stp.bad .dot { background: var(--neg); border-color: var(--neg); color: #fff; }
.sumrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; }
.sumrow span:first-child { color: var(--text-2); }
.sumrow.tot { border-top: 1px dashed var(--border-2); margin-top: 6px; padding-top: 12px; font-size: 16px; font-weight: 600; }
.sumrow.tot span:first-child { color: var(--text); }
.note { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.note .row small { color: var(--text-3); font-size: 11.5px; }
.note p { margin-top: 4px; }
.invoice { background: #fff; color: #0A2230; border-radius: 14px; border: 1px solid #E3EAEE; padding: 22px; font-size: 12.5px; position: relative; overflow: hidden; }
.invoice::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: var(--grad-brand); }
.invoice table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.invoice th { text-align: start; font-weight: 500; color: #557080; font-size: 11px; padding: 6px 4px; border-bottom: 1px solid #E3EAEE; }
.invoice td { padding: 7px 4px; border-bottom: 1px solid #F1F5F7; font-variant-numeric: tabular-nums; }
.invoice .ih { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.invoice .ih .safy-lockup { --lk: 24px !important; }
.invoice .meta { font-size: 11.5px; color: #557080; text-align: end; line-height: 1.7; }
.invoice .meta b { color: #0A2230; }
.invoice .itot { margin-top: 12px; margin-inline-start: auto; width: min(260px, 100%); }
.invoice .itot div { display: flex; justify-content: space-between; padding: 4px 0; }
.invoice .itot .g { font-weight: 700; font-size: 14px; border-top: 1.5px solid #0A2230; margin-top: 4px; padding-top: 8px; }
.invoice .stamp { position: absolute; inset-inline-end: 120px; bottom: 44px; transform: rotate(-12deg); border: 2px solid #12A15E; color: #12A15E; border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 12px; opacity: .55; }
.qr { width: 64px; height: 64px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; }
.qr i { background: #0A2230; border-radius: 1px; }
.qr i.o { background: transparent; }

/* ---------- product editor ---------- */
.pe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pe-side { position: sticky; top: calc(var(--top-h) + 62px); display: flex; flex-direction: column; gap: 12px; }
.pe-side .phone-s { height: 500px; }
.comp-miss { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sec { scroll-margin-top: calc(var(--top-h) + 70px); }
.sec-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sec-h .n { width: 28px; height: 28px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-text); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.sec-h h2 { font-size: 15px; }
.sec-h p { font-size: 12px; color: var(--text-3); }
.pe-nav { display: flex; gap: 6px; overflow-x: auto; padding: 2px; margin-bottom: 14px; scrollbar-width: none; position: sticky; top: calc(var(--top-h) + 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding-block: 10px; }
.pe-nav::-webkit-scrollbar { display: none; }
.pe-nav a { flex: none; height: 32px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.pe-nav a:hover { text-decoration: none; color: var(--text); border-color: var(--border-2); }
.pe-nav a .ok { width: 14px; height: 14px; border-radius: 50%; background: var(--pos); color: #fff; display: grid; place-items: center; }
.pe-nav a .ok .ic { width: 10px; height: 10px; stroke-width: 3; }
.drop { border: 1.5px dashed var(--border-2); border-radius: 16px; padding: 22px; display: flex; align-items: center; gap: 16px; background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--brand-2); background: var(--brand-soft); }
.drop .ic-box { width: 52px; height: 52px; border-radius: 16px; }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin-top: 14px; }
.img { position: relative; aspect-ratio: 1; border-radius: 14px; background: var(--tb, var(--surface-3)); border: 1.5px solid var(--border); display: grid; place-items: center; overflow: hidden; transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s; }
.img svg.pack, .img img { width: 82%; height: 82%; object-fit: contain; }
.img.main { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent); }
.img.dragging { opacity: .4; transform: scale(.96); }
.img.drop-t { border-style: dashed; border-color: var(--brand-2); }
.img .mtag { position: absolute; top: 8px; inset-inline-start: 8px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.img .tools { position: absolute; inset-inline: 6px; bottom: 6px; display: flex; gap: 4px; justify-content: space-between; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; }
.img:hover .tools, .img:focus-within .tools { opacity: 1; transform: none; }
.img .tools button { width: 28px; height: 28px; border-radius: 8px; background: rgba(6, 24, 32, .78); color: #fff; display: grid; place-items: center; }
.img .tools button:hover { background: var(--aqua-950); }
.img .tools button .ic { width: 14px; height: 14px; }
.img .grip { position: absolute; top: 8px; inset-inline-end: 8px; color: rgba(6, 24, 32, .45); cursor: grab; }
.img.new { animation: pop .4s var(--ease-spring); }
.sz-tbl td { padding: 6px; vertical-align: top; }
.sz-tbl th { padding: 0 8px; height: 38px; font-size: 11.5px; }
.sz-tbl .inp { height: 36px; font-size: 13px; border-radius: 9px; padding: 0 9px; min-width: 70px; }
.sz-tbl .w-l { min-width: 84px; width: 92px; }
.sz-tbl .w-n { width: 76px; min-width: 66px; }
.sz-tbl .calc { height: 36px; display: flex; align-items: center; padding: 0 10px; border-radius: 9px; background: var(--surface-3); font-size: 13px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 84px; }
.marg { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 9px; font-weight: 600; font-size: 13px; min-width: 76px; font-variant-numeric: tabular-nums; transition: background .25s, color .25s; }
.marg.hi { background: var(--pos-bg); color: var(--pos); }
.marg.md { background: var(--amber-bg); color: var(--amber); }
.marg.lo { background: var(--neg-bg); color: var(--neg); }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.oc { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; animation: pop .3s var(--ease-spring); }
[dir="rtl"] .oc { padding: 0 10px 0 6px; }
.oc .sw-c { width: 16px; height: 16px; border-radius: 50%; background: var(--sc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.oc button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.oc button:hover { background: var(--neg-bg); color: var(--neg); }
.oc button .ic { width: 13px; height: 13px; }
.preset { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px dashed var(--border-2); font-size: 12px; color: var(--text-2); }
.preset:hover { border-color: var(--brand-2); color: var(--brand-text); }
.preset i { width: 10px; height: 10px; border-radius: 50%; }
.tierrow { display: grid; grid-template-columns: 30px 1fr 1fr 1fr 32px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.tierrow:first-of-type { border-top: 0; }
.tierrow .lvl { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-text); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.tglchips { display: flex; gap: 8px; flex-wrap: wrap; }
.tglchip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text-2); transition: all .18s; }
.tglchip .ic { width: 16px; height: 16px; }
.tglchip:hover { border-color: var(--border-2); }
.tglchip.on { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand-text); }
.tglchip.on.c-new { border-color: var(--info); background: var(--info-bg); color: var(--info); }
.tglchip.on.c-best { border-color: var(--amber); background: var(--amber-bg); color: var(--amber); }
.tglchip.on.c-flash { border-color: var(--neg); background: var(--neg-bg); color: var(--neg); }
.tglchip.on.c-offer { border-color: var(--citrus-600); background: var(--citrus-bg); color: var(--citrus-ink); }
.tree { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.tree-c > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 9px; font-size: 13px; font-weight: 500; text-align: start; }
.tree-c > button:hover { background: var(--surface-3); }
.tree-c .cdot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--tb); flex: none; }
.tree-c .cdot svg { width: 22px; height: 22px; }
.tree-c .chev { margin-inline-start: auto; color: var(--text-3); transition: transform .2s; }
.tree-c.open .chev { transform: rotate(90deg); }
[dir="rtl"] .tree-c.open .chev { transform: scaleX(-1) rotate(90deg); }
.tree-subs { display: none; padding-inline-start: 44px; padding-block: 2px 6px; flex-direction: column; gap: 2px; }
.tree-c.open .tree-subs { display: flex; }
.tree-subs label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.tree-subs label:hover { background: var(--surface-3); }
.tree-subs label.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 500; }
.relp { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.relp label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.relp label:hover { background: var(--surface-3); }
.relsel { display: flex; flex-wrap: wrap; gap: 8px; }
.relsel .rc { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 4px; padding-inline-end: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.relsel .rc .thumb { width: 28px; height: 28px; border-radius: 7px; }
.relsel .rc button { color: var(--text-3); display: grid; place-items: center; }
.relsel .rc button:hover { color: var(--neg); }
.savebar { position: sticky; bottom: 0; z-index: 30; margin: 20px -28px -96px; padding: 12px 28px; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: 0 -10px 30px -20px rgba(6, 40, 52, .3); }
.savebar .st { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.savebar .st i.d { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.savebar .st i.d.ok { background: var(--pos); }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.checklist .ck { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-2); display: grid; place-items: center; flex: none; }
.checklist .on .ck { background: var(--pos); border-color: var(--pos); color: #fff; }
.checklist .on .ck .ic { width: 11px; height: 11px; stroke-width: 3; }
.checklist .on { color: var(--text); }
.progress-ring { position: relative; width: 52px; height: 52px; flex: none; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; }

/* ---------- phone mock ---------- */
.phone { width: 300px; max-width: 100%; margin-inline: auto; border-radius: 42px; padding: 11px; background: linear-gradient(145deg, #1C3440, #061820); box-shadow: 0 30px 60px -24px rgba(3, 26, 31, .55), inset 0 0 0 1.5px rgba(255, 255, 255, .08); position: relative; }
.phone-s { position: relative; border-radius: 32px; overflow: hidden; background: var(--phone-bg); height: 560px; display: flex; flex-direction: column; color: var(--text); }
.phone-s.light { --phone-bg: #F4F8F9; background: #F4F8F9; color: #0A2230; }
.phone .notch { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; background: #061820; border-radius: 0 0 16px 16px; z-index: 5; }
.ps-bar { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 11px; font-weight: 600; flex: none; direction: ltr; }
.ps-bar span { display: inline-flex; gap: 4px; align-items: center; }
.ps-bar .ic { width: 12px; height: 12px; }
.ps-body { flex: 1; overflow: hidden; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ps-top { display: flex; align-items: center; justify-content: space-between; }
.ps-top .safy-lockup { --lk: 18px !important; }
.ps-search { height: 34px; border-radius: 11px; background: #fff; border: 1px solid #E3EAEE; display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 10.5px; color: #7A92A0; }
.ps-search .ic { width: 13px; height: 13px; }
.ps-cats { display: flex; gap: 8px; }
.ps-cats div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 8.5px; color: #33505E; }
.ps-cats i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.ps-cats i svg { width: 34px; height: 34px; }
.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ps-card { background: #fff; border-radius: 13px; padding: 7px; border: 1px solid #E8EEF1; display: flex; flex-direction: column; gap: 3px; font-size: 9px; color: #0A2230; }
.ps-card .im { height: 64px; border-radius: 9px; display: grid; place-items: center; }
.ps-card .im svg { width: 58px; height: 58px; }
.ps-card b { font-size: 9.5px; font-weight: 600; line-height: 1.3; }
.ps-card .pr { font-weight: 700; color: #08707E; font-size: 10px; }
.ps-tab { height: 50px; flex: none; background: #fff; border-top: 1px solid #E3EAEE; display: flex; justify-content: space-around; align-items: center; color: #7A92A0; }
.ps-tab .ic { width: 17px; height: 17px; }
.ps-tab .on { color: #08707E; }
.slot { position: relative; border-radius: 13px; transition: box-shadow .3s; }
.slot.hl { box-shadow: 0 0 0 2.5px #C9F06B, 0 0 0 6px rgba(201, 240, 107, .35); animation: slotPulse 1.8s infinite; }
@keyframes slotPulse { 50% { box-shadow: 0 0 0 2.5px #C9F06B, 0 0 0 9px rgba(201, 240, 107, .12); } }
.slot .slot-tag { position: absolute; top: -9px; inset-inline-end: 10px; z-index: 3; background: #C9F06B; color: #032A31; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.ph-ghost { background: #E8EFF2; border-radius: 13px; }
.adc { position: relative; overflow: hidden; border-radius: 13px; color: #fff; display: flex; align-items: center; gap: 6px; padding: 10px 12px; min-height: 92px; isolation: isolate; }
.adc::before { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); inset-inline-end: -40px; top: -50px; z-index: -1; }
.adc .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.adc .tx b { font-size: 12px; font-weight: 700; line-height: 1.3; }
.adc .tx small { font-size: 9px; opacity: .85; }
.adc .tx .cta { font-size: 9px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--cta-bg, #C9F06B); color: var(--cta-fg, #032A31); }
.adc .art { width: 76px; height: 76px; flex: none; }
.adc .art svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .2)); }
.adc.big { min-height: 120px; }
.adc.big .tx b { font-size: 14px; }
.adc.big .art { width: 96px; height: 96px; }
.adc.slim { min-height: 64px; padding: 8px 12px; }
.adc.slim .art { width: 52px; height: 52px; }
.dots3 { display: flex; gap: 4px; justify-content: center; }
.dots3 i { width: 5px; height: 5px; border-radius: 99px; background: #CBD7DE; }
.dots3 i.on { width: 14px; background: #08707E; }
.popup-ov { position: absolute; inset: 0; background: rgba(3, 26, 31, .55); display: grid; place-items: center; padding: 24px; z-index: 4; }
.lock { background: linear-gradient(160deg, #0B6F7C 0%, #053F48 55%, #2B1F4A 100%) !important; color: #fff !important; }
.lock .time { text-align: center; margin-top: 26px; }
.lock .time b { font-size: 54px; font-weight: 300; display: block; line-height: 1; direction: ltr; }
.lock .time small { font-size: 12px; opacity: .8; }
.pn { margin: 26px 10px 0; border-radius: 18px; background: rgba(255, 255, 255, .82); color: #0A2230; padding: 10px 12px; display: flex; gap: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: pnIn .6s var(--ease-spring); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
@keyframes pnIn { from { opacity: 0; transform: translateY(-16px) scale(.95); } }
.pn .ico { width: 34px; height: 34px; flex: none; }
.pn .ico svg { width: 34px; height: 34px; border-radius: 9px; }
.pn .tx { min-width: 0; flex: 1; }
.pn .tx .h { display: flex; justify-content: space-between; font-size: 10.5px; color: #557080; }
.pn .tx b { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.pn .tx p { font-size: 11.5px; line-height: 1.45; margin-top: 2px; color: #1B3442; }
.pc { background: #fff; border-radius: 18px; padding: 12px; color: #0A2230; display: flex; flex-direction: column; gap: 8px; border: 1px solid #E3EAEE; box-shadow: 0 10px 24px -14px rgba(6, 40, 52, .3); }
.pc .im { position: relative; height: 170px; border-radius: 14px; display: grid; place-items: center; }
.pc .im svg { width: 150px; height: 150px; }
.pc .bdgs { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.pc .bdgs span { font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.pc .fav { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #7A92A0; }
.pc .fav .ic { width: 14px; height: 14px; }
.pc .brand { font-size: 10.5px; color: #557080; font-weight: 500; }
.pc .nm { font-size: 14px; font-weight: 600; line-height: 1.35; }
.pc .szs { display: flex; gap: 5px; flex-wrap: wrap; }
.pc .szs span { font-size: 10px; padding: 3px 8px; border-radius: 7px; border: 1px solid #E3EAEE; color: #33505E; }
.pc .szs span.on { border-color: #0BA3B3; background: #F0FBFC; color: #08707E; font-weight: 600; }
.pc .ops { display: flex; gap: 5px; align-items: center; }
.pc .ops i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.pc .ops i.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #0BA3B3; }
.pc .prc { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc .prc b { font-size: 18px; font-weight: 700; color: #08707E; }
.pc .prc s { font-size: 12px; color: #A3B5C0; }
.pc .pp { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 10.5px; color: #557080; background: #F0FBFC; border-radius: 10px; padding: 7px 9px; }
.pc .pp b { color: #12A15E; }
.pc .pts { display: inline-flex; gap: 4px; align-items: center; font-size: 10.5px; color: #C98500; font-weight: 600; }
.pc .pts .ic { width: 12px; height: 12px; }
.pc .add { height: 38px; border-radius: 12px; background: #08707E; color: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.pc .add .ic { width: 15px; height: 15px; }
.pc .tierp { display: flex; gap: 4px; }
.pc .tierp span { flex: 1; text-align: center; font-size: 9px; padding: 4px 2px; border-radius: 7px; background: #F1F5F7; color: #33505E; line-height: 1.3; }
.pc .tierp span b { display: block; color: #E5483A; font-size: 10px; }

/* ---------- categories / brands / misc ---------- */
.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: box-shadow .2s, border-color .2s, transform .2s; }
.cat-row:hover { border-color: var(--border-2); }
.cat-row.sel { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.cat-row.dragging { opacity: .5; transform: scale(.99); }
.cat-row.drop-t { border-style: dashed; border-color: var(--brand-2); }
.cat-row .grip { color: var(--text-3); cursor: grab; display: grid; place-items: center; }
.cat-row .cthumb { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--tb); flex: none; }
.cat-row .cthumb svg { width: 40px; height: 40px; }
.cat-blk { display: flex; flex-direction: column; gap: 6px; }
.cat-subs { display: flex; flex-direction: column; gap: 4px; padding-inline-start: 56px; position: relative; }
.cat-subs::before { content: ""; position: absolute; inset-inline-start: 34px; top: 0; bottom: 18px; width: 1.5px; background: var(--border); }
.sub-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; position: relative; }
.sub-row::before { content: ""; position: absolute; inset-inline-start: -22px; top: 50%; width: 20px; height: 1.5px; background: var(--border); }
.sub-row .grip { color: var(--text-3); cursor: grab; }
.brand-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; transition: transform .2s var(--ease-out), box-shadow .2s; }
.brand-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.blogo { height: 92px; border-radius: 14px; display: grid; place-items: center; position: relative; overflow: hidden; background: color-mix(in srgb, var(--bc) 12%, var(--surface)); }
.blogo b { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: .02em; color: var(--bc); direction: ltr; }
.blogo svg { position: absolute; width: 74px; height: 74px; inset-inline-end: -6px; bottom: -12px; opacity: .9; }
.pcard { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s var(--ease-out), box-shadow .2s; position: relative; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pcard .im { height: 150px; display: grid; place-items: center; background: var(--tb); position: relative; }
.pcard .im svg { width: 130px; height: 130px; transition: transform .35s var(--ease-out); }
.pcard:hover .im svg { transform: scale(1.05) rotate(-2deg); }
.pcard .bd { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.pcard .bd b { font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.pcard .chkp { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; }
.pcard .bdgs { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 4px; }
.pcard.sel { box-shadow: 0 0 0 2px var(--brand-2), var(--shadow); }
.uprow { display: flex; gap: 14px; align-items: flex-start; }
.shot { width: 120px; height: 160px; flex: none; border-radius: 12px; overflow: hidden; background: #F4F7F8; border: 1px solid var(--border); position: relative; cursor: zoom-in; }
.shot svg { width: 100%; height: 100%; }
.place { display: flex; flex-direction: column; gap: 10px; padding: 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; text-align: start; }
.place:hover { transform: translateY(-2px); }
.place.on { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.wire { height: 112px; border-radius: 12px; background: var(--surface-3); position: relative; overflow: hidden; display: grid; place-items: center; }
.wire .ph-mini { width: 56px; height: 100px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--border-2); position: relative; overflow: hidden; }
.wire .ph-mini i { position: absolute; inset-inline: 5px; border-radius: 3px; background: var(--border); }
.wire .ph-mini i.a { background: var(--citrus-400); box-shadow: 0 0 0 2px rgba(201, 240, 107, .4); }
.matrix th { text-align: center; }
.matrix td { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: start; }
.role-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.role-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); text-align: start; min-width: 130px; transition: border-color .18s, background .18s; }
.role-tab b { font-size: 13px; font-weight: 600; }
.role-tab small { font-size: 11.5px; color: var(--text-3); }
.role-tab.on { border-color: var(--brand-2); background: var(--brand-soft); }
.ed-tools { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--surface-2); border-radius: 12px 12px 0 0; }
.ed-tools button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.ed-tools button:hover { background: var(--surface-3); color: var(--text); }
.ed-tools .s { width: 1px; height: 20px; background: var(--border); margin: 6px 4px; }
.editor { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ed-area { min-height: 380px; padding: 18px 22px; line-height: 1.85; font-size: 14px; outline: none; }
.ed-area h2 { font-size: 17px; margin: 16px 0 6px; }
.ed-area h2:first-child { margin-top: 0; }
.ed-area p { margin: 0 0 10px; color: var(--text-2); }
.ed-area ul, .ed-area ol { margin: 0 0 10px; padding-inline-start: 22px; color: var(--text-2); }
.ed-area:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand-2) 30%, transparent); border-radius: 0 0 12px 12px; }
.page-i { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 13px; text-align: start; width: 100%; border: 1.5px solid transparent; transition: background .15s, border-color .15s; }
.page-i:hover { background: var(--surface-3); }
.page-i.on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand-2) 40%, transparent); }
.page-i b { font-weight: 600; font-size: 13.5px; display: block; }
.page-i small { font-size: 11.5px; color: var(--text-3); }
.days { display: inline-flex; gap: 3px; }
.days button { width: 28px; height: 26px; border-radius: 7px; font-size: 10.5px; font-weight: 600; background: var(--surface-3); color: var(--text-3); }
.days button.on { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-2) 45%, transparent); }
.cd { display: inline-flex; gap: 4px; direction: ltr; }
.cd span { min-width: 34px; padding: 4px 6px; border-radius: 8px; background: var(--aqua-950); color: #fff; font-weight: 600; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.cd span small { display: block; font-size: 9px; font-weight: 500; color: rgba(255, 255, 255, .6); }
.cd .colon { min-width: 0; background: none; color: var(--text-3); padding: 4px 0; }
.deal { display: flex; flex-direction: column; overflow: hidden; }
.deal-top { display: flex; gap: 14px; padding: 16px; align-items: center; }
.deal-top .thumb { width: 84px; height: 84px; border-radius: 16px; }
.deal-off { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--grad-deal); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 10px; box-shadow: 0 6px 14px -6px rgba(229, 72, 58, .6); }
.coupon { position: relative; display: flex; align-items: stretch; border-radius: 16px; overflow: hidden; background: var(--grad-night); color: #fff; min-height: 104px; }
.coupon .l { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.coupon .l b { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .08em; color: var(--citrus-400); direction: ltr; text-align: start; }
.coupon .r { width: 110px; display: grid; place-items: center; text-align: center; border-inline-start: 2px dashed rgba(255, 255, 255, .25); font-size: 24px; font-weight: 700; padding: 10px; }
.coupon .r small { display: block; font-size: 10.5px; font-weight: 500; opacity: .7; }
.coupon::before, .coupon::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); inset-inline-end: 101px; }
.coupon::before { top: -9px; }
.coupon::after { bottom: -9px; }
.step-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.step-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); text-align: start; transition: all .18s; background: var(--surface); }
.step-pick button.on { border-color: var(--brand-2); background: var(--brand-soft); }
.step-pick b { font-size: 13.5px; }
.step-pick small { font-size: 11.5px; color: var(--text-3); }
.docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.doc { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.doc .pv { height: 120px; display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--surface-3) 0 10px, var(--surface-2) 10px 20px); position: relative; }
.doc .paper { width: 84px; height: 104px; background: #fff; border-radius: 6px; box-shadow: 0 6px 16px -6px rgba(6, 40, 52, .3); padding: 10px 8px; display: flex; flex-direction: column; gap: 5px; }
.doc .paper i { height: 4px; border-radius: 2px; background: #E3EAEE; }
.doc .paper i.h { background: #08707E; width: 60%; height: 6px; }
.doc .paper i.s { width: 70%; }
.doc .paper .seal { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #E5483A; align-self: flex-end; margin-top: auto; opacity: .6; }
.doc .info { padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 500; text-align: end; }
.prof-h { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 20px; position: relative; overflow: hidden; }
.prof-h::after { content: ""; position: absolute; inset-inline-end: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-2) 14%, transparent), transparent 70%); pointer-events: none; }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; unicode-bidi: isolate; }
.amt.pos { color: var(--pos); }
.amt.neg { color: var(--neg); }
.typ { display: inline-flex; align-items: center; gap: 8px; }
.seg-aud { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.seg-aud button { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); text-align: start; font-size: 12.5px; font-weight: 500; transition: all .18s; }
.seg-aud button .ic { color: var(--text-3); }
.seg-aud button.on { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand-text); }
.seg-aud button.on .ic { color: var(--brand-text); }
.reach { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--grad-fresh); color: #0A2230; }
:root[data-theme="dark"] .reach { background: var(--surface-3); color: var(--text); }
.reach b { font-size: 20px; font-weight: 600; }
.tier-card { padding: 16px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.tier-card .medal { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 55%, #fff), var(--tc)); box-shadow: 0 8px 18px -8px var(--tc); }
.tier-card::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tc) 22%, transparent), transparent 70%); }
.warn-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--text); font-size: 13px; }
.warn-box .ic { color: var(--warn); }
.info-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-bg); color: var(--text); font-size: 13px; }
.info-box .ic { color: var(--info); }
.danger-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--neg-bg); color: var(--text); font-size: 13px; }
.danger-box .ic { color: var(--neg); }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt-list label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border); cursor: pointer; font-size: 13.5px; transition: border-color .15s, background .15s; }
.opt-list label:hover { border-color: var(--border-2); }
.opt-list label.on { border-color: var(--brand-2); background: var(--brand-soft); }
.set-sec { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--border); }
.set-sec:first-child { border-top: 0; padding-top: 0; }
.set-sec h2 { font-size: 15px; }
.set-sec p { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.maint { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); transition: all .25s; }
.maint.on { border-color: var(--warn); background: var(--warn-bg); }
.zone-areas { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; white-space: normal; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pe-grid { grid-template-columns: minmax(0, 1fr) 310px; }
}
@media (max-width: 1180px) {
  .g-side, .pe-grid { grid-template-columns: minmax(0, 1fr); }
  .pe-side, .sticky-col { position: static; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-21, .g-32, .g-12 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 288px; height: 100%; transform: translateX(-104%); transition: transform .32s var(--ease-out); box-shadow: 0 0 60px rgba(0, 0, 0, .3); }
  [dir="rtl"] .sidebar { transform: translateX(104%); }
  .sb-open .sidebar { transform: none !important; }
  .sb-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sb-open .sb-scrim { opacity: 1; pointer-events: auto; }
  .sb-close { display: grid; }
  .tb-menu { display: grid; }
  body.has-shell .proto-link { display: inline-flex; }
  body.sb-open .proto-link { z-index: 40; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-sec { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .lg-brand { padding: 28px 24px; min-height: 300px; }
  .lg-hero h2 { font-size: 26px; }
  .lg-stats { margin-top: 18px; }
}
@media (max-width: 760px) {
  .view { padding: 16px 16px 96px; }
  .topbar { padding: 0 12px; gap: 4px; }
  .tb-search { width: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; margin-inline-start: auto; }
  .tb-search span, .tb-search kbd { display: none; }
  .tb-me .who { display: none; }
  .tb-me { padding: 4px; }
  .crumbs .cr-p { display: none; }
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-kpi > :first-child { grid-column: 1 / -1; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .fgrid, .fgrid.c3, .fgrid.c4 { grid-template-columns: minmax(0, 1fr); }
  .quick { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 19px; }
  .ph { align-items: flex-start; }
  .ph-actions { width: 100%; }
  .kpi-val { font-size: 21px; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin-inline: auto; }
  .stepper { flex-direction: column; align-items: stretch; gap: 14px; }
  .stp { flex-direction: row; text-align: start; gap: 12px; }
  .stp::before { top: auto; bottom: calc(100% - 4px); inset-inline-start: 16.5px; inset-inline-end: auto; width: 3px; height: 18px; }
  .savebar { margin: 16px -16px -96px; padding: 10px 16px 12px; gap: 8px; }
  .savebar .st { width: 100%; font-size: 12px; }
  .savebar .sp, .savebar .btn-ghost { display: none; }
  .savebar .btn { flex: 1; }
  body:has(.savebar:not(.hide)) .proto-link { inset-block-end: 112px; }
  .docs { grid-template-columns: 1fr; }
  .step-pick { grid-template-columns: 1fr; }
  .lg-stats .lg-stat { min-width: 0; flex: 1; padding: 10px 12px; }
  .lg-stat b { font-size: 18px; }
  .otp { gap: 6px; }
  .otp input { height: 52px; font-size: 20px; }
  .tierrow { grid-template-columns: 26px 1fr 1fr 32px; }
  .tierrow .tr-res { display: none; }
  .filters .inp-g { max-width: none; flex-basis: 100%; }
  .dlg-f .btn { flex: 1; }
  .phone { width: 280px; }
  .uprow { flex-direction: column; }
  .shot { width: 100%; height: 180px; }
  .coupon .r { width: 90px; }
  .coupon::before, .coupon::after { inset-inline-end: 81px; }
  .cat-subs { padding-inline-start: 28px; }
  .cat-subs::before { inset-inline-start: 12px; }
  .sub-row::before { inset-inline-start: -16px; width: 14px; }
  .tb-btn { width: 36px; }
  .tb-btn.tb-lang { width: auto; padding: 0 8px; }
  .tb-lang .ic { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bubbles { display: none; }
}

/* ---------- small phones: tighter KPI tiles, floating hub link folded into the drawer ---------- */
@media (max-width: 760px) {
  body.has-shell .proto-link { display: none; }
}
@media (max-width: 480px) {
  .kpi:not(.hero) .spark { display: none; }
  .kpi-f { flex-wrap: wrap; align-items: center; }
  .kpi .vs { line-height: 1.5; }
  .kpi-l { line-height: 1.4; }
}
