/* Dalmoney Capital - design system */
:root {
  color-scheme: light;
  --brand: #283891;            /* Dalmoney Capital blue (logo) */
  --brand-600: #22307c;
  --brand-700: #1b2663;
  --brand-50: #eef0f9;
  --brand-100: #d7dbf0;
  --brand-bright: #3a4db8;
  --gold: #ef5b2e;             /* logo orange - accents */
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f9fbfa;
  --surface-3: #eef2f0;
  --ink: #0f1a16;
  --ink-2: #3c4a44;
  --muted: #6b7a73;
  --line: #e2e8e5;
  --line-2: #d3dbd7;
  --pos: #067647;
  --neg: #c9302c;
  --warn: #b45309;
  --info: #1d5fbf;
  --shadow-sm: 0 1px 2px rgba(15, 26, 22, .06);
  --shadow: 0 1px 3px rgba(15, 26, 22, .06), 0 6px 20px rgba(15, 26, 22, .06);
  --shadow-lg: 0 20px 50px rgba(15, 26, 22, .18);
  --radius: 12px;
  --radius-sm: 8px;
  /* chart palette (validated categorical order) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --grid: #e7ebe9; --axis: #c9d1cd;
  --st-good: #0ca30c; --st-warn: #fab219; --st-serious: #ec835a; --st-crit: #d03b3b;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --brand: #8b98e8; --brand-600: #7684dc; --brand-700: #5d6bc4; --brand-50: #161a2e; --brand-100: #1e2440;
    --bg: #0c1110; --surface: #141b19; --surface-2: #18211e; --surface-3: #1e2926;
    --ink: #eef3f1; --ink-2: #c3cec9; --muted: #8b9a94; --line: #25302c; --line-2: #2f3c37;
    --pos: #3ccb8b; --neg: #f07070; --warn: #f0a24a; --info: #6aa5f5;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.03); --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --grid: #232c29; --axis: #34403b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #22a57a; --brand-600: #1b8d67; --brand-700: #13714f; --brand-50: #11261e; --brand-100: #173628;
  --bg: #0c1110; --surface: #141b19; --surface-2: #18211e; --surface-3: #1e2926;
  --ink: #eef3f1; --ink-2: #c3cec9; --muted: #8b9a94; --line: #25302c; --line-2: #2f3c37;
  --pos: #3ccb8b; --neg: #f07070; --warn: #f0a24a; --info: #6aa5f5;
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.03); --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --grid: #232c29; --axis: #34403b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.bold { font-weight: 650; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.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-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mb { margin-bottom: 16px; } .mb-sm { margin-bottom: 8px; }
.hide-sm { } @media (max-width: 720px) { .hide-sm { display: none !important; } }
.show-sm { display: none; } @media (max-width: 720px) { .show-sm { display: initial; } }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none !important; }
.btn:hover { background: var(--surface-3); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); }
.btn.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 550; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad, .card > .body { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.card.flat { box-shadow: none; }
.card.hero { background: var(--hero, linear-gradient(135deg, var(--brand-700), var(--brand) 60%, #129a6f)); color: #fff; border: 0; }
.card.hero .muted { color: rgba(255,255,255,.75); }
.card.clickable { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.clickable:hover { border-color: var(--brand); }

/* ---------- stats ---------- */
.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.stat .sub { font-size: 12.5px; margin-top: 2px; color: var(--muted); }
.hero-num { font-size: 34px; font-weight: 750; letter-spacing: -0.03em; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12.5px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.badge.good { background: color-mix(in srgb, var(--st-good) 14%, transparent); color: var(--pos); }
.badge.warn { background: color-mix(in srgb, var(--st-warn) 22%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--st-crit) 14%, transparent); color: var(--neg); }
.badge.info { background: color-mix(in srgb, var(--s1) 14%, transparent); color: var(--info); }
.badge.brand { background: var(--brand-50); color: var(--brand); }
.badge.outline { background: transparent; border-color: var(--line-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--neg); }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input[disabled] { background: var(--surface-3); color: var(--muted); }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--muted);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: 0; font-size: 13px; }
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span:before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span:before { transform: translateX(16px); }
.range { width: 100%; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox .input { padding-left: 34px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: var(--surface-2); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .sub { color: var(--muted); font-size: 12px; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs button:hover { color: var(--ink); }

/* ---------- modal / drawer / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8, 15, 12, .45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .15s ease-out; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal.wide, .modal.lg { max-width: 860px; }
.modal.xwide { max-width: 1100px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 10px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .overlay { align-items: flex-end; padding: 0; } .modal { border-radius: 18px 18px 0 0; max-height: 92vh; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 101;
  display: flex; flex-direction: column; animation: slide .2s ease-out; }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
@media (max-width: 720px) { .toasts { bottom: 80px; left: 12px; right: 12px; } }
.toast { background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px;
  display: flex; gap: 10px; align-items: flex-start; animation: pop .18s ease-out; max-width: 420px; }
.toast.error { background: var(--neg); color: #fff; }
.toast.success { background: var(--brand); color: #fff; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98) } }
@keyframes slide { from { transform: translateX(30px); opacity: 0 } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0 } }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { color: var(--line-2); margin-bottom: 8px; }
.alert { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.alert.info { background: color-mix(in srgb, var(--s1) 8%, var(--surface)); border-color: color-mix(in srgb, var(--s1) 30%, transparent); }
.alert.warn { background: color-mix(in srgb, var(--st-warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--st-warn) 45%, transparent); }
.alert.error { background: color-mix(in srgb, var(--st-crit) 9%, var(--surface)); border-color: color-mix(in srgb, var(--st-crit) 35%, transparent); }
.alert.success { background: var(--brand-50); border-color: var(--brand-100); }
.alert svg { flex: none; margin-top: 1px; }

/* ---------- admin / partner shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand img, .brand .logo { width: 34px; height: 34px; border-radius: 9px; }
.brand b { font-size: 15px; display: block; line-height: 1.1; }
.brand span { font-size: 11.5px; color: var(--muted); }
.nav { padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 1px; }
.nav .group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 520; font-size: 13.5px; text-decoration: none; }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.active { background: var(--brand-50); color: var(--brand); font-weight: 620; }
.nav a .count { margin-left: auto; background: var(--neg); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 6px; min-width: 18px; text-align: center; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 20; }
.content { padding: 24px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.menu-btn { display: none; }
.footer-note { font-size: 11.5px; color: var(--muted); padding: 16px 24px 24px; border-top: 1px solid var(--line); margin-top: auto; }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 90; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
}
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 80; }

/* ---------- client shell ---------- */
.c-top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.c-top-inner { max-width: 1180px; margin: 0 auto; height: 62px; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.c-nav { display: flex; gap: 4px; }
.c-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 560; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.c-nav a.active { color: var(--brand); background: var(--brand-50); }
.c-nav a:hover { background: var(--surface-3); }
.c-main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 100px; }
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .c-nav { display: none; }
  .c-main { padding: 14px 14px 96px; }
  .c-top-inner { padding: 0 14px; height: 56px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--surface);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 0; font-weight: 550; }
  .bottom-nav a.active { color: var(--brand); }
}
.disclaimer { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: var(--hero, radial-gradient(circle at 88% 12%, rgba(201,162,39,.35) 0, transparent 38%), linear-gradient(150deg, var(--brand-700), var(--brand) 55%, var(--brand-bright, #13a375)));
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art > * { position: relative; z-index: 1; }
.auth-glow { position: absolute; inset: auto -80px -120px auto; width: 420px; height: 420px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 65%); pointer-events: none; }
.auth-curve { position: absolute; left: 0; right: 0; bottom: 70px; z-index: 0; opacity: .55; pointer-events: none; width: 100%; height: 170px; }
.auth-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.auth-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(4px); }
.auth-chips span i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.auth-art h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; max-width: 460px; }
.auth-art p { color: rgba(255,255,255,.82); font-size: 15px; max-width: 440px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; margin-bottom: 6px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px 22px; min-height: 0; } .auth-art h1 { font-size: 24px; } .auth-art .hide-sm { display: none; } }

/* ---------- lists ---------- */
.list > .item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border-bottom: 0; }
.list > .item.clickable { cursor: pointer; }
.list > .item.clickable:hover { background: var(--surface-2); }
.icon-tile { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 520; overflow-wrap: anywhere; }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); border-radius: 99px; }
.steps { display: flex; gap: 6px; }
.steps > div { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.steps > div.done { background: var(--brand); }
.checklist .ck { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.ck-i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); flex: none; }
.ck-i.done { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; white-space: nowrap; z-index: 5; transform: translate(-50%, -110%); }
.chart .tip .t { color: var(--muted); margin-bottom: 3px; font-size: 11.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 8px; }
.donut-legend .li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend .li .v { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.hbar { display: flex; flex-direction: column; gap: 10px; }
.hbar .r { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: var(--s1); }

/* ---------- misc components ---------- */
.fund-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fund-card .name { font-weight: 620; line-height: 1.35; }
.fund-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.fund-card .rets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; }
.fund-card .rets b { display: block; font-size: 14px; }
.amc-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; font-size: 14px; }
.md h2 { font-size: 16px; margin: 18px 0 8px; }
.md h3 { font-size: 14.5px; margin: 14px 0 6px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md table { border-collapse: collapse; margin: 8px 0 14px; font-size: 13px; width: 100%; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.md th { background: var(--surface-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md em { color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; line-height: 1.5; }
.bubble.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble.assistant { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 4px; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban .colk { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 200px; }
.kanban .colk h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 2px 4px 10px; display: flex; justify-content: space-between; }
.kanban .lead { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: pointer; font-size: 13px; }
.kanban .lead:hover { border-color: var(--brand); }
.gauge-num { font-size: 30px; font-weight: 750; }
.calc-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: minmax(0, 1fr); } }
.calc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.calc-tile { padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.calc-tile b { display: block; font-size: 14px; }
.calc-tile span { font-size: 12.5px; color: var(--muted); }
.slider-field .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.slider-field .top .input { width: 150px; height: 32px; text-align: right; }
.pill-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.pill-toggle button { background: transparent; border: 0; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.pill-toggle button.active { background: var(--brand); color: #fff; }
.print-only { display: none; }
@media print { .sidebar, .topbar, .c-top, .bottom-nav, .no-print { display: none !important; } .shell { display: block; } .content, .c-main { padding: 0; } }

/* ---------- client app designs (Admin → Client app design) ----------
   Seven complete looks: each sets its own typefaces, shape language, surfaces, hero treatment, buttons and navigation.
   Structural tokens (defaults = Emerald / Classic): */
:root { --font-head: var(--font); --font-num: var(--font); --hero-ink: #fff; --hero-muted: rgba(255,255,255,.75); --chip-bg: rgba(255,255,255,.14);
  --chip-ink: #fff; --btn-radius: var(--radius-sm); --card-border: var(--line); --head-weight: 700; --label-case: none; --label-track: 0; }
h1, h2, h3, .hero-num { font-family: var(--font-head); }
h1, h2, h3 { font-weight: var(--head-weight); }
.card { border-color: var(--card-border); }
.card.hero { color: var(--hero-ink); }
.card.hero .muted { color: var(--hero-muted); }
.hero-chip { background: var(--chip-bg) !important; color: var(--chip-ink) !important; border: 0 !important; padding: 10px 14px; box-shadow: none !important; }
.btn { border-radius: var(--btn-radius); }
.hero-num, .stat .value, td.num, .num { font-family: var(--font-num); }
.stat .label { text-transform: var(--label-case); letter-spacing: var(--label-track); }

[data-skin] { --font-head: var(--font); --font-num: var(--font); }
.skin-preview { font-family: var(--font); }
.skin-preview .sp-num { font-family: var(--font-num); }

/* 2 · Royal - "Private wealth": serif display, navy & gold, tailored square corners, hairline gold borders */
[data-skin="royal"] { --brand: #1f3b8c; --brand-600: #19307a; --brand-700: #13245c; --brand-50: #eef1f9; --brand-100: #d6ddf1; --gold: #b8912a;
  --bg: #f6f5f1; --line: #e7e1cf; --card-border: #e4dcc3; --radius: 6px; --radius-sm: 4px; --btn-radius: 3px;
  --font-head: "Playfair Display", Georgia, serif; --font-num: "Playfair Display", Georgia, serif; --head-weight: 600;
  --hero: linear-gradient(160deg, #0d1838 0%, #16296a 100%); --hero-muted: #cdbf93; --chip-bg: rgba(231,201,101,.12); --chip-ink: #f3e3ae;
  --label-case: uppercase; --label-track: .08em; --shadow-sm: none; }
[data-skin="royal"] .card.hero { border-top: 3px solid #c9a227; }
[data-skin="royal"] .hero-num { color: #f0d77f; font-weight: 600; }
[data-skin="royal"] .c-nav a.active { background: transparent; color: var(--brand); box-shadow: inset 0 -2px 0 #c9a227; border-radius: 0; }
[data-skin="royal"] .page-head h1 { font-size: 26px; }

/* 3 · Ocean - "Clean & airy": geometric sans, light hero, borderless floating cards, pill buttons & pill navigation */
[data-skin="ocean"] { --brand: #0369a1; --brand-600: #075985; --brand-700: #0c4a6e; --brand-50: #e3f1fa; --brand-100: #c6e3f4;
  --bg: #eef5fa; --card-border: transparent; --radius: 20px; --radius-sm: 12px; --btn-radius: 999px;
  --font: "Plus Jakarta Sans", Inter, system-ui, sans-serif; --shadow-sm: 0 1px 2px rgba(3,105,161,.06), 0 8px 24px rgba(3,105,161,.06);
  --hero: linear-gradient(180deg, #ffffff 0%, #e3f1fa 100%); --hero-ink: #0b2a3f; --hero-muted: #4f6b80; --chip-bg: #ffffff; --chip-ink: #0b2a3f; }
[data-skin="ocean"] .card.hero { border: 1px solid #c6e3f4; }
[data-skin="ocean"] .hero-num { color: var(--brand); }
[data-skin="ocean"] .card-head { border-bottom: 0; padding-bottom: 4px; }
[data-skin="ocean"] .c-nav a.active, [data-skin="ocean"] .bottom-nav a.active { background: var(--brand); color: #fff; border-radius: 999px; }
[data-skin="ocean"] .bottom-nav a.active { margin: 0 6px; }
[data-skin="ocean"] .input { border-radius: 12px; }

/* 4 · Sunrise - "Friendly": rounded type, bigger text, very round shapes, warm tinted tiles */
[data-skin="sunrise"] { --brand: #c2410c; --brand-600: #a8380a; --brand-700: #7c2d12; --brand-50: #fff1e7; --brand-100: #fddcc6;
  --bg: #fdf8f3; --line: #f1e4d8; --card-border: #f1e4d8; --radius: 24px; --radius-sm: 16px; --btn-radius: 999px;
  --font: Nunito, "Segoe UI", system-ui, sans-serif; --head-weight: 800; --shadow-sm: 0 6px 18px rgba(124,45,18,.07);
  --hero: linear-gradient(135deg, #9a3412 0%, #ea580c 60%, #f59e0b 130%); }
[data-skin="sunrise"] body { font-size: 15px; }
[data-skin="sunrise"] .stat { background: var(--brand-50); border-color: transparent; }
[data-skin="sunrise"] .card.hero { border-radius: 30px; }
[data-skin="sunrise"] .c-nav a.active { border-radius: 999px; }
[data-skin="sunrise"] .avatar, [data-skin="sunrise"] .amc-logo { border-radius: 14px; }

/* 5 · Plum - "Bold": heavy display type, oversized numbers, borderless elevated cards */
[data-skin="plum"] { --brand: #6d28d9; --brand-600: #5b21b6; --brand-700: #4c1d95; --brand-50: #f3edfe; --brand-100: #e2d5fb;
  --bg: #f7f5fb; --card-border: transparent; --radius: 16px; --radius-sm: 10px; --btn-radius: 10px;
  --font-head: Sora, Inter, system-ui, sans-serif; --font-num: Sora, Inter, system-ui, sans-serif; --head-weight: 800;
  --shadow-sm: 0 2px 4px rgba(76,29,149,.06), 0 14px 34px rgba(76,29,149,.10);
  --hero: radial-gradient(120% 140% at 0% 0%, #7c3aed 0%, #4c1d95 55%, #2e1065 100%); }
[data-skin="plum"] .hero-num { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; }
[data-skin="plum"] .page-head h1 { font-size: 28px; letter-spacing: -0.03em; }
[data-skin="plum"] .stat .value { font-size: 26px; font-weight: 800; }
[data-skin="plum"] .btn.primary { box-shadow: 0 6px 16px rgba(109,40,217,.28); }

/* 6 · Mono - "Minimal": plex sans + mono figures, ink outlines, square corners, outlined hero */
[data-skin="mono"] { --brand: #111111; --brand-600: #000; --brand-700: #000; --brand-50: #f2f2f2; --brand-100: #e4e4e4; --bg: #ffffff;
  --line: #e4e4e4; --card-border: #1a1a1a; --radius: 2px; --radius-sm: 2px; --btn-radius: 2px; --shadow-sm: none;
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif; --font-num: "IBM Plex Mono", ui-monospace, monospace; --head-weight: 600;
  --hero: #ffffff; --hero-ink: #111; --hero-muted: #666; --chip-bg: #f2f2f2; --chip-ink: #111; --label-case: uppercase; --label-track: .06em; }
[data-skin="mono"] .card.hero { border: 2px solid #111; }
[data-skin="mono"] .c-nav a.active { background: #111; color: #fff; }
[data-skin="mono"] .bottom-nav a.active { color: #111; box-shadow: inset 0 2px 0 #111; }
[data-skin="mono"] .card-head { border-bottom-color: #1a1a1a; }

/* 7 · Midnight - "Night mode": dark surfaces, soft glow edges, rounded sans */
[data-skin="midnight"] { color-scheme: dark;
  --brand: #34d399; --brand-600: #10b981; --brand-700: #059669; --brand-50: #0f2a21; --brand-100: #143a2d;
  --bg: #0a0f14; --surface: #111820; --surface-2: #151e28; --surface-3: #1b2633; --ink: #eef3f8; --ink-2: #c4cfdb; --muted: #8796a8;
  --line: #1f2a37; --line-2: #2b3746; --card-border: #223041; --pos: #34d399; --neg: #f87171; --warn: #fbbf24; --info: #60a5fa;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --grid: #1c2632; --axis: #2d3a4a;
  --font: Manrope, Inter, system-ui, sans-serif; --radius: 16px; --radius-sm: 10px; --btn-radius: 10px;
  --hero: linear-gradient(135deg, #052e22 0%, #065f46 60%, #0f766e 120%); --shadow-sm: 0 0 0 1px rgba(52,211,153,.05), 0 10px 30px rgba(0,0,0,.35); }
[data-skin="midnight"] .btn.primary { color: #06281d; }
[data-skin="midnight"] .card.hero { box-shadow: 0 0 40px rgba(52,211,153,.15); }
.skin-preview { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); width: 100%; }
.skin-preview .sp-hero { background: var(--hero, linear-gradient(135deg, var(--brand-700), var(--brand))); color: #fff; padding: 14px; }
.skin-preview .sp-card { background: var(--surface); margin: 10px; border-radius: var(--radius); padding: 10px; border: 1px solid var(--line); }
.skin-preview .sp-btn { display: inline-block; background: var(--brand); color: #fff; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; }
.ticker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ticker::-webkit-scrollbar { display: none; }
.ticker .tq { flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 128px; }
.ticker .tq .l { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ticker .tq .v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* setup guides & pipelines */
.guide-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 10px; }
.guide-steps li::marker { color: var(--brand); font-weight: 700; }
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
.pipe { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--ink); font: inherit; }
.pipe.active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
/* partner shell */
.hide-lg { display: none; }
@media (max-width: 960px) { .hide-lg { display: inline; } }
@media (max-width: 860px) { .partner-shell .content { padding-bottom: 96px; } }
.partner-shell .content > .disclaimer { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 14px; }
/* custom two-column grids collapse to one column on phones (overrides inline templates) */
@media (max-width: 860px) { .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 720px) { .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .grid.g4 .stat .value { font-size: 19px; } }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
/* filter rows: dropdowns sit side by side at their natural width (they were stretching to full width) */
.row.wrap > select.input { width: auto; min-width: 150px; max-width: 100%; flex: 0 1 auto; font-weight: 400; font-size: 14px; }
@media (max-width: 640px) { .row.wrap > select.input { flex: 1 1 140px; } }

/* ---- dashboard transaction activity (Admin & Partner) ---- */
.activity { display: flex; flex-direction: column; gap: 14px; }
.activity-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg-pills { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.seg-pills button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 500; padding: 8px 14px;
  border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg-pills button:hover { background: var(--surface-3); color: var(--ink); }
.seg-pills button.active, .seg-pills button[aria-selected="true"] { background: var(--brand); color: #fff; }
.shortcut-menu { position: absolute; right: 0; top: 44px; z-index: 51; min-width: 220px; padding: 6px; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.menu-item { border: 0; background: transparent; text-align: left; font: inherit; font-size: 14px; color: var(--ink); padding: 9px 10px; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; gap: 10px; }
.menu-item:hover { background: var(--surface-3); }
.act-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.act-tile { position: relative; display: flex; align-items: center; gap: 16px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 18px; transition: box-shadow .15s, border-color .15s; }
.act-tile:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
.act-ico { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.act-tile.bad .act-ico { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
.act-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.act-label { color: var(--ink-2); font-size: 14.5px; }
.act-count.pos { color: var(--pos); } .act-count.neg { color: var(--neg); } .act-count.muted { color: var(--muted); }
.act-amt { font-family: var(--font-num); font-size: 24px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.act-go { position: absolute; top: 12px; right: 12px; color: var(--muted); }
@media (max-width: 1100px) { .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .act-grid { gap: 10px; }
  .act-tile { padding: 14px 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .act-ico { width: 40px; height: 40px; }
  .act-amt { font-size: 19px; }
  .activity-bar .grow { display: none; }
  .seg-pills { max-width: 100%; overflow-x: auto; }
  .seg-pills button { padding: 7px 8px; font-size: 12.5px; }
  .activity-bar .seg-pills:first-child { width: 100%; justify-content: space-between; }
}
/* hide-amounts switch pressed */
.btn.icon.active { background: var(--brand-50); color: var(--brand); }

/* ---- Dalmoney AI: floating orb + chat ---- */
.as-orb { position: fixed; right: 22px; bottom: 26px; width: 64px; height: 64px; border: 0; padding: 0; background: transparent; border-radius: 50%;
  cursor: pointer; z-index: 45; filter: drop-shadow(0 10px 22px rgba(40, 56, 145, .32)); }
.as-orb::before { content: ""; position: absolute; inset: -16px; border-radius: 50%; background: radial-gradient(circle, rgba(239, 91, 46, .22), rgba(239, 91, 46, 0) 68%);
  animation: as-pulse 3.2s ease-in-out infinite; pointer-events: none; }
.as-ring { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e, #f59e0b, #22c55e); animation: as-spin 7s linear infinite; }
.as-core { position: absolute; inset: 4px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 34% 30%, #f1f3ff 0%, #a9b3f2 16%, #3a4db8 48%, #1b2663 78%, #0d1340 100%);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, .3), inset 0 -8px 16px rgba(0, 0, 0, .35); }
.as-core::before { content: ""; position: absolute; inset: -20%; background:
  radial-gradient(circle at 30% 60%, rgba(255, 170, 130, .40), transparent 32%), radial-gradient(circle at 70% 40%, rgba(125, 160, 252, .38), transparent 30%),
  radial-gradient(circle at 55% 75%, rgba(255, 255, 255, .25), transparent 28%); animation: as-swirl 9s linear infinite; }
.as-core::after { content: ""; position: absolute; left: 17%; top: 11%; width: 42%; height: 26%; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 70%); }
.as-tag { position: absolute; top: -9px; right: -12px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, #ef5b2e, #f59e0b); box-shadow: 0 4px 12px rgba(239, 91, 46, .38); }
.as-orb:hover .as-core, .as-orb:focus-visible .as-core { filter: brightness(1.08); }
.as-orb:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 4px; }
@keyframes as-spin { to { transform: rotate(360deg); } }
@keyframes as-swirl { to { transform: rotate(-360deg); } }
@keyframes as-pulse { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes as-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes as-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .as-ring, .as-core::before, .as-orb::before, .as-typing i { animation: none !important; } }

.as-panel { position: fixed; right: 22px; bottom: 26px; width: 392px; height: min(660px, calc(100vh - 100px)); z-index: 60; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: as-in .18s ease-out; }
.as-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--brand-50), var(--surface)); }
.as-head b { font-size: 15.5px; }
.as-avatar { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; }
.as-avatar .as-ring { animation-duration: 14s; }
.as-avatar .as-core { inset: 2px; }
.as-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.as-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.chat.compact { flex: 1; min-height: 0; padding: 14px 12px; gap: 12px; }
.as-day { align-self: center; font-size: 11px; color: var(--muted); background: var(--surface-3); padding: 2px 10px; border-radius: 999px; }
.as-row { display: flex; gap: 8px; align-items: flex-end; }
.as-row.user { justify-content: flex-end; }
.as-row > .as-avatar { margin-bottom: 18px; }
.as-col { display: flex; flex-direction: column; gap: 6px; max-width: 86%; min-width: 0; }
.as-row.user .as-col { align-items: flex-end; }
.as-row .bubble { max-width: 100%; }
.bubble.assistant .as-rich { white-space: normal; }
.as-rich p { margin: 0 0 6px; }
.as-rich p:last-child { margin-bottom: 0; }
.as-rich ol, .as-rich ul { margin: 4px 0 8px; padding-left: 18px; }
.as-rich li { margin: 5px 0; }
.as-lead { font-weight: 600; }
.as-fine { font-size: 11.5px; color: var(--muted); }
.as-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.as-score { display: inline-block; background: var(--brand); color: #fff; border-radius: 6px; padding: 0 6px; font-size: 11.5px; font-weight: 700; margin-right: 4px; }
.as-time { font-size: 10.5px; color: var(--muted); padding: 0 4px; }
.as-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.as-act { border: 1px solid var(--brand-100); background: var(--surface); color: var(--brand); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 11px;
  border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; text-align: left; }
.as-act:hover { background: var(--brand-50); }
.as-act.dl { background: var(--brand); color: #fff; border-color: var(--brand); }
.as-act.dl:hover { background: var(--brand-600); }
.as-act.ask { color: var(--ink-2); border-color: var(--line-2); font-weight: 500; }
.as-typing { display: inline-flex; gap: 4px; padding: 2px 0; }
.as-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: as-blink 1.2s infinite; }
.as-typing i:nth-child(2) { animation-delay: .15s; } .as-typing i:nth-child(3) { animation-delay: .3s; }
.as-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.as-input .input { border-radius: 999px; padding: 0 14px; }
.as-input .btn.icon { border-radius: 50%; width: 38px; height: 38px; flex: none; }
.as-note { font-size: 10.5px; color: var(--muted); padding: 0 14px 10px; text-align: center; }
@media (max-width: 860px) {
  .as-orb { right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 58px; height: 58px; }
  .as-panel { inset: auto 0 0 0; width: 100%; height: min(88vh, 720px); border-radius: 18px 18px 0 0; }
}
@media print { .as-orb, .as-panel { display: none !important; } }

/* ---- client fund baskets ---- */
.basket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card.basket { padding: 18px; display: flex; flex-direction: column; }
.card.basket.rec { border-color: var(--brand-100); box-shadow: 0 0 0 1px var(--brand-100), var(--shadow); }
.basket-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.basket-stats div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.basket-stats span { font-size: 11.5px; color: var(--muted); }
.basket-stats b { font-family: var(--font-num); font-size: 16px; }
.basket-funds { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.basket-fund { position: relative; display: grid; grid-template-columns: 44px 30px 1fr; gap: 8px; align-items: center; padding: 8px 6px; border-radius: 8px; text-decoration: none; color: inherit; overflow: hidden; }
.basket-fund:hover { background: var(--surface-3); }
.bf-w { font-family: var(--font-num); font-weight: 700; color: var(--brand); text-align: right; }
.bf-n { display: flex; flex-direction: column; min-width: 0; }
.bf-name { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w); background: var(--brand); opacity: .35; border-radius: 2px; }
@media (max-width: 640px) { .basket-grid { grid-template-columns: 1fr; } }
.as-embedded { display: flex; flex-direction: column; height: min(64vh, 600px); }
.as-embedded .chat { flex: 1; min-height: 0; }
.basket-cta { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); text-decoration: none; color: inherit;
  background: linear-gradient(120deg, var(--brand-50), var(--surface)); border: 1px solid var(--brand-100); }
.basket-cta:hover { box-shadow: var(--shadow); }

/* ---------- factsheet ---------- */
.fs-navline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 13.5px; }
.fs-navline .num { font-size: 20px; font-weight: 700; color: var(--ink); }
.fs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.fs-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
.fs-kv { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.fs-kv span { font-size: 12.5px; color: var(--muted); }
.fs-kv b { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.fs-exit { padding-top: 10px; font-size: 13.5px; }
.fs-returns { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 13.5px; }
.fs-disclaimer { font-size: 12px; color: var(--muted); line-height: 1.55; padding: 4px 2px; }
.fs-disclaimer b { color: var(--ink-2); display: block; margin-bottom: 4px; }
.fs-disclaimer p { margin: 0 0 6px; }
.perf-bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 8px; height: 150px; margin: 4px 0 10px; }
.pb { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; max-width: 64px; }
.pb-val { font-size: 12px; font-weight: 650; min-height: 18px; }
.pb-track { flex: 1; width: 60%; display: flex; align-items: flex-end; }
.pb-fill { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; }
.pb-fill.neg { background: var(--neg); }
.pb-lab { font-size: 12px; color: var(--muted); margin-top: 4px; }
.riskometer svg { display: block; max-width: 320px; margin: 0 auto; }
@media (max-width: 720px) { .fs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- market pages (top schemes, NFOs, latest NAV) ---------- */
.mkt-list { display: flex; flex-direction: column; }
.mkt-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left;
  font: inherit; color: inherit; cursor: pointer; width: 100%; }
.mkt-row:last-child { border-bottom: 0; }
.mkt-row:hover { background: var(--surface-2); }
.mkt-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mkt-name > span:first-child { font-weight: 550; line-height: 1.3; }
.mkt-val { font-weight: 700; font-size: 15.5px; white-space: nowrap; font-family: var(--font-num, inherit); }
.mkt-nav { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.period-bar { display: flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 10px; overflow-x: auto; }
.period-bar button { flex: 1; border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 8px 6px; border-radius: 8px;
  cursor: pointer; min-width: 44px; }
.period-bar button.active { background: var(--brand); color: #fff; }
.idx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.idx { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.idx b { font-size: 16px; }
.mkt-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.mkt-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 550; }
.mkt-links a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- folio details ---------- */
.fo-top { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fo-top > div { background: var(--surface-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fo-top span { font-size: 12px; color: var(--muted); }
.fo-top b { font-size: 15px; }
.fo-top i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.fo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fo-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.fo-sec-h { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-bottom: 8px; color: var(--brand); }
.fo-sub { font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
.fo-kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 12px; font-size: 13.5px; }
.fo-kv > div { display: contents; }
.fo-kv span { color: var(--muted); }
.fo-kv b { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 860px) { .fo-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fo-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .fo-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- daily changes ---------- */
.change-bars { display: block; }
.tbl tr.sel td { background: var(--brand-50); }

/* ---------- language picker ---------- */
.lang-pick { position: relative; display: inline-flex; }
.lang-pick .btn.sm { gap: 6px; }
.lang-scrim { position: fixed; inset: 0; z-index: 60; }
.lang-menu { position: absolute; right: 0; top: 42px; z-index: 61; min-width: 210px; padding: 6px; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); max-height: 70vh; overflow: auto; }
.lang-menu .menu-item { display: flex; align-items: center; gap: 10px; }
.lang-menu .menu-item b { min-width: 76px; font-weight: 600; }
.lang-menu .menu-item span { flex: 1; }
.lang-menu .menu-item.active { background: var(--brand-50); color: var(--brand); }
.auth-tools { position: absolute; top: 14px; left: 20px; right: 20px; display: flex; align-items: center; gap: 10px; }
.auth-form { position: relative; }
.auth-tools a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }

/* ---------- public home ---------- */
.pub { min-height: 100vh; background: var(--bg); }
.pub-top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.pub-top-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.pub-brand { text-decoration: none; color: inherit; display: flex; align-items: center; }
.pub-main { max-width: 1040px; margin: 0 auto; padding: 18px 16px 28px; }
.pub-foot { max-width: 1040px; margin: 0 auto; padding: 0 16px 40px; }
.pub-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-radius: 16px; color: #fff;
  background: var(--hero, radial-gradient(circle at 88% 12%, rgba(201,162,39,.35) 0, transparent 38%), linear-gradient(120deg, var(--brand-700), var(--brand) 60%, var(--brand-bright, #1f9a6e)));
  position: relative; overflow: hidden; }
.pub-hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.2), rgba(255,255,255,0) 65%); pointer-events: none; }
.pub-hero-t { font-size: 22px; font-weight: 750; line-height: 1.25; }
.pub-hero-s { opacity: .9; margin-top: 6px; font-size: 14px; }
.pub-hero .btn.primary { background: #fff; color: var(--brand-700); border-color: #fff; }
.pub-lock { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow-sm); }
.pub-lock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pub-lock-grid > div { display: flex; flex-direction: column; gap: 2px; }
.pub-lock-grid span { font-size: 12.5px; color: var(--muted); }
.pub-lock-grid b { font-size: 20px; }
.blur { filter: blur(7px); user-select: none; }
.pub-lock-cta { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 10px; background: var(--brand-50);
  color: var(--brand); font-weight: 650; font-size: 14px; }
.pub-h { font-size: 16px; margin: 6px 0 10px; }
.pub-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.pub-route { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); }
.pub-route:hover { border-color: var(--brand); }
.pub-route .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pub-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pub-tool { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 550; }
.pub-tool:hover { border-color: var(--brand); }
@media (max-width: 600px) { .pub-hero-t { font-size: 19px; } .pub-lock-grid b { font-size: 17px; } }

/* ---------- payout rules ---------- */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rule-cell { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }

/* ---------- Indian-language text ---------- */
html.i18n body { line-height: 1.6; }
html.i18n .btn, html.i18n .chip, html.i18n .menu-item { line-height: 1.35; }

/* ---- Dalmoney Desk (client home) ---- */
.card.desk { padding: 16px 18px; border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, var(--surface)), var(--surface)); }
.card.desk.priority { border-color: color-mix(in srgb, var(--gold, #EF5B2E) 45%, var(--line)); box-shadow: 0 6px 24px color-mix(in srgb, var(--gold, #EF5B2E) 14%, transparent); }
.desk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.desk-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--hero, var(--brand)); flex: none; }
.desk-title { font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.desk-badge { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: #fff; background: var(--gold, #EF5B2E); }
.desk-people { display: grid; gap: 8px; margin-top: 12px; }
.desk-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.desk-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); flex: none; }
.desk-avatar.alt { color: var(--gold, #EF5B2E); background: color-mix(in srgb, var(--gold, #EF5B2E) 12%, var(--surface)); }
.desk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.desk-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-size: .82rem; font-weight: 600; text-decoration: none; }
.desk-btn:hover { border-color: var(--brand); color: var(--brand); }
.desk-btn.wa { color: #128C4A; border-color: color-mix(in srgb, #25D366 45%, var(--line)); }
@media (max-width: 560px) { .desk-actions { width: 100%; } .desk-btn { flex: 1; justify-content: center; } .desk-btn span { font-size: .78rem; } }
.amc-logo.img { background: #fff; border: 1px solid var(--line); padding: 3px; overflow: hidden; }
.amc-logo.img img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px; }
.desk-head > .grow { flex: 1 1 200px; min-width: 0; }
.desk-title { white-space: nowrap; }
@media (max-width: 560px) { .desk-head > .btn { width: 100%; justify-content: center; } .card.desk { padding: 14px; } }

/* ---- Direct vs Regular (admin) ---- */
.ter-bars { display: grid; gap: 3px; min-width: 150px; }
.ter-row { display: grid; grid-template-columns: 12px 1fr 46px; align-items: center; gap: 6px; font-size: .75rem; }
.ter-lab { color: var(--muted); font-weight: 700; }
.ter-row b { text-align: right; font-variant-numeric: tabular-nums; }
.ter-track { height: 6px; border-radius: 4px; background: var(--surface-3, #eef0f5); overflow: hidden; }
.ter-fill { height: 100%; border-radius: 4px; }
.ter-fill.reg { background: var(--brand); }
.ter-fill.dir { background: var(--gold, #EF5B2E); }
.calc-pdf { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 560px) { .calc-pdf .input { max-width: none; flex: 1 1 100%; } .calc-pdf .btn { flex: 1; justify-content: center; } }

/* ---- Idea bank */
.idea-star { background: none; border: 0; padding: 0 2px; line-height: 1; color: var(--warn, #d48a16); cursor: pointer; }
.idea-star:disabled { cursor: default; }
.idea-star:focus-visible { outline: 2px solid var(--brand); border-radius: 4px; }
.idea-reply { background: var(--surface-2, rgba(40, 56, 145, .06)); border-left: 3px solid var(--brand); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.desk-idea { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--brand); text-decoration: none; }
.desk-idea:hover { text-decoration: underline; }
