/* =========================================================
   Closer Hub — design system v3 (light, premium navy + gold)
   Fonts: Inter (Latin + numbers) · Noto Kufi Arabic (Arabic)
   ========================================================= */
:root {
  --bg: #F5F5F2;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --surface-3: #F1F1EE;
  --border: #E8E7E2;
  --border-2: #D9D8D1;
  --text: #121826;
  --text-2: #374050;
  --muted: #646B7A;
  --primary: #1E2B58;
  --primary-2: #16214A;
  --primary-soft: #ECEFF7;
  --primary-ink: #1E2B58;
  --gold: #B8893A;
  --gold-2: #D9B56E;
  --gold-soft: #F8F1E3;
  --gold-ink: #7E5A1C;
  --accent: #0F766E;
  --green: #12805A; --green-soft: #E5F3EC;
  --amber: #B7791F; --amber-soft: #FBF1DE;
  --orange: #C2571A; --orange-soft: #FCEDE3;
  --red: #C0353F; --red-soft: #FBEAEB;
  --blue: #2457C5; --blue-soft: #E9EFFB;
  --cyan: #0E7490; --cyan-soft: #E2F2F6;
  --violet: #6D4AB8; --violet-soft: #F0EBF9;
  --pink: #B4316C; --pink-soft: #FAE9F1;
  --indigo: #1E2B58; --indigo-soft: #ECEFF7;
  --slate: #4F5666; --slate-soft: #EEEFF1;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 24, 38, .04), 0 1px 8px rgba(18, 24, 38, .03);
  --shadow-md: 0 10px 28px -12px rgba(18, 24, 38, .18);
  --shadow-lg: 0 24px 60px -18px rgba(18, 24, 38, .30);
  --ring: 0 0 0 4px rgba(30, 43, 88, .12);
  --side-w: 258px;
  --font: "Inter", "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Inter", "Noto Kufi Arabic", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { letter-spacing: 0; }
p { margin: 0; }
img { max-width: 100%; }
small { font-size: .82em; }
.ico { width: 18px; height: 18px; flex: none; stroke-width: 1.8; }
html[dir="rtl"] .ico.flip { transform: scaleX(-1); }
.muted { color: var(--muted); }
.num { unicode-bidi: isolate; direction: ltr; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.money { display: inline-flex; align-items: baseline; gap: .3em; white-space: nowrap; }
.money small { font-size: .62em; color: var(--muted); font-weight: 500; font-family: var(--font); }
.nowrap { white-space: nowrap; }
.mt { margin-top: 20px; } .mt-s { margin-top: 10px; } .mb { margin-bottom: 20px; }
.grow { flex: 1; }
.right { text-align: end; }
.center { text-align: center; }
.hide { display: none !important; }
.only-m { display: none !important; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- App shell ---------------- */
.app { display: flex; min-height: 100vh; }
.side {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side-w);
  background: var(--surface); display: flex; flex-direction: column; z-index: 40;
  border-inline-end: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 22px 14px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary); box-shadow: 0 8px 18px -8px rgba(30, 43, 88, .8); }
.brand-mark img { width: 22px; height: 22px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.brand-txt b em { font-style: normal; color: var(--gold); }
.brand-txt small { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 14px 14px; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 18px 10px 8px; font-weight: 600; }
html[dir="rtl"] .nav-group { letter-spacing: 0; font-size: 11.5px; text-transform: none; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 11px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px; transition: background .18s, color .18s; margin-bottom: 3px; }
.nav-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--tone-soft, var(--surface-3)); color: var(--tone, var(--muted)); transition: .18s; }
.nav-ico .ico { width: 16px; height: 16px; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.on::after { content: ""; position: absolute; inset-inline-start: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
html[dir="rtl"] .nav-item.on::after { border-radius: 3px 0 0 3px; }
.nav-item.on { color: #fff; background: var(--primary); box-shadow: 0 10px 22px -12px rgba(30, 43, 88, .9); }
.nav-item.on .nav-ico { background: rgba(255, 255, 255, .12); color: var(--gold-2); }
.nav-item span { flex: 1; }
.nav-n { font-style: normal; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; padding: 0 7px; border-radius: 99px; line-height: 19px; font-family: var(--font-num); }
.nav-n.soft { background: var(--surface-3); color: var(--text-2); }
.nav-item.on .nav-n { background: rgba(255, 255, 255, .25); color: #fff; }
.side-card { margin: 6px 14px 12px; padding: 16px; border-radius: 14px; background: linear-gradient(150deg, #1E2B58, #101A3A); color: #fff; position: relative; overflow: hidden; }
.side-card::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; inset-inline-end: -40px; top: -50px; border: 1px solid rgba(217, 181, 110, .35); background: transparent; }
.side-card b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #fff; position: relative; }
.side-card b .ico { color: var(--gold-2); width: 17px; height: 17px; }
.side-card p { font-size: 12px; color: rgba(255, 255, 255, .78); margin-top: 6px; position: relative; line-height: 1.55; }
.side-card .btn { margin-top: 12px; width: 100%; position: relative; background: var(--gold-2); color: #141A2E; box-shadow: none; }
.side-card .btn:hover { background: #E4C68A; }
.side-card .progress { margin-top: 10px; background: rgba(30, 43, 88, .15); height: 7px; }
.side-foot { padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me:hover { background: var(--surface-3); }
.me span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.me b { color: var(--text); font-size: 13px; font-weight: 600; }
.me small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-scrim { display: none; }

.main { flex: 1; min-width: 0; margin-inline-start: var(--side-w); display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 0 30px; height: 70px;
  background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--border); }
.top-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.top-title b { font-size: 17px; font-weight: 600; }
.top-title small { color: var(--muted); font-size: 12px; }
.top-search { flex: 1; max-width: 340px; position: relative; display: flex; align-items: center; margin-inline-start: auto; }
.top-search .ico { position: absolute; inset-inline-start: 13px; color: var(--muted); width: 16px; height: 16px; }
.top-search input { width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2);
  padding-inline: 38px 48px; font: inherit; font-size: 13px; color: var(--text); outline: none; transition: border .2s, box-shadow .2s, background .2s; min-height: 0; }
.top-search input:focus { border-color: var(--primary); box-shadow: var(--ring); background: var(--surface); }
.top-search kbd { position: absolute; inset-inline-end: 10px; font: 600 10.5px var(--font-num); color: var(--muted); border: 1px solid var(--border-2); border-radius: 6px; padding: 1px 6px; background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.top-search + .top-actions { margin-inline-start: 0; }
.top-actions:first-child, .top-title + .top-actions { margin-inline-start: auto; }
.icon-btn { position: relative; height: 38px; min-width: 38px; border-radius: 50%; border: 0; background: transparent;
  color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: .18s; padding: 0 9px; font: 600 12.5px var(--font-num); }
.icon-btn.txt { border-radius: 99px; border: 1px solid var(--border); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: 2px; inset-inline-end: 1px; min-width: 17px; height: 17px; border-radius: 99px; background: var(--red);
  color: #fff; font: 700 10px/17px var(--font-num); font-style: normal; padding: 0 4px; border: 2px solid var(--surface); }
.top-sep { width: 1px; height: 28px; background: var(--border); margin: 0 6px; }
.top-me { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--text); font: inherit; text-align: start; }
.top-me:hover { background: var(--surface-3); }
.top-me .who-t { display: flex; flex-direction: column; line-height: 1.25; }
.top-me .who-t small { color: var(--muted); font-size: 11.5px; }
.top-me .who-t b { font-size: 13px; font-weight: 600; }
.top-me > .ico { width: 15px; height: 15px; color: var(--muted); }
.content { padding: 28px 30px 40px; flex: 1; width: 100%; max-width: 1520px; margin: 0 auto; }
.foot { padding: 14px 30px; color: var(--muted); font-size: 12px; }

/* dropdowns */
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transition: .18s ease; z-index: 50; }
.dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-menu > a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; }
.dd-menu > a:hover { background: var(--surface-3); color: var(--text); }
.notif-menu { width: 360px; padding: 0; overflow: hidden; }
.dd-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dd-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px; color: var(--muted); }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s; }
.notif:hover { background: var(--surface-2); }
.notif span:last-child { display: flex; flex-direction: column; min-width: 0; }
.notif b { font-weight: 600; font-size: 13px; }
.notif small { color: var(--muted); }
.notif em { font-style: normal; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.notif.unread .notif-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.dd-foot { display: block; text-align: center; padding: 11px; font-weight: 600; color: var(--primary); font-size: 13px; }

/* ---------------- Page header ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 600; }
.page-head p { margin-top: 3px; font-size: 13.5px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.crumbs .ico { width: 14px; height: 14px; }
.crumbs a:hover { color: var(--primary); }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap;
  color: #fff; background: var(--primary); box-shadow: 0 6px 16px -8px rgba(30, 43, 88, .75);
  transition: transform .15s, box-shadow .2s, background .2s; }
.btn .ico { width: 17px; height: 17px; }
.btn:hover { background: var(--primary-2); transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(30, 43, 88, .85); }
.btn:active { transform: none; }
.btn.ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.soft { background: var(--primary-soft); color: var(--primary-ink); box-shadow: none; }
.btn.soft:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.btn.green { background: var(--green); box-shadow: 0 6px 16px -8px rgba(34, 181, 115, .8); }
.btn.green:hover { background: #0E6E4C; }
.btn.red { background: var(--red); box-shadow: 0 6px 16px -8px rgba(240, 70, 90, .7); }
.btn.red:hover { background: #A72C35; }
.btn.amber { background: var(--amber); box-shadow: 0 6px 16px -8px rgba(245, 158, 11, .7); }
.btn.wa { background: #15803D; box-shadow: 0 6px 16px -8px rgba(34, 197, 94, .7); }
.btn.wa:hover { background: #166534; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.sm .ico { width: 15px; height: 15px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { color: var(--primary); font-weight: 500; background: none; border: 0; cursor: pointer; font: inherit; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.link.sm { font-size: 12.5px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.card-head h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.card-head h3 .ico { color: var(--primary); width: 17px; height: 17px; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-actions .link { font-size: 12.5px; }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 0; }
.card.flush .card-head { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.card.flush .card-body { padding: 0; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { 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, 3fr) minmax(0, 2fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.kpi { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; animation: rise .5s both; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi:nth-child(2) { animation-delay: .05s; } .kpi:nth-child(3) { animation-delay: .1s; } .kpi:nth-child(4) { animation-delay: .15s; }
.kpi-top { display: contents; }
.kpi-ico { grid-row: span 2; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: var(--tone); box-shadow: 0 8px 18px -10px var(--tone); }
.kpi-ico .ico { width: 21px; height: 21px; }
.kpi-label { color: var(--muted); font-weight: 500; font-size: 12.5px; align-self: end; }
.kpi-val { font-size: 23px; font-weight: 700; letter-spacing: -.02em; align-self: start; line-height: 1.25; font-family: var(--font-num); }
.kpi-val .money small { font-size: 12px; }
.kpi-foot { grid-column: 1 / -1; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border-2); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-indigo { --tone: var(--indigo); --tone-soft: var(--indigo-soft); }
.t-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.t-amber { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.t-orange { --tone: var(--orange); --tone-soft: var(--orange-soft); }
.t-red { --tone: var(--red); --tone-soft: var(--red-soft); }
.t-blue { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.t-cyan { --tone: var(--cyan); --tone-soft: var(--cyan-soft); }
.t-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.t-pink { --tone: var(--pink); --tone-soft: var(--pink-soft); }
.t-slate { --tone: var(--slate); --tone-soft: var(--slate-soft); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; font-family: var(--font-num); }
.delta .ico { width: 13px; height: 13px; stroke-width: 2.4; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

/* hero / welcome banner */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px; color: #fff; margin-bottom: 20px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(217, 181, 110, .22) 0%, transparent 45%), linear-gradient(120deg, #1E2B58 0%, #18234A 55%, #101A3A 100%);
  box-shadow: 0 22px 44px -24px rgba(16, 26, 58, .6); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 320px; height: 320px; inset-inline-end: -90px; top: -150px; border: 1px solid rgba(217, 181, 110, .35); background: transparent; }
.hero::after { width: 200px; height: 200px; inset-inline-end: 160px; bottom: -130px; border: 1px solid rgba(217, 181, 110, .25); background: transparent; }
.hero > * { position: relative; z-index: 1; }
.hero h2 { font-size: 21px; font-weight: 600; }
.hero p { color: rgba(255, 255, 255, .86); margin-top: 4px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; min-width: 120px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(217, 181, 110, .28); backdrop-filter: blur(6px); }
.hero-stats b { color: #F3DDAE; font-size: 21px; font-weight: 700; font-family: var(--font-num); }
.hero-stats small { color: rgba(255, 255, 255, .82); font-size: 12px; }
.hero .money small { color: rgba(255, 255, 255, .72); }
.hero .btn:not(.ghost) { background: var(--gold-2); color: #141A2E; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .35); }
.hero .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .28); }

/* ---------------- Tables ---------------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { text-align: start; font-size: 12px; font-weight: 500; color: var(--muted); padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
html[dir="ltr"] .tbl th { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.tbl th:first-child { border-start-start-radius: 0; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.tbl .chk { width: 40px; }
.tbl td.actions { text-align: end; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.who b { font-weight: 500; }
.who small { color: var(--muted); }
.who a:hover b { color: var(--primary); }
tr.row-link { cursor: pointer; }

/* avatar */
.avatar { --av: var(--primary); width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  color: var(--av); font-weight: 600; font-size: 12.5px; background: color-mix(in srgb, var(--av) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--av) 22%, transparent); }
.avatar.sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar.lg { width: 64px; height: 64px; font-size: 21px; border-radius: 20px; color: #fff; background: var(--av); border: 0; box-shadow: 0 12px 24px -12px var(--av); }
.top-me .avatar { color: #fff; background: var(--av); border: 0; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 500; white-space: nowrap; color: var(--c); background: var(--cs); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-slate { --c: var(--slate); --cs: var(--slate-soft); }
.b-blue { --c: var(--blue); --cs: var(--blue-soft); }
.b-amber { --c: #8A5A10; --cs: var(--amber-soft); }
.b-violet { --c: var(--violet); --cs: var(--violet-soft); }
.b-cyan { --c: #0E6A82; --cs: var(--cyan-soft); }
.b-indigo { --c: var(--primary-ink); --cs: var(--indigo-soft); }
.b-green { --c: #0E6E4C; --cs: var(--green-soft); }
.b-red { --c: var(--red); --cs: var(--red-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.chip .ico { width: 14px; height: 14px; color: var(--muted); }
.pdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 12px; font-weight: 500; font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: color .15s; }
.tab .ico { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary-ink); }
.tab.on::after { content: ""; position: absolute; inset-inline: 10px; bottom: -1px; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--primary); }
.tab-n { font-size: 11px; background: var(--surface-3); padding: 0 7px; border-radius: 99px; color: var(--muted); font-family: var(--font-num); line-height: 18px; }
.tab.on .tab-n { background: var(--primary); color: #fff; }

/* ---------------- Forms ---------------- */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .lbl { font-weight: 500; font-size: 13px; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], input[type=url], input[type=month], select, textarea {
  width: 100%; min-height: 42px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  padding: 9px 13px; font: inherit; font-size: 13.5px; outline: none; transition: border .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #9298A6; }
textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A8EA3' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
html[dir="rtl"] select { background-position: left 12px center; padding-right: 13px; padding-left: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 17px; height: 17px; cursor: pointer; }
.input-icon { position: relative; }
.input-icon .ico { position: absolute; top: 12px; inset-inline-start: 13px; color: var(--muted); width: 17px; height: 17px; }
.input-icon input { padding-inline-start: 40px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.check-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; transition: .15s; background: var(--surface); }
.check-card:hover { border-color: var(--border-2); }
.check-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.filters select, .filters input { min-height: 38px; width: auto; min-width: 150px; font-size: 13px; background-color: var(--surface-2); }
.filters .grow input { width: 100%; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a, .seg label { padding: 6px 12px; border-radius: 8px; font-weight: 500; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; transition: .15s; }
.seg a:hover, .seg label:hover { color: var(--text); }
.seg a.on, .seg label:has(input:checked) { background: var(--primary); color: #fff; }
.seg input { display: none; }

/* bulk bar */
.bulk { position: sticky; bottom: 18px; z-index: 20; display: none; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px auto 0; width: fit-content; max-width: 100%;
  padding: 10px 12px 10px 18px; border-radius: 16px; background: #141A2E; color: #fff; box-shadow: var(--shadow-lg); animation: rise .25s both; }
html[dir="rtl"] .bulk { padding: 10px 18px 10px 12px; }
.bulk.show { display: flex; }
.bulk b { font-weight: 600; }
.bulk select { min-height: 36px; width: auto; background-color: #222A42; color: #fff; border-color: #36405C; }

/* ---------------- Pager ---------------- */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.pager-links { display: flex; gap: 4px; }
.pg { min-width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-weight: 500; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); padding: 0 8px; font-family: var(--font-num); }
.pg:hover { border-color: var(--primary); color: var(--primary); }
.pg.on { background: var(--primary); color: #fff; border-color: transparent; }
.pg.dots { border: 0; background: none; }
.pg .ico { width: 15px; }

/* ---------------- Empty ---------------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 44px 20px; gap: 6px; color: var(--muted); font-size: 13px; }
.empty h4 { color: var(--text); font-size: 15px; font-weight: 600; }
.empty .btn { margin-top: 10px; }
.empty-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 8px; }
.empty-ico .ico { width: 26px; height: 26px; }
.empty.big { padding: 90px 20px; }
.empty.big h2 { font-size: 40px; color: var(--text); }

/* ---------------- Charts ---------------- */
.chart { position: relative; width: 100%; min-height: 220px; }
.chart.h-300 { min-height: 300px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 4 6; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-num); }
.chart .area-line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s cubic-bezier(.6, .1, .2, 1) forwards; }
.chart .fade { opacity: 0; animation: fade .9s .5s forwards; }
.chart .pt { opacity: 0; transition: opacity .15s; }
.chart .hover-line { stroke: var(--primary); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; }
.chart-tip { position: absolute; pointer-events: none; background: #141A2E; color: #fff; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate(-50%, -112%); transition: opacity .15s; white-space: nowrap; z-index: 5; font-family: var(--font-num); }
.chart-tip b { display: block; margin-bottom: 3px; color: #B9BCD0; font-weight: 500; font-size: 11.5px; font-family: var(--font); }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-inline-end: 6px; }
.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: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-wrap svg { width: 176px; height: 176px; flex: none; }
.donut-seg { fill: none; stroke-width: 20; transition: stroke-width .2s; cursor: pointer; }
.donut-seg:hover { stroke-width: 25; }
.donut-center b { font-size: 20px; font-weight: 700; fill: var(--text); font-family: var(--font-num); }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 160px; }
.donut-legend div { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.donut-legend span:nth-child(2) { flex: 1; color: var(--text-2); }
.donut-legend b { font-weight: 600; font-family: var(--font-num); }
.donut-legend em { font-style: normal; color: var(--muted); font-size: 11.5px; min-width: 40px; text-align: end; font-family: var(--font-num); }

/* bar lists */
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; align-items: center; }
.bar-row .lbl2 { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; min-width: 0; }
.bar-row .lbl2 .ico { width: 15px; height: 15px; color: var(--muted); }
.bar-row .val { font-weight: 600; font-size: 12.5px; }
.bar-track { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #4A5C9E, var(--primary)); transition: width 1.1s cubic-bezier(.3, .8, .2, 1); }
html[dir="rtl"] .bar-fill { background: linear-gradient(270deg, #4A5C9E, var(--primary)); }

/* funnel */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.fn-row { display: grid; grid-template-columns: 112px 1fr 56px; align-items: center; gap: 12px; font-size: 12.5px; }
.fn-bar { height: 28px; border-radius: 8px; background: var(--surface-3); position: relative; overflow: hidden; }
.fn-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 8px; transition: width 1.1s cubic-bezier(.3, .8, .2, 1); display: flex; align-items: center; padding-inline-start: 10px; color: #fff; font-weight: 600; font-size: 11.5px; font-family: var(--font-num); }
.fn-row .pct { text-align: end; color: var(--muted); font-weight: 500; font-family: var(--font-num); }

/* leaderboard */
.lb { display: flex; flex-direction: column; }
.lb-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--border); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--surface-3); color: var(--muted); font-family: var(--font-num); }
.lb-row:nth-child(1) .lb-rank { background: #B8893A; color: #fff; }
.lb-row:nth-child(2) .lb-rank { background: #8D93A3; color: #fff; }
.lb-row:nth-child(3) .lb-rank { background: #A9693B; color: #fff; }
.lb-meta { display: flex; gap: 12px; color: var(--muted); font-size: 11.5px; margin-top: 1px; flex-wrap: wrap; }
.lb-val { text-align: end; }
.lb-val b { display: block; font-weight: 600; }

/* progress ring */
.ring { position: relative; width: 128px; height: 128px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .bgc { stroke: var(--surface-3); }
.ring .fgc { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.3, .8, .2, 1); }
.ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-c b { font-size: 26px; font-weight: 700; font-family: var(--font-num); }
.ring-c small { color: var(--muted); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #4A5C9E, var(--primary)); transition: width 1.2s cubic-bezier(.3, .8, .2, 1); }
html[dir="rtl"] .progress > i { background: linear-gradient(270deg, #4A5C9E, var(--primary)); }

/* lists, timeline */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .15s; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .grow { min-width: 0; }
.li-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--tone-soft, var(--surface-3)); color: var(--tone, var(--muted)); flex: none; }
.li-ico .ico { width: 17px; height: 17px; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 18px; padding-inline-start: 6px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 22px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; display: flex; gap: 14px; }
.tl-ico { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--tone-soft, var(--surface-3)); color: var(--tone, var(--muted)); border: 3px solid var(--surface); }
.tl-ico .ico { width: 15px; height: 15px; }
.tl-body { flex: 1; min-width: 0; padding-top: 4px; }
.tl-body p { margin-top: 5px; background: var(--surface-2); border: 1px solid var(--border); padding: 9px 12px; border-radius: 11px; white-space: pre-wrap; font-size: 13px; }
.tl-meta { color: var(--muted); font-size: 12px; }
.tl-meta b { color: var(--text); font-weight: 500; }

/* key-value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; font-size: 13px; }
.kv dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kv dt .ico { width: 15px; height: 15px; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; word-break: break-word; }

/* lead hero */
.lead-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lead-hero h1 { font-size: 22px; }
.phone-box { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 11px; background: var(--surface-3); font-weight: 600; font-size: 15.5px; letter-spacing: .03em; font-family: var(--font-num); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pick button { border: 1px solid var(--border); background: var(--surface); padding: 7px 12px; border-radius: 9px; font: 500 12.5px var(--font); color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: .15s; }
.status-pick button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.status-pick button:hover { border-color: var(--c); }
.status-pick button.on { background: var(--cs); border-color: var(--c); color: var(--c); }

/* product cards */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.pcard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pcard-top { display: flex; align-items: center; gap: 12px; }
.pcard-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, var(--surface)); flex: none; }
.pcard h4 { font-size: 15px; }
.pcard-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pcard-nums div { padding: 9px 11px; }
.pcard-nums div + div { border-inline-start: 1px solid var(--border); }
.pcard-nums small { display: block; color: var(--muted); font-size: 11px; }
.pcard-nums b { font-size: 14px; font-weight: 600; font-family: var(--font-num); }
.pcard-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard.off { opacity: .6; }
.prose { white-space: pre-wrap; line-height: 1.8; color: var(--text-2); }

/* alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 13px; background: var(--tone-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent); font-size: 13px; }
.alert > .ico { color: var(--tone); margin-top: 2px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 21, 32, .45); backdrop-filter: blur(5px); }
.modal.open { display: flex; animation: fade .2s both; }
.modal-box { width: 100%; max-width: 540px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop .25s cubic-bezier(.3, 1.4, .5, 1) both; }
.modal-box.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 20px 20px; }

/* toasts */
.toasts { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 13px 14px 13px 16px; border-radius: 14px; background: #141A2E; color: #fff; box-shadow: var(--shadow-lg); animation: slideIn .4s cubic-bezier(.3, 1.3, .5, 1) both; font-size: 13.5px; }
.toast span { flex: 1; font-weight: 400; }
.toast .ico { flex: none; }
.toast.t-success > .ico { color: #4ADE80; }
.toast.t-error > .ico { color: #FB7185; }
.toast.t-warn > .ico { color: #FBBF24; }
.toast button { background: none; border: 0; color: #8A8EA3; cursor: pointer; padding: 0; display: flex; }
.toast.out { animation: fadeOut .3s forwards; }

/* auth */
div.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.05fr; background: var(--surface); }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; margin: 14px; border-radius: 26px;
  background: linear-gradient(140deg, #1E2B58 0%, #18234A 50%, #0C1530 100%); }
.auth-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; inset-inline-end: -180px; top: -220px; border: 1px solid rgba(217, 181, 110, .35); }
.auth-art::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; inset-inline-start: -140px; bottom: -160px; border: 1px solid rgba(217, 181, 110, .25); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { font-size: 34px; font-weight: 600; line-height: 1.3; max-width: 520px; }
.auth-art p { color: rgba(255, 255, 255, .8); font-size: 15px; max-width: 460px; margin-top: 14px; }
.auth-points { display: grid; gap: 12px; margin-top: 30px; }
.auth-points div { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .92); font-size: 14px; }
.auth-points .ico { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(217, 181, 110, .16); color: #F3DDAE; }
.auth-card-float { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.float { background: #fff; color: var(--text); border-radius: 16px; padding: 14px 18px; box-shadow: 0 20px 40px -18px rgba(10, 16, 40, .5); animation: floaty 6s ease-in-out infinite; min-width: 170px; }
.float:nth-child(2) { animation-delay: -3s; }
.float small { color: var(--muted); display: block; }
.float b { color: var(--primary); font-size: 21px; font-family: var(--font-num); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 27px; margin-top: 28px; }
.auth-box .muted { margin-top: 6px; }
.auth-box form { margin-top: 28px; }
.auth-lang { display: flex; justify-content: flex-end; }

/* misc */
.sep { height: 1px; background: var(--border); margin: 16px 0; }
.code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; background: var(--surface-3); padding: 3px 8px; border-radius: 7px; font-size: 12.5px; direction: ltr; unicode-bidi: isolate; }
.steps { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 500; font-size: 13px; }
html[dir="rtl"] .step { padding: 8px 8px 8px 14px; }
.step i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-style: normal; font-family: var(--font-num); }
.step.on { color: var(--text); border-color: var(--primary); }
.step.on i { background: var(--primary); color: #fff; }
.step.done i { background: var(--green); color: #fff; }
.drop { border: 2px dashed var(--border-2); border-radius: 16px; padding: 38px 20px; text-align: center; background: var(--surface-2); transition: .2s; cursor: pointer; display: block; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop .ico { width: 34px; height: 34px; color: var(--primary); }
.drop input { display: none; }
.drop b { display: block; margin-top: 10px; font-size: 14.5px; font-weight: 500; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.mini-stat small { color: var(--muted); font-weight: 500; }
.mini-stat b { font-size: 18px; font-weight: 700; font-family: var(--font-num); }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tier-steps { display: flex; gap: 8px; margin-top: 16px; }
.tier { flex: 1; padding: 10px; border-radius: 12px; border: 1px dashed var(--border-2); text-align: center; font-size: 11.5px; color: var(--muted); }
.tier b { display: block; color: var(--text); font-size: 14px; font-family: var(--font-num); }
.tier.got { border-style: solid; border-color: var(--gold); background: var(--gold-soft); }
.tier.got b { color: var(--gold-ink); }
.copy-field { display: flex; gap: 8px; align-items: center; }

/* confirm dialog */
.confirm-modal { z-index: 120; }
.confirm-modal .modal-box { max-width: 410px; text-align: center; }
.confirm-modal .modal-body { padding: 28px 26px 18px; }
.confirm-ico { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--tone-soft, var(--primary-soft)); }
.confirm-ico::before { content: ""; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--tone, #1E2B58); box-sizing: border-box; background: radial-gradient(circle at 50% 70%, var(--tone, #1E2B58) 2px, transparent 2.5px), linear-gradient(var(--tone, #1E2B58), var(--tone, #1E2B58)) 50% 28% / 3px 8px no-repeat; }
.confirm-msg { font-size: 15px; font-weight: 500; line-height: 1.65; color: var(--text); }
.confirm-modal .modal-foot { justify-content: center; }
.confirm-modal .modal-foot .btn { min-width: 120px; justify-content: center; }

/* animations */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.card, .hero { animation: rise .45s both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-21, .g-12, .g-32, .g-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) { .top-title small { display: none; } }
@media (max-width: 960px) {
  .only-m { display: inline-flex !important; }
  .only-d { display: none !important; }
  .side { transform: translateX(-100%); transition: transform .28s ease; box-shadow: var(--shadow-lg); }
  html[dir="rtl"] .side { transform: translateX(100%); }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(20, 21, 32, .45); z-index: 35; }
  .main { margin-inline-start: 0; }
  .top { padding: 0 16px; height: 62px; }
  .content { padding: 20px 16px 30px; }
  div.auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .top-search kbd { display: none; }
}
@media (max-width: 640px) {
  .kpis, .g-2, .g-4, .form-grid, .form-grid.g3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .page-head h1 { font-size: 21px; }
  .kpi-val { font-size: 21px; }
  .top-search, .top-title, .top-sep { display: none; }
  .top-actions { margin-inline-start: auto; }
  .notif-menu { width: calc(100vw - 32px); }
  .fn-row { grid-template-columns: 86px 1fr 46px; }
  .tbl th, .tbl td { padding: 11px 12px; }
  .hide-m { display: none; }
  .hero { padding: 22px 20px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hero-stats div { min-width: 0; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .page-actions { max-width: 100%; }
}

@media (max-height: 820px) { .side-card { display: none; } }
