/* Avery web — design system and surfaces */

/* Rowjar web — design system and surfaces */
:root {
  --bg: #F6F2EA;
  --panel: #ffffff;
  --panel-2: #FBF9F4;
  --sidebar: #FBF8F1;
  --ink: #13152B;
  --ink-2: #50546E;
  --muted: #7B7F98;
  --faint: #A3A6BA;
  --line: #E2DCCF;
  --line-2: #EBE6DA;
  --green: #2E4BE0;
  --green-deep: #1F37B8;
  --accent: #2E4BE0;
  --accent-soft: #EEF1FD;
  --accent-line: #CCD5F8;
  --butter: #FFDD6B;
  --butter-soft: #FFF8DC;
  --amber: #a26a12;
  --amber-soft: #fbf3e2;
  --red: #b42318;
  --red-soft: #fdeceb;
  --blue: #2f6fed;
  --blue-soft: #eaf0fe;
  --shadow: 0 1px 2px rgba(19, 21, 43, .04), 0 2px 6px rgba(19, 21, 43, .03);
  --radius: 12px;
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Bricolage Grotesque", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0F1020;
  --panel: #181A2E;
  --panel-2: #1C1F35;
  --sidebar: #131528;
  --ink: #ECEBF5;
  --ink-2: #A7AAC2;
  --muted: #8D90AB;
  --faint: #6C6F8C;
  --line: #2A2D45;
  --line-2: #222540;
  --green: #8EA2FF;
  --green-deep: #2440C4;
  --accent: #8EA2FF;
  --accent-soft: #1E2240;
  --accent-line: #2F3560;
  --amber: #e2b46a;
  --amber-soft: #2a2418;
  --red: #f08a80;
  --red-soft: #33201d;
  --blue: #8db1ff;
  --blue-soft: #1b2537;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
svg.ic { display: block; flex: none; }
::selection { background: #DDE3FC; color: #13152B; }

/* ------------------------------------------------------------------ */
/* Shell                                                               */
/* ------------------------------------------------------------------ */

.app { display: flex; min-height: 100vh; }

.side {
  width: 236px; flex: none; min-height: 100vh; background: var(--sidebar);
  border-right: 1px solid var(--line); padding: 18px 12px 14px;
  display: flex; flex-direction: column; position: sticky; top: 0; max-height: 100vh;
}
.side-top { padding: 0 6px 14px; }
.brand-mark { width: 1.1em; height: 1.1em; vertical-align: -.17em; margin-right: .3em; }
.brand {
  display: inline-block; font-family: var(--serif); font-size: 25px; letter-spacing: -.02em;
  color: var(--ink); font-weight: 800; line-height: 1; padding: 4px 4px 12px;
}
.ws-switch {
  width: 100%; display: flex; align-items: center; gap: 6px; background: none; border: 0;
  padding: 4px; border-radius: 8px; text-align: left;
}
.ws-switch:hover { background: rgba(46, 75, 224, .06); }
.ws-switch .ws-name { font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.ws-switch .ws-tag { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.ws-switch .ws-chev { margin-left: auto; color: var(--faint); }
.ws-copy { display: flex; flex-direction: column; min-width: 0; }
.ws-copy .ws-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-nav { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 8px;
  color: var(--ink-2); font-size: 13px; border: 0; background: none; text-align: left; width: 100%;
  position: relative;
}
.nav-item:hover { background: rgba(46, 75, 224, .055); color: var(--ink); }
.nav-item.active { background: #E8ECFC; color: var(--green); font-weight: 600; }
[data-theme="dark"] .nav-item.active { background: #232848; color: var(--accent); }
.nav-item .ic { color: var(--faint); }
.nav-item.active .ic { color: var(--green); }
.nav-item .nav-badge {
  margin-left: auto; font-size: 10px; font-weight: 600; background: var(--amber-soft); color: var(--amber);
  padding: 1px 6px; border-radius: 999px; letter-spacing: .01em;
}
.nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #2E4BE0; }
.nav-group { padding: 14px 9px 5px; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); }

.side-foot { margin-top: auto; padding-top: 14px; }
.credits { padding: 9px; border-top: 1px solid var(--line); }
.credits-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.credits-row b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.credit-bar { height: 3px; background: var(--line); border-radius: 99px; margin-top: 7px; overflow: hidden; }
.credit-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2E4BE0, #FFDD6B); border-radius: 99px; }
.profile-row { display: flex; align-items: center; gap: 8px; padding: 10px 8px 4px; border-top: 1px solid var(--line); margin-top: 2px; }
.profile-row .p-copy { min-width: 0; flex: 1; }
.profile-row .p-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-row .p-mail { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-row .p-actions { display: flex; gap: 2px; }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex: none; letter-spacing: .01em; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1010px; margin: 0 auto; padding: 34px 44px 90px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { font-size: 11px; color: var(--muted); margin-bottom: 6px; letter-spacing: .01em; }
.h1 { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.tiny { font-size: 10.5px; }
.strong { font-weight: 600; }
.right { margin-left: auto; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Buttons & controls                                                  */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 12.5px; font-weight: 500;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: #d8d8d0; }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 550; }
.btn.primary:hover { background: #2440C4; border-color: #2440C4; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(0, 0, 0, .045); }
.btn.dark { background: #13152B; border-color: #13152B; color: #fff; }
.btn.sm { height: 28px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
.btn.lg { height: 38px; padding: 0 16px; font-size: 13px; }
.btn.link { border: 0; background: none; padding: 0; height: auto; color: var(--accent); font-weight: 500; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }
/* Dark mode lightens --green / --red, so white text on them drops to ~1.8:1. Use dark text. */
[data-theme="dark"] .btn.primary { color: #0F1020; }
[data-theme="dark"] .btn.primary:hover { background: #A9B8FF; border-color: #A9B8FF; }
[data-theme="dark"] .btn.danger { color: #2a0d0a; }
[data-theme="dark"] .btn.danger:hover { background: #f5a39b; border-color: #f5a39b; }
[data-theme="dark"] .tx-check.on, [data-theme="dark"] .composer .send { color: #0F1020; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.icon-btn.sm { width: 24px; height: 24px; }

.search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px; color: var(--muted);
  min-width: 250px;
}
.search input { border: 0; outline: none; background: none; width: 100%; font-size: 12.5px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.search .kbd { font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; color: var(--faint); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; font-weight: 550; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); outline: none; font-size: 12.5px; color: var(--ink);
}
.textarea { height: auto; min-height: 76px; padding: 9px 10px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #9AA8F0; box-shadow: 0 0 0 3px rgba(46, 75, 224, .16); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 11.5px; color: var(--ink-2);
}
.chip:hover { background: var(--panel-2); }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--green); font-weight: 550; }
.chip.amber { background: var(--amber-soft); border-color: #f0dfbc; color: var(--amber); }
.chip .count { font-size: 10px; background: rgba(0, 0, 0, .06); border-radius: 99px; padding: 0 5px; }
.chip.on .count { background: rgba(46, 75, 224, .12); }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 550; padding: 2px 7px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag.green { background: var(--accent-soft); border-color: var(--accent-line); color: var(--green); }
.tag.amber { background: var(--amber-soft); border-color: #f0dfbc; color: var(--amber); }
.tag.red { background: var(--red-soft); border-color: #f5d4d0; color: var(--red); }
.tag.blue { background: var(--blue-soft); border-color: #d9e4fb; color: var(--blue); }

.switch {
  width: 34px; height: 20px; border-radius: 999px; border: 0; background: #d6d6cf;
  position: relative; transition: background .16s; flex: none; padding: 0;
}
.switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .16s; }
.switch.on { background: var(--accent); }
.switch.on span { left: 16px; }
[data-theme="dark"] .switch { background: #39413c; }
[data-theme="dark"] .switch.on { background: var(--accent); }
.switch[disabled] { opacity: .5; cursor: not-allowed; }
.rule-warn { display: inline-flex; align-items: center; gap: 3px; color: var(--amber); font-weight: 550; }
.turnstile-slot { margin-top: 10px; min-height: 65px; }

.segmented { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.segmented button { border: 0; background: none; font-size: 11.5px; padding: 4px 10px; border-radius: 6px; color: var(--muted); }
.segmented button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 550; }

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.section-head h2 { font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.section-head .link { font-size: 11.5px; color: var(--accent); }

.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.stat-label .mark { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); }
.stat-value { font-size: 25px; font-weight: 600; letter-spacing: -.025em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

.accounts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.account-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 15px 13px; box-shadow: var(--shadow); position: relative; min-height: 104px; }
.account-card .acct-name { font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.account-card .acct-type { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.account-card .acct-bal { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-top: 17px; font-variant-numeric: tabular-nums; }
.account-card .acct-foot { font-size: 10px; color: var(--faint); margin-top: 3px; }
.account-card .acct-apy { position: absolute; top: 14px; right: 14px; font-size: 10px; color: var(--muted); }
.acct-badge { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 650; color: #fff; }

.merchant-mark { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: #fff; font-weight: 650; flex: none; }

/* ------------------------------------------------------------------ */
/* Transactions                                                        */
/* ------------------------------------------------------------------ */

.tx-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tx-controls { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; }
.tx-controls .count { font-size: 11.5px; color: var(--muted); }
.tx-controls .sync { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent); font-size: 11.5px; padding: 0; }
.tx-controls .right { display: flex; gap: 6px; align-items: center; margin-left: auto; }

.tx-list { border-top: 1px solid var(--line-2); }
.tx-day { display: flex; align-items: center; gap: 10px; padding: 18px 4px 7px; }
.tx-day .label { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.tx-day .rule { flex: 1; height: 1px; background: var(--line-2); }
.tx-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 6px 10px 4px; border-bottom: 1px solid var(--line-2);
  background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; border-radius: 0;
}
.tx-row:hover { background: rgba(46, 75, 224, .035); }
.tx-row.selected { background: var(--accent-soft); }
.tx-main { min-width: 0; flex: 1; }
.tx-merchant { font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amount { font-size: 12.5px; font-weight: 550; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; min-width: 96px; flex: none; }
.tx-amount.in { color: var(--accent); }
.tx-amount.pending { color: var(--muted); }
.tx-side { display: flex; align-items: center; gap: 10px; flex: none; }
.tx-flags { display: flex; align-items: center; justify-content: flex-end; width: 88px; flex: none; }
.tx-check { width: 16px; height: 16px; border: 1px solid #cfd4d0; border-radius: 4px; background: var(--panel); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tx-check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tx-empty { padding: 46px 0; text-align: center; color: var(--muted); font-size: 12.5px; }

.bulk-bar {
  position: sticky; bottom: 18px; margin: 18px auto 0; width: fit-content;
  background: #13152B; color: #fff; border-radius: 10px; padding: 8px 10px; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22); z-index: 20;
}
.bulk-bar .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: #fff; }
.bulk-bar .btn:hover { background: rgba(255, 255, 255, .17); }
.bulk-bar .count { font-size: 11.5px; padding: 0 6px; color: #DDE3FC; }
[data-theme="dark"] .bulk-bar { background: #2E4BE0; }

/* review */
.review-progress { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.review-progress .track { width: 120px; height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; }
.review-progress .track span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.review-group { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.rg-head { display: flex; align-items: center; gap: 11px; padding: 13px 14px; }
.rg-head .merchant-mark { width: 30px; height: 30px; }
.rg-title { font-size: 12.5px; font-weight: 600; }
.rg-meta { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.rg-total { margin-left: auto; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rg-rows { border-top: 1px solid var(--line-2); max-height: 400px; overflow: auto; }
.rg-row { display: flex; align-items: center; gap: 9px; padding: 7px 14px; border-bottom: 1px solid var(--line-2); font-size: 11px; }
.rg-row:last-child { border-bottom: 0; }
.rg-row .desc { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.rg-row .date { color: var(--faint); font-size: 10px; white-space: nowrap; }
.rg-row .amt { font-variant-numeric: tabular-nums; font-weight: 500; }
.rg-foot { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--panel-2); flex-wrap: wrap; }
.cat-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 11.5px; }
.cat-chip:hover { border-color: #CCD5F8; }
.cat-chip .ai { color: #2E4BE0; }
.cat-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.link-chip { border: 0; background: none; color: var(--muted); font-size: 11.5px; padding: 0 4px; }
.link-chip:hover { color: var(--ink); }

/* category picker */
.cat-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 18px; }
.cat-option { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 7px 4px; border-radius: 7px; text-align: left; font-size: 12px; color: var(--ink-2); }
.cat-option:hover { background: var(--panel-2); color: var(--ink); }
.cat-option .swatch { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.cat-option .ai { margin-left: auto; color: #2E4BE0; opacity: .8; }

/* ------------------------------------------------------------------ */
/* Agent                                                               */
/* ------------------------------------------------------------------ */

.agent-shell { display: flex; flex-direction: column; min-height: calc(100vh - 34px); }
.agent-head { display: flex; align-items: flex-start; gap: 11px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.agent-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent-line); display: flex; align-items: center; justify-content: center; color: var(--green); flex: none; }
.agent-head h1 { font-size: 14px; font-weight: 600; }
.agent-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.agent-head .right { display: flex; align-items: center; gap: 4px; }
.credit-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; background: var(--panel); }
.credit-chip .diamond { width: 9px; height: 9px; background: linear-gradient(135deg, #2E4BE0, #FFDD6B); transform: rotate(45deg); border-radius: 2px; }

.agent-thread { flex: 1; padding: 26px 6px 120px; display: flex; flex-direction: column; gap: 22px; max-width: 700px; margin: 0 auto; width: 100%; }
.msg { display: flex; gap: 10px; }
.msg .msg-mark { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.msg-agent .msg-mark { background: var(--accent-soft); color: var(--green); border: 1px solid var(--accent-line); }
.msg-body { font-size: 12.5px; line-height: 1.62; color: var(--ink-2); white-space: pre-wrap; }
.msg-body strong, .msg-body b { color: var(--ink); font-weight: 600; }
.msg-agent .msg-body { padding-top: 3px; }
.msg-user { justify-content: flex-end; }
.msg-user .msg-bubble { background: var(--panel-2); border: 1px solid var(--line); padding: 9px 13px; border-radius: 12px; border-bottom-right-radius: 4px; font-size: 12.5px; max-width: 78%; }
.msg-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 10.5px; color: var(--faint); }
.msg-foot .link { color: var(--muted); }
.msg-txns { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; max-width: 520px; }
.msg-txns .tx-row { padding: 8px 11px; }
.msg-txns .tx-flags { width: auto; }
.msg-txns .tx-amount { min-width: 0; }
.msg-txns .tx-merchant { font-size: 12px; }
.agent-disclaimer { text-align: center; font-size: 10px; color: var(--faint); margin: 16px 0 8px; }

.composer-wrap { position: sticky; bottom: 0; padding: 10px 0 18px; background: linear-gradient(180deg, transparent, var(--bg) 26%); }
.composer {
  max-width: 700px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 22px rgba(19, 21, 43, .06); display: flex; align-items: center; gap: 6px; padding: 6px 8px;
}
.composer input { flex: 1; border: 0; outline: none; background: none; height: 34px; font-size: 12.5px; }
.composer input::placeholder { color: var(--faint); }
.composer .mode { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); padding: 0 6px; border-left: 1px solid var(--line-2); }
.composer .send { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.composer .send:hover { background: #2440C4; }
.agent-suggestions { display: flex; gap: 6px; flex-wrap: wrap; max-width: 700px; margin: 0 auto 10px; }
.agent-suggestions .chip { font-size: 11px; }

/* ------------------------------------------------------------------ */
/* Reports                                                             */
/* ------------------------------------------------------------------ */

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-card { display: flex; align-items: flex-start; gap: 11px; padding: 14px 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); text-align: left; }
.report-card:hover { border-color: #D8D2C4; background: #FBF9F4; }
.report-card .r-icon { width: 24px; height: 24px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.report-card h3 { font-size: 12.5px; font-weight: 600; }
.report-card p { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.report-card .exp { margin-left: auto; font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
[data-theme="dark"] .report-card:hover { background: #1d221e; }

.report-toolbar { display: flex; align-items: center; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.report-toolbar .select { width: auto; height: 30px; font-size: 11.5px; }
.report-body { padding: 18px; }
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; background: var(--panel-2); }
.kpi .k-label { font-size: 10.5px; color: var(--muted); }
.kpi .k-value { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 10px; color: var(--faint); margin-top: 2px; }

.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.table td { font-size: 11.5px; padding: 8px 8px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 600; color: var(--ink); border-top: 1px solid var(--line); border-bottom: 0; }
.table .cat-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.table-wrap { overflow-x: auto; }
.table .muted { color: var(--muted); }

.chart-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin: 6px 0 20px; }
.chart-card { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; background: var(--panel); }
.chart-card h4 { font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.chart { width: 100%; height: 130px; display: block; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 10.5px; color: var(--muted); }
.chart-legend .item { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend .sw { width: 7px; height: 7px; border-radius: 2px; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 145px 1fr 74px; align-items: center; gap: 10px; font-size: 11px; }
.bar-label { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 4px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.donut-wrap { display: flex; align-items: center; gap: 14px; }
.donut { flex: none; }
.donut-legend { display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; color: var(--muted); min-width: 0; }
.donut-legend .row { display: flex; align-items: center; gap: 6px; }
.donut-legend .sw { width: 6px; height: 6px; border-radius: 2px; flex: none; }
.donut-legend .row b { margin-left: auto; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Settings                                                            */
/* ------------------------------------------------------------------ */

.settings-wrap { max-width: 720px; }
.settings-profile { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 22px; }
.settings-profile .p-name { font-size: 13px; font-weight: 600; }
.settings-profile .p-mail { font-size: 11.5px; color: var(--muted); }
.setting-group { margin-bottom: 26px; }
.setting-group > h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 500; padding: 0 4px 8px; }
.setting-rows { border-top: 1px solid var(--line-2); }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line-2); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.setting-row:hover { background: rgba(46, 75, 224, .03); }
.setting-row .s-copy { min-width: 0; flex: 1; }
.setting-row .s-title { font-size: 12.5px; font-weight: 550; }
.setting-row .s-desc { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.setting-row .s-value { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.setting-row .chev { color: var(--faint); }
.settings-back { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); margin-bottom: 14px; border: 0; background: none; padding: 0; }
.settings-back:hover { color: var(--ink); }
.settings-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.settings-sub { font-size: 12px; color: var(--muted); margin-bottom: 22px; }

.row-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.row-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.row-item:last-child { border-bottom: 0; }
.row-item .main-copy { flex: 1; min-width: 0; }
.row-item .title { font-size: 12px; font-weight: 550; }
.row-item .desc { font-size: 10.5px; color: var(--muted); }
.row-item .end { display: flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ */
/* Modal                                                               */
/* ------------------------------------------------------------------ */

.modal-wrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-wrap.align-right { justify-content: flex-end; padding: 0; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19, 21, 43, .34); opacity: 0; transition: opacity .16s; backdrop-filter: blur(1.5px); }
.modal-wrap.in .modal-backdrop { opacity: 1; }
.modal { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(19, 21, 43, .22); width: 100%; max-width: 480px; max-height: 86vh; display: flex; flex-direction: column; opacity: 0; transform: translateY(6px) scale(.99); transition: opacity .16s, transform .16s; }
.modal-wrap.in .modal { opacity: 1; transform: none; }
.modal-lg { max-width: 620px; }
.modal-sm { max-width: 380px; }
.modal-sheet { max-width: 430px; height: 100vh; max-height: 100vh; border-radius: 0; border-right: 0; }
.modal-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { font-size: 14px; font-weight: 600; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.modal-body .field + .field { margin-top: 12px; }
.confirm-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

.menu { position: absolute; z-index: 95; min-width: 218px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(19, 21, 43, .16); padding: 5px; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; background: none; border-radius: 6px; font-size: 12px; text-align: left; color: var(--ink-2); }
.menu-item:hover { background: var(--panel-2); color: var(--ink); }
.menu-item.active { color: var(--green); font-weight: 550; }
.menu-item .m-sub { font-size: 10px; color: var(--muted); }
.menu-item .check { margin-left: auto; color: var(--accent); }
.menu-sep { height: 1px; background: var(--line-2); margin: 5px 0; }
.menu-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 6px 8px 3px; }

/* ------------------------------------------------------------------ */
/* Toasts                                                              */
/* ------------------------------------------------------------------ */

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 7px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; background: #13152B; color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; max-width: 92vw; }
.toast.in { opacity: 1; transform: none; }
.toast .ic { color: #FFDD6B; }
.toast-error .ic { color: #ffb4ac; }
[data-theme="dark"] .toast { background: #ECEBF5; color: #13152B; }
[data-theme="dark"] .toast .ic { color: #2E4BE0; }

/* ------------------------------------------------------------------ */
/* Partner surface                                                     */
/* ------------------------------------------------------------------ */

.p-shell { min-height: 100vh; background: #F6F2EA; }
.p-topbar { background: #13152B; color: #E8ECFC; border-bottom: 1px solid #2A2D45; }
.p-topbar-in { max-width: 1140px; margin: 0 auto; padding: 0 26px; height: 54px; display: flex; align-items: center; gap: 14px; }
.p-brand { font-weight: 800; text-transform: none; font-family: var(--serif); font-size: 19px; letter-spacing: -.01em; color: #FFFFFF; display: flex; align-items: baseline; gap: 7px; }
.p-brand .p-mark { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: #C9D2F7; font-family: var(--sans); font-weight: 600; }
.p-user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: #DDE3FC; }
.p-user .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #E8ECFC; height: 30px; }
.p-user .btn:hover { background: rgba(255, 255, 255, .14); }
.p-nav { background: #13152B; border-bottom: 1px solid #2A2D45; }
.p-nav-in { max-width: 1140px; margin: 0 auto; padding: 0 26px; display: flex; gap: 22px; }
.p-tab { border: 0; background: none; color: #C9D2F7; font-size: 12px; padding: 9px 0 10px; border-bottom: 2px solid transparent; }
.p-tab:hover { color: #E8ECFC; }
.p-tab.active { color: #fff; border-bottom-color: #c8e8a8; }
.p-content { max-width: 1140px; margin: 0 auto; padding: 30px 26px 80px; }
.p-h1 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.p-sub { font-size: 12px; color: #6f7f77; margin-top: 3px; }
.p-hero { background: radial-gradient(120% 160% at 12% 0%, #2E4BE0 0%, #1F37B8 46%, #13152B 100%); border-radius: 12px; color: #FFFFFF; padding: 22px 26px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin: 16px 0 14px; box-shadow: 0 4px 18px rgba(19, 21, 43, .18); }
.p-hero .k { font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: #C9D2F7; }
.p-hero .big { font-size: 38px; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; }
.p-hero .big span { font-size: 14px; font-weight: 400; color: #DDE3FC; letter-spacing: 0; }
.p-hero .hero-stats { display: flex; gap: 26px; margin-top: 18px; }
.p-hero .hero-stats b { display: block; font-size: 13px; font-weight: 600; }
.p-hero .hero-stats span { font-size: 9.5px; color: #C9D2F7; }
.p-hero .hero-right { border-left: 1px solid rgba(255, 255, 255, .12); padding-left: 18px; }
.p-hero .hero-right .row { font-size: 10.5px; color: #DDE3FC; margin-top: 12px; }
.p-hero .hero-right .row b { display: block; font-size: 15px; color: #FFFFFF; margin-top: 2px; font-weight: 600; }
.p-pipeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.p-pipe-card { background: #fff; border: 1px solid #E2DCCF; border-radius: 10px; padding: 13px 15px; }
.p-pipe-card .l { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #8b948d; }
.p-pipe-card .v { font-size: 18px; font-weight: 600; margin-top: 5px; letter-spacing: -.02em; }
.p-pipe-card .d { font-size: 10px; color: #8b948d; margin-top: 2px; }
.p-pipe-card.stack { background: #fbf7e9; border-color: #eee2bb; }
.p-pipe-card.paid { background: #edf5ee; border-color: #d3e6d7; }
.p-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p-card { background: #fff; border: 1px solid #E2DCCF; border-radius: 10px; padding: 15px 17px; }
.p-card h3 { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.p-card .hint { font-size: 10.5px; color: #8b948d; line-height: 1.5; }
.p-card .field { margin-top: 11px; }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #9aa29c; text-align: left; padding: 8px 10px; border-bottom: 1px solid #ecece5; font-weight: 500; }
.p-table td { font-size: 11.5px; padding: 9px 10px; border-bottom: 1px solid #f1f1ea; color: #48514b; }
.p-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.p-table tbody tr:hover { background: #FBF9F4; }
.p-empty { text-align: center; padding: 38px 16px; color: #8b948d; }
.p-empty h4 { font-size: 12px; color: #46504a; font-weight: 600; margin-bottom: 4px; }
.p-empty p { font-size: 10.5px; line-height: 1.55; max-width: 330px; margin: 0 auto; }
.p-link-bar { display: flex; align-items: center; gap: 8px; background: #f7f7f1; border: 1px solid #e7e7de; border-radius: 7px; padding: 7px 9px; font-size: 10.5px; color: #6d776f; }
.p-link-bar code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: #46504a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.p-switch-menu { position: absolute; right: 26px; top: 46px; }

/* ------------------------------------------------------------------ */
/* CPA surface                                                         */
/* ------------------------------------------------------------------ */

.cpa-shell { display: flex; min-height: 100vh; background: #fbfbf9; }
.cpa-main { flex: 1; min-width: 0; }
.cpa-topbar { height: 54px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 26px; background: var(--panel); position: sticky; top: 0; z-index: 10; }
.cpa-topbar .h { font-size: 13px; font-weight: 600; }
.cpa-body { max-width: 1060px; margin: 0 auto; padding: 26px 30px 80px; }
.tile-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.tile .t-label { font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.tile .t-value { font-size: 19px; font-weight: 600; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cpa-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; }
.cpa-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.cpa-card h3 { font-size: 11.5px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.cpa-card h3 .link { font-size: 10.5px; color: var(--accent); }
.cpa-task { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.cpa-task:last-child { border-bottom: 0; }
.cpa-task .tick { width: 15px; height: 15px; border: 1px solid #cfd4d0; border-radius: 4px; background: var(--panel); display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.cpa-task .tick.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cpa-task .t-title { font-size: 11.5px; font-weight: 500; }
.cpa-task.done .t-title { text-decoration: line-through; color: var(--faint); }
.cpa-task .t-meta { font-size: 10px; color: var(--muted); margin-top: 1px; }
.cpa-task .prio { width: 5px; height: 5px; border-radius: 50%; margin-top: 6px; flex: none; }
.workflow-row { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.workflow-row:last-child { border-bottom: 0; }
.workflow-row .w-top { display: flex; align-items: center; gap: 9px; }
.workflow-row .w-icon { width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.workflow-row .w-name { font-size: 12px; font-weight: 550; }
.workflow-row .w-desc { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.workflow-row .w-meta { font-size: 9.5px; color: var(--faint); margin-left: auto; text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Admin surface                                                       */
/* ------------------------------------------------------------------ */

.a-shell { display: flex; min-height: 100vh; background: #f7f7f4; }
.side.dark { background: #13152B; border-right-color: #2A2D45; color: #C9CBDD; }
.side.dark .brand { color: #F6F2EA; }
.side.dark .ws-switch:hover { background: rgba(255, 255, 255, .06); }
.side.dark .ws-switch .ws-tag { color: #7f8a82; }
.side.dark .nav-item { color: #a5b0a8; }
.side.dark .nav-item .ic { color: #6e7a72; }
.side.dark .nav-item:hover { background: rgba(255, 255, 255, .05); color: #F6F2EA; }
.side.dark .nav-item.active { background: #232848; color: #E8ECFC; }
.side.dark .nav-item.active .ic { color: #FFDD6B; }
.side.dark .nav-group { color: #5f6b63; }
.side.dark .credits { border-top-color: #242a26; }
.side.dark .credits-row { color: #7f8a82; }
.side.dark .credits-row b { color: #C9CBDD; }
.side.dark .credit-bar { background: #2A2D45; }
.side.dark .profile-row { border-top-color: #242a26; }
.side.dark .profile-row .p-mail { color: #79857d; }
.side.dark .icon-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.a-content { max-width: 1120px; padding: 30px 36px 80px; }
.a-table { width: 100%; border-collapse: collapse; background: var(--panel); }
.a-table th { font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); text-align: left; font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table td { font-size: 11.5px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: middle; }
.a-table tr:hover td { background: var(--panel-2); }
.a-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.a-table .org-name { font-weight: 550; color: var(--ink); }
.a-table .org-mail { font-size: 10px; color: var(--muted); }
.a-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0 10px; }
.a-filters .search { min-width: 260px; }
.a-filters .select { width: auto; height: 30px; font-size: 11.5px; }
.a-count { font-size: 10.5px; color: var(--faint); margin-left: auto; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; background: #c3c8c5; }
.status-dot.green { background: #2ea36f; }
.status-dot.amber { background: #d9a441; }
.status-dot.red { background: #d0574b; }

/* ------------------------------------------------------------------ */
/* Misc                                                                */
/* ------------------------------------------------------------------ */

.empty { text-align: center; padding: 48px 24px; }
.empty-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.empty h3 { font-size: 13px; font-weight: 600; }
.empty p { font-size: 11.5px; color: var(--muted); margin: 4px auto 0; max-width: 340px; line-height: 1.55; }

.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-top { display: flex; align-items: flex-start; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.fade-in { animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.scroll-x { overflow-x: auto; }

.impersonation {
  display: flex; align-items: center; gap: 7px; padding: 7px 44px; font-size: 11px;
  background: var(--amber-soft); color: var(--amber); border-bottom: 1px solid #f0dfbc;
}
.impersonation b { font-weight: 600; }
.impersonation button {
  margin-left: auto; border: 0; background: none; color: inherit; text-decoration: underline;
  font-size: 10.5px; padding: 0;
}

.live-strip {
  display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 8px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  font-size: 11px; color: var(--muted);
}
.live-strip .live-dot { width: 6px; height: 6px; border-radius: 50%; background: #2ea36f; box-shadow: 0 0 0 3px rgba(46, 163, 111, .14); }
.live-strip button { margin-left: auto; border: 0; background: none; color: var(--accent); font-size: 11px; font-weight: 550; padding: 0; }

.spin .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* responsive */
@media (max-width: 1080px) {
  .content { padding: 28px 28px 80px; }
  .accounts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cpa-grid, .p-grid-2 { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .side { width: 210px; }
  .content { padding: 22px 18px 80px; }
  .report-grid { grid-template-columns: 1fr; }
  .p-hero { grid-template-columns: 1fr; }
  .p-hero .hero-right { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-left: 0; padding-top: 12px; }
  .p-topbar-in, .p-nav-in, .p-content { padding-left: 16px; padding-right: 16px; }
  .p-pipeline { grid-template-columns: 1fr; }
  .a-content { padding: 22px 18px 80px; }
}
@media (max-width: 680px) {
  .app { flex-direction: column; }
  .side { width: 100%; min-height: auto; max-height: none; position: static; flex-direction: row; align-items: center; padding: 10px 12px; overflow-x: auto; }
  .side-top { padding: 0 8px 0 0; }
  .brand { padding-bottom: 0; font-size: 20px; }
  .ws-switch { display: none; }
  .side-nav { flex-direction: row; padding: 0; }
  .nav-item { padding: 7px 8px; }
  .nav-item span:not(.nav-badge):not(.nav-dot) { display: none; }
  .side-foot, .nav-group { display: none; }
  .accounts-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .cat-picker { grid-template-columns: 1fr; }
  .tile-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ */
/* Sign-in: method divider and email block                             */
/* ------------------------------------------------------------------ */

.or-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 14px; color: var(--faint); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.or-divider::before, .or-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.magic-block .field { margin-bottom: 0; }
.magic-block input.input { letter-spacing: 0; }
.magic-block #magicCode { letter-spacing: .28em; font-variant-numeric: tabular-nums; }
