/* Zeus CRM — design system from the brand files (files/thelastzeus-color-palette.html)
   Professional and calm: one accent (gold), monochrome icons, quiet surfaces, minimal motion. */

@font-face { font-family: "Tahrir"; src: url("../fonts/TahrirBook.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Tahrir"; src: url("../fonts/TahrirRegular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tahrir"; src: url("../fonts/TahrirMedium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Tahrir"; src: url("../fonts/TahrirBold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Tahrir"; src: url("../fonts/TahrirExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Tahrir"; src: url("../fonts/TahrirBlack.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  /* brand */
  --black: #181617;
  --black-burgundy: #21171A;
  --burgundy: #5C2425;
  --gold: #C9B078;
  --gold-light: #E4C48B;
  --gold-dark: #93662F;
  --raised: #2B1D20;
  --white: #FBFBFA;
  --gray: #B8AFA8;

  /* semantic tokens (dark is the brand's native theme) */
  --bg: #141213;
  --bg-2: var(--black);
  --surface: #1C1718;
  --surface-2: var(--black-burgundy);
  --surface-3: var(--raised);
  --line: rgba(228, 196, 139, .09);
  --line-2: rgba(228, 196, 139, .16);
  --text: var(--white);
  --text-2: var(--gray);
  --text-3: #857B75;
  --accent: var(--gold);
  --accent-hi: var(--gold-light);
  --accent-lo: var(--gold-dark);
  --accent-soft: rgba(201, 176, 120, .12);
  --danger: #E5636A;
  --danger-soft: rgba(92, 36, 37, .55);
  --warn: #D9A54A;
  --warn-soft: rgba(217, 165, 74, .12);
  --good: #7DBE95;
  --good-soft: rgba(125, 190, 149, .12);

  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 8px 24px rgba(0,0,0,.25);
  --side: 248px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14.5px/1.75 "Tahrir", system-ui, sans-serif;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(201,176,120,.3); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.gold { color: var(--accent); }
.red { color: var(--danger); }
.green { color: var(--good); }
.amber { color: var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(33,23,26,.92), rgba(24,22,23,.96));
  border-inline-start: 0; border-inline-end: 1px solid var(--line);
  backdrop-filter: blur(14px); padding: 18px 14px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(201,176,120,.35), 0 6px 18px rgba(0,0,0,.4); }
.brand b { display: block; font-weight: 800; font-size: 16px; letter-spacing: -.2px; }
.brand small { color: var(--text-3); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav .grp { color: var(--text-3); font-size: 11.5px; padding: 14px 12px 6px; font-weight: 500; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { background: rgba(255,255,255,.035); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent-hi); }
.nav a.on::before { content: ""; position: absolute; inset-inline-start: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav .badge { margin-inline-start: auto; }
.me { border-top: 1px solid var(--line); padding: 12px 6px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--accent-hi); font-weight: 700; font-size: 13px; flex: none; border: 1px solid var(--line-2); }
.me .who { flex: 1; min-width: 0; line-height: 1.4; }
.me .who b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--text-3); font-size: 11.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 28px; background: rgba(20,18,19,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.top .sub { color: var(--text-3); font-size: 12.5px; }
.top .spacer { flex: 1; }
.menu-btn { display: none; }
.scrim { display: none; }
.content { padding: 24px 28px 60px; max-width: 1480px; width: 100%; }
.demo-bar { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid rgba(217,165,74,.2); padding: 6px 28px; font-size: 12.5px; }

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
.card-h { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-h .spacer { flex: 1; }
.card-h a.more { color: var(--text-3); font-size: 12.5px; }
.card-h a.more:hover { color: var(--accent); }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-detail { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt { margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; font-weight: 500; font-size: 13.5px;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: rgba(228,196,139,.28); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1406; font-weight: 700; }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(255,255,255,.04); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn:focus-visible, .nav a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-within { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.06); color: var(--text-2); white-space: nowrap; }
.badge.gold { background: var(--accent-soft); color: var(--accent-hi); }
.badge.red { background: var(--danger-soft); color: #F4A3A7; }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.green { background: var(--good-soft); color: var(--good); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(0,0,0,.25); color: var(--text); transition: border-color .15s var(--ease), background .15s var(--ease);
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.8; }
.input:hover { border-color: rgba(228,196,139,.26); }
.input:focus { border-color: var(--accent); background: rgba(0,0,0,.35); outline: none; }
.input::placeholder { color: var(--text-3); }
select.input { appearance: none; padding-inline-start: 12px; padding-inline-end: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23B8AFA8' stroke-width='1.6'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; }
.input.sm { height: 34px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* segmented range control */
.seg { display: inline-flex; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { height: 30px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; color: var(--text-2); font-size: 12.5px; border: 0; background: none; cursor: pointer; transition: background .15s, color .15s; }
.seg a:hover, .seg button:hover { color: var(--text); }
.seg a.on, .seg button.on { background: var(--surface-3); color: var(--accent-hi); box-shadow: 0 0 0 1px var(--line-2); }
.range-custom { display: none; gap: 6px; align-items: center; }
.range-custom.show { display: inline-flex; }
.range-custom .input { width: 118px; height: 34px; text-align: center; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; overflow: hidden; transition: border-color .15s; }
a.kpi:hover { border-color: var(--line-2); }
.kpi .t { color: var(--text-2); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.kpi .t svg { width: 15px; height: 15px; color: var(--text-3); }
.kpi .v { font-size: 27px; font-weight: 800; line-height: 1.3; margin-top: 6px; letter-spacing: -.5px; white-space: nowrap; }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--text-2); margin-inline-start: 4px; letter-spacing: 0; }
.kpi .d { font-size: 12px; margin-top: 2px; color: var(--text-3); }
.kpi.hero { background: linear-gradient(160deg, rgba(201,176,120,.13), rgba(201,176,120,.02) 60%), var(--surface); border-color: rgba(201,176,120,.22); }
.kpi.hero .v { color: var(--accent-hi); }
.kpi.alert .v { color: var(--danger); }
.up { color: var(--good); } .down { color: var(--danger); }

/* ---------- summary ---------- */
.brief { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.brief li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.02); border: 1px solid var(--line); font-size: 13.5px; }
.brief li .dot { margin-top: 9px; color: var(--text-3); }
.brief li.bad .dot { color: var(--danger); } .brief li.warn .dot { color: var(--warn); } .brief li.good .dot { color: var(--good); } .brief li.info .dot { color: var(--accent); }

/* ---------- charts ---------- */
.chart { width: 100%; height: 260px; }
.chart.sm { height: 200px; }

/* funnel */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel .st { display: grid; grid-template-columns: 112px minmax(0, 1fr) 48px; align-items: center; gap: 10px; font-size: 13px; }
.funnel .st .name { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; border-radius: 10px; background: rgba(255,255,255,.05); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--accent-lo), var(--accent)); min-width: 3px; }
.funnel .won .bar i { background: linear-gradient(90deg, #4f8f69, var(--good)); }
.funnel .lost .bar i { background: linear-gradient(90deg, var(--burgundy), #9b3d40); }
.funnel .n { text-align: left; font-weight: 700; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; color: var(--text-3); font-weight: 500; font-size: 12px; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: rgba(255,255,255,.02); }
.tbl .name-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.tbl .name-cell b { font-weight: 600; display: block; line-height: 1.4; }
.tbl .name-cell small { color: var(--text-3); font-size: 12px; }
.tbl td.n, .tbl th.n { text-align: center; }
.rank { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.05); color: var(--text-2); }
.rank.r1 { background: var(--accent-soft); color: var(--accent-hi); }
.meter { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.meter .bar { flex: 1; height: 6px; }

/* lists */
.list { display: flex; flex-direction: column; }
.list .it { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.list .it:last-child { border-bottom: 0; }
.list .it .body { flex: 1; min-width: 0; line-height: 1.55; }
.list .it .body b { font-weight: 600; font-size: 13.5px; }
.list .it .body .s { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .it .end { text-align: left; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.ico-box { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.04); color: var(--text-2); flex: none; }
.ico-box svg { width: 16px; height: 16px; }
.empty { padding: 26px 10px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty svg { width: 28px; height: 28px; display: block; margin: 0 auto 8px; opacity: .6; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; font-weight: 500; transition: color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent-hi); border-bottom-color: var(--accent); }

/* ---------- filters bar ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters .search { position: relative; flex: 1 1 260px; max-width: 380px; }
.filters .search svg { position: absolute; inset-inline-start: 12px; top: 11px; width: 17px; height: 17px; color: var(--text-3); }
.filters .search .input { padding-inline-start: 38px; }
.filters select.input { width: auto; min-width: 140px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick a { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; transition: border-color .15s, color .15s, background .15s; }
.quick a:hover { border-color: var(--line-2); color: var(--text); }
.quick a.on { background: var(--accent-soft); border-color: rgba(201,176,120,.3); color: var(--accent-hi); }

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; color: var(--text-3); font-size: 13px; }

/* ---------- contact detail ---------- */
.profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile .avatar { width: 56px; height: 56px; font-size: 20px; }
.profile h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.profile .meta { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; margin-top: 2px; }
.profile .meta span { display: inline-flex; gap: 6px; align-items: center; }
.profile .meta svg { width: 15px; height: 15px; color: var(--text-3); }
.call-big { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.outcomes { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.2); cursor: pointer; font-size: 13px; color: var(--text-2); transition: background .15s, border-color .15s, color .15s; }
.chip span:hover { color: var(--text); border-color: rgba(228,196,139,.28); }
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hi); }
.chip.good input:checked + span { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.chip.bad input:checked + span { background: var(--danger-soft); border-color: #9b3d40; color: #F4A3A7; }
.chip .dot { opacity: .7; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.presets button { height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--text-2); cursor: pointer; font-size: 12.5px; transition: border-color .15s, color .15s; }
.presets button:hover, .presets button.on { border-color: var(--accent); color: var(--accent-hi); }
.when { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.hidden { display: none !important; }
.callbox { border-color: rgba(201,176,120,.2); background: linear-gradient(180deg, rgba(201,176,120,.05), transparent 40%), var(--surface); }

.timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 10px 0; position: relative; }
.tl::before { content: ""; position: absolute; inset-inline-start: 16px; top: 42px; bottom: -10px; width: 1px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .ico-box { width: 34px; height: 34px; border-radius: 50%; }
.tl.call .ico-box { color: var(--accent); background: var(--accent-soft); }
.tl.stage .ico-box { color: var(--good); background: var(--good-soft); }
.tl .h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.tl .h b { font-weight: 600; }
.tl .h .when-t { color: var(--text-3); font-size: 12px; margin-inline-start: auto; }
.tl .txt { color: var(--text-2); font-size: 13.5px; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.answers { display: flex; flex-direction: column; gap: 10px; }
.answers .q { color: var(--text-3); font-size: 12px; }
.answers .a { font-size: 13.5px; }
.stage-steps { display: flex; gap: 4px; margin: 6px 0 2px; }
.stage-steps i { flex: 1; height: 5px; border-radius: 5px; background: rgba(255,255,255,.07); }
.stage-steps i.done { background: var(--accent-lo); }
.stage-steps i.cur { background: var(--accent); }

details.more summary { cursor: pointer; color: var(--text-2); font-size: 13px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 12px; }

/* ---------- kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(264px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: rgba(255,255,255,.015); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 190px); min-width: 0; }
.col-h { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.col-h .row { justify-content: space-between; }
.col-h b { font-size: 13.5px; font-weight: 700; }
.col-h small { color: var(--text-3); font-size: 12px; }
.col.won .col-h b { color: var(--good); } .col.lost .col-h b { color: #E58A8F; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; flex: 1; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: grab; transition: border-color .15s, background .15s; display: block; }
.dcard:hover { border-color: var(--line-2); background: var(--surface-2); }
.dcard b { font-size: 13.5px; font-weight: 600; display: block; }
.dcard .s { display: flex; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 12px; margin-top: 6px; }
.dcard.overdue { border-inline-start: 3px solid var(--danger); }
.dcard.stalled { border-inline-start: 3px solid var(--warn); }
.dcard.ghost { opacity: .35; }
.dcard.drag { box-shadow: 0 12px 30px rgba(0,0,0,.45); border-color: var(--accent); cursor: grabbing; }

/* ---------- toasts & messages ---------- */
.toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: tin .25s var(--ease); overflow-wrap: anywhere; }
.toast.error { border-color: rgba(229,99,106,.45); }
.toast.success { border-color: rgba(125,190,149,.4); }
.toast .x { margin-inline-start: auto; cursor: pointer; color: var(--text-3); background: none; border: 0; padding: 0 0 0 4px; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13.5px; margin-bottom: 16px; }
.alert.warn { border-color: rgba(217,165,74,.3); background: var(--warn-soft); color: var(--warn); }
.alert.error { border-color: rgba(229,99,106,.35); background: var(--danger-soft); color: #F4A3A7; }
.alert.success { border-color: rgba(125,190,149,.35); background: var(--good-soft); color: var(--good); }

/* entrance (one per section, nothing loops) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .45s var(--ease) both; }
  .reveal:nth-child(2) { animation-delay: .04s; } .reveal:nth-child(3) { animation-delay: .08s; }
  .reveal:nth-child(4) { animation-delay: .12s; } .reveal:nth-child(5) { animation-delay: .16s; }
  .reveal:nth-child(6) { animation-delay: .2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden;
  background: radial-gradient(900px 500px at 50% -10%, rgba(92,36,37,.55), transparent 70%), radial-gradient(600px 400px at 50% 110%, rgba(201,176,120,.08), transparent 70%), var(--bg); }
.auth::before { content: ""; position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='%23C9B078' stroke-width='3'%3E%3Cpath d='M0 46h46V2H10v34h26V12H20v14'/%3E%3C/svg%3E");
  background-size: 48px 48px; mask-image: radial-gradient(closest-side, #000, transparent); }
.auth-box { width: min(400px, 100%); position: relative; }
.auth-logo { width: 92px; height: 92px; display: block; margin: 0 auto 18px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(201,176,120,.35), 0 18px 50px rgba(0,0,0,.6); }
.auth h1 { text-align: center; font-size: 22px; margin: 0 0 4px; font-weight: 800; }
.auth p.lead { text-align: center; color: var(--text-3); margin: 0 0 22px; font-size: 13px; }
.auth .card { padding: 24px; background: rgba(28,23,24,.85); backdrop-filter: blur(12px); }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth .btn { height: 44px; }
.otp { letter-spacing: 8px; text-align: center; font-size: 20px; height: 50px !important; }

/* qr */
.qr { background: #fff; border-radius: 12px; padding: 10px; width: 200px; }
.qr svg { width: 100%; height: auto; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .g-main, .g-detail, .g-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(280px, 84vw); transform: translateX(100%); transition: transform .25s var(--ease); box-shadow: -20px 0 50px rgba(0,0,0,.5); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; }
  .content { padding: 16px 16px 60px; }
  .demo-bar { padding: 6px 16px; }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi .v { font-size: 22px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .top h1 { font-size: 17px; }
  .top .seg { order: 5; width: 100%; overflow-x: auto; }
  .card { padding: 16px; }
  .tbl-wrap { margin: 0 -16px; padding: 0 16px; }
  .funnel .st { grid-template-columns: 92px minmax(0, 1fr) 36px; }
  .call-big { margin-inline-start: 0; width: 100%; }
  .call-big .btn { flex: 1; }
  .hide-sm { display: none !important; }
}
