/* Donut Cash workspace. Visual tokens are shared by every page and live chart.
   style.css supplies the existing operational components and their structure. */
@font-face { font-family: 'Workspace Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Workspace Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Workspace Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Workspace Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101112; --surface: #17191b; --surface-2: #1d2023; --surface-3: #262a2e;
  --text: #eff1f3; --text-2: #b4b8bf; --text-3: #8d949d;
  --line: #2b2e32; --line-soft: #24272b; --line-2: #34383e;
  --accent: #57cdc0; --accent-2: #8ea6b5; --accent-ink: #102522;
  --accent-dim: #57cdc012; --accent-line: #57cdc03b;
  --good: #7ac7a5; --good-dim: #7ac7a518; --warn: #dfb56f; --warn-dim: #dfb56f18;
  --bad: #e28c8c; --bad-dim: #e28c8c18; --info: #9eb3c9; --info-dim: #9eb3c918;
  --panel: var(--surface); --panel-2: var(--surface-2); --elevated: var(--surface-3);
  --muted: var(--text-3); --faint: var(--text-3); --border: var(--line);
  --primary: var(--accent); --primary-2: var(--accent); --primary-soft: var(--accent-dim);
  --accent-soft: var(--accent-dim); --primary-glow: transparent; --accent-glow: transparent;
  --ok: var(--good); --danger: var(--bad); --green: var(--accent); --red: var(--bad); --amber: var(--warn); --cyan-bright: var(--accent);
  --grad: var(--accent); --hover: var(--surface-2); --glass: var(--surface); --glass-2: var(--surface);
  --glass-hi: transparent; --glass-blur: none; --blur: none; --wash: transparent; --sky: none;
  --shadow: 0 8px 28px #00000014; --shadow-sm: 0 2px 8px #0000000a; --shadow-g: var(--shadow);
  --lift-1: var(--shadow-sm); --lift-2: 0 16px 45px #00000040; --lift-3: 0 24px 80px #00000055;
  --sans: 'Workspace Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 16px;
  --radius: var(--r); --radius-sm: var(--r-sm); --radius-xs: var(--r-xs);
  --sidebar-w: 244px; --topbar-h: 88px;
  --s-4: 16px; --s-5: 22px; --s-6: 32px; --s-7: 32px;
  --grid-line: var(--line-soft); --auth-ground: #141718;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f5; --surface: #fff; --surface-2: #eef1f1; --surface-3: #e5e9e9;
  --text: #1c2425; --text-2: #4c585c; --text-3: #68767b;
  --line: #dce2e2; --line-soft: #e9eded; --line-2: #cbd5d5;
  --accent: #187c71; --accent-2: #5d788b; --accent-ink: #fff;
  --accent-dim: #187c7110; --accent-line: #187c7138;
  --good: #267454; --good-dim: #26745412; --warn: #936621; --warn-dim: #93662112;
  --bad: #b74b4b; --bad-dim: #b74b4b12; --info: #526f8b; --info-dim: #526f8b12;
  --panel: var(--surface); --panel-2: var(--surface-2); --elevated: var(--surface-3);
  --muted: var(--text-3); --faint: var(--text-3); --border: var(--line);
  --primary: var(--accent); --primary-2: var(--accent); --primary-soft: var(--accent-dim);
  --accent-soft: var(--accent-dim); --accent-glow: transparent; --primary-glow: transparent;
  --green: var(--accent); --red: var(--bad); --amber: var(--warn); --ok: var(--good); --danger: var(--bad);
  --glass: var(--surface); --glass-2: var(--surface); --glass-hi: transparent; --grad: var(--accent);
  --shadow: 0 8px 28px #172b2910; --shadow-sm: 0 2px 8px #172b2905; --shadow-g: var(--shadow);
  --lift-2: 0 16px 45px #172b2920; --lift-3: 0 24px 80px #172b2930;
  --sans: 'Workspace Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wash: transparent; --sky: none;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--sans); letter-spacing: -.015em; }
body::before, body::after, :root[data-theme="light"] body::before, :root[data-theme="light"] body::after,
#cursor-glow, :root[data-theme="light"] #cursor-glow, #grain, .ambient { display: none !important; }
button, input, select, textarea { font-family: var(--sans); }
button { -webkit-tap-highlight-color: transparent; }
button, a, input, textarea { touch-action: manipulation; }
::selection { background: var(--accent-line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -.04em; }
.app { min-height: 100dvh; background: radial-gradient(ellipse 900px 600px at 20% 0%, color-mix(in srgb, var(--accent) 3%, transparent), transparent 70%); }
.main-wrap { min-width: 0; position: relative; }
.sidebar, :root[data-theme="light"] .sidebar { width: var(--sidebar-w); height: 100dvh; position: sticky; top: 0; background: var(--surface); border-right: 1px solid var(--line); backdrop-filter: none; padding: 12px; overflow-y: auto; }
.brand { padding: 18px 10px 32px; gap: 12px; }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); box-shadow: none; filter: none; overflow: hidden; }
.brand-mark img { object-fit: contain; padding: 3px; }
.brand-name { font: 600 18px/1.35 var(--sans); letter-spacing: -.04em; font-style: normal; }
.brand-sub { font-size: 11px; letter-spacing: 0; color: var(--text-3); margin-top: 3px; }
.nav-list { padding: 0; gap: 5px; }
.nav-caption { color: var(--text-3); text-transform: uppercase; font: 500 10px/1.4 var(--sans); letter-spacing: .12em; padding: 0 14px 12px; }
.manage-caption { margin-top: 28px; }
.nav { position: relative; min-height: 45px; border: 1px solid transparent; border-radius: 10px; padding: 12px 14px; color: var(--text-3); font: 500 13px/1.3 var(--sans); gap: 12px; }
.nav svg { width: 19px; height: 19px; opacity: 1; }
.nav:hover { color: var(--text); background: var(--surface-2); }
.nav.active { color: var(--text); background: var(--surface-3); border-color: transparent; box-shadow: none; }
.nav.active::before { content: ''; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav.active svg { color: var(--accent); }
.nav-count { color: var(--warn); background: var(--warn-dim); }
.sidebar-bottom { padding: 24px 0 0; gap: 14px; }
.sys-widget { border: 1px solid var(--line); background: var(--bg); padding: 15px; border-radius: 12px; box-shadow: none; }
.sys-label { font-size: 11px; color: var(--text-2); }
.sys-foot { font-size: 10px; }
.sys-spark { height: 24px; margin-top: 12px; }
.profile { padding: 12px 8px; border-top: 1px solid var(--line); border-radius: 0; gap: 10px; }
.avatar { width: 36px; height: 36px; color: var(--accent); border: 1px solid var(--accent-line); background: var(--accent-dim); font-size: 12px; }
.profile-name { font-size: 12px; font-weight: 600; }
.profile-role { font-size: 10px; }
.profile-menu-wrap { position: relative; }
.profile-open { border: 0; background: none; padding: 0; width: 100%; color: inherit; text-align: left; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.profile-open > svg { width: 14px; height: 14px; margin-left: auto; color: var(--text-3); }
.profile-dropdown { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--lift-2); z-index: 45; }
.profile-dropdown button { display: block; width: 100%; padding: 12px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font-size: 12px; text-align: left; cursor: pointer; }
.profile-dropdown button:hover { color: var(--text); background: var(--surface-3); }
.topbar, :root[data-theme="light"] .topbar { min-height: var(--topbar-h); height: auto; position: sticky; padding: 22px 36px; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); gap: 16px; }
#page-title { font: 600 19px/1.3 var(--sans); letter-spacing: -.04em; }
#page-subtitle { font-size: 11px; color: var(--text-3); }
.topbar-actions { gap: 8px; min-width: 0; }
.icon-btn { width: 36px; height: 36px; border-color: transparent; background: transparent; color: var(--text-3); border-radius: 9px; box-shadow: none; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.search { height: 38px; width: 244px; flex: 0 1 244px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; padding: 0 11px; }
#global-search { font-size: 12px; background: transparent; border: 0; padding: 0; height: auto; box-shadow: none; min-width: 0; }
.search.focused { border-color: var(--accent-line); }
.kbd { background: transparent; font-size: 9px; padding: 1px 4px; }
.view { width: 100%; max-width: 1480px; margin: 0 auto; padding: 36px 44px 44px; }
.view.active { animation: workspace-enter .25s ease-out; }
.view > .section, .view > .health-strip, .view > .alert-banner { max-width: none; }
.section { margin-bottom: 28px; }
.section-head { align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font: 600 15px/1.4 var(--sans); letter-spacing: -.03em; }
.section-head h2::before, .section-head h2::after { display: none; }
.section-meta { font-size: 11px; font-weight: 400; letter-spacing: 0; }
.eyebrow { font: 500 10px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.overview-heading, .workspace-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 26px; }
.overview-heading h2, .workspace-page-heading h2 { font: 600 30px/1.3 var(--sans); letter-spacing: -.055em; margin: 7px 0; }
.overview-heading p, .workspace-page-heading p { color: var(--text-3); font-size: 12px; margin: 0; }
.overview-actions { display: flex; align-items: center; gap: 10px; }
.date-pill { color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.date-pill svg { width: 14px; height: 14px; }
.health-strip { padding: 11px 0; border: 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: none; border-radius: 0; box-shadow: none; gap: 22px; margin-bottom: 26px; }
.hs-name { font: 500 11px var(--sans); text-transform: none; letter-spacing: 0; color: var(--text-2); }
.hs-state { font-size: 10px; color: var(--text-3); }
.hs-updated { font-size: 10px; }
.dot { width: 6px; height: 6px; }
.dot.danger { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-dim); }

.card, .kpi, .liq-card, .mkt, .table-card, .settings-group, .wallet-row, .deposit-row, .review-card,
:root[data-theme="light"] .card, :root[data-theme="light"] .liq-card, :root[data-theme="light"] .chart-card,
:root[data-theme="light"] .table-card, :root[data-theme="light"] .settings-group {
  background: var(--surface); background-image: none; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); backdrop-filter: none; -webkit-backdrop-filter: none;
}
.card:hover, .kpi:hover, .liq-card:hover, .mkt:hover, .wallet-row:hover, .chart-card:hover, .table-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.card { padding: 22px; }
.card-title { font: 600 14px/1.4 var(--sans); color: var(--text); letter-spacing: -.02em; }
.card-sub, .hint { color: var(--text-3); font-size: 11px; line-height: 1.65; }
.card-head { font-size: 14px; padding-bottom: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 20px; min-height: 146px; position: relative; }
.kpi-label { font: 400 11px/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--text-3); gap: 8px; }
.kpi-label svg { background: var(--surface-2); color: var(--text-3); width: 14px; height: 14px; padding: 7px; border-radius: 9px; }
.kpi-value { font: 600 31px/1.15 var(--sans); letter-spacing: -.055em; margin-top: 17px; color: var(--text); }
.kpi-foot { margin-top: 9px; font-size: 10px; flex-wrap: wrap; }
.delta { font-size: 10px; font-weight: 500; }
.kpi-trace { position: absolute; right: 20px; top: 24px; width: 60px; height: 25px; color: var(--accent); }
.kpi:nth-child(3) .kpi-trace { color: var(--bad); }.kpi:nth-child(3) .delta.down { color: var(--good); }.kpi:nth-child(3) .delta.up { color: var(--bad); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 18px; align-items: stretch; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel-heading h2 { font: 600 15px/1.4 var(--sans); margin: 0; letter-spacing: -.035em; }
.panel-heading p { font-size: 11px; color: var(--text-3); margin: 4px 0 0; }
.performance-panel { padding: 22px; min-width: 0; }
.performance-panel .chart-card { padding: 0; border: 0; box-shadow: none; background: none; margin: 23px -2px 8px; border-radius: 0; }
.chart-holder { min-width: 0; height: 250px; }
#activity-chart { width: 100%; height: 250px; display: block; }
.chart-legend { display: flex; align-items: center; gap: 20px; font-size: 10px; color: var(--text-3); margin-top: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 50%; }
.legend-completed { background: var(--accent); }.legend-failed { background: var(--bad); }
.chart-legend .chart-period { margin-left: auto; }
.chart-tip { background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--lift-2); font-size: 11px; border-radius: 10px; }
.activity-panel { display: flex; flex-direction: column; padding: 22px 22px 0; min-width: 0; overflow: hidden; }
.live-tag { font-size: 9px; color: var(--good); display: inline-flex; align-items: center; gap: 5px; }
.live-tag i, .auth-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--good); }
.activity-list { flex: 1; padding: 14px 0; }
.activity-entry { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line-soft); background: none; color: var(--text); text-align: left; cursor: pointer; }
.activity-entry:last-child { border-bottom: 0; }
.activity-entry:hover .activity-order { color: var(--accent); }
.activity-event-icon { width: 31px; height: 31px; flex: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); border-radius: 10px; display: grid; place-items: center; font-size: 14px; }
.activity-event-text { flex: 1; min-width: 0; }
.activity-order { font-size: 11px; font-weight: 500; transition: color .15s; }
.activity-event-text small { display: block; color: var(--text-3); font-size: 10px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-event-value { font-size: 11px; font-variant-numeric: tabular-nums; flex: none; }
.activity-footer { display: flex; justify-content: space-between; padding: 15px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text-2); cursor: pointer; font-size: 11px; }
.activity-footer:hover { color: var(--accent); }
.workspace-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shortcut { display: flex; align-items: center; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-align: left; cursor: pointer; }
.shortcut:hover { background: var(--surface-2); border-color: var(--line-2); }
.shortcut-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); font-size: 18px; flex: none; }
.shortcut strong { display: block; font-size: 11px; font-weight: 500; }.shortcut small { display: block; font-size: 10px; color: var(--text-3); margin-top: 4px; }
.shortcut-arrow { margin-left: auto; color: var(--text-3); }
.workspace-page-heading .page-index { font: 400 11px var(--mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; }

.btn { min-height: 36px; padding: 9px 14px; font: 500 11px/1.3 var(--sans); border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; gap: 8px; }
.btn:hover { background: var(--surface-3); border-color: var(--line-2); box-shadow: none; }
.btn.primary, :root[data-theme="light"] .btn.primary { color: var(--accent-ink); background: var(--accent); border-color: transparent; box-shadow: none; }
.btn.primary:hover { background: var(--accent); color: var(--accent-ink); filter: brightness(1.08); box-shadow: none; opacity: 1; }
.btn.danger { background: var(--bad-dim); color: var(--bad); border-color: transparent; box-shadow: none; }
.btn.danger:hover { background: var(--bad-dim); border-color: var(--bad); }
.btn.resume { background: var(--good-dim); color: var(--good); border-color: var(--good-dim); box-shadow: none; }
.btn.ghost, .btn.sm.ghost { color: var(--text-3); background: none; border-color: transparent; box-shadow: none; }
.btn.sm { font-size: 10px; min-height: 30px; padding: 6px 11px; }
.link-btn { color: var(--text-2); font-size: 11px; }
.chip, .pill, .type-badge { border-radius: 7px; font-size: 10px; letter-spacing: 0; font-weight: 500; box-shadow: none; }
.chip { min-height: 30px; background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
.chip:hover, .chip.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-line); }
.type-badge { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); padding: 3px 8px; }
.badge { border-radius: 6px; font-size: 9px; font-weight: 500; padding: 4px 7px; letter-spacing: 0; box-shadow: none; }
.badge.completed, .badge.ok { background: var(--good-dim); color: var(--good); }
.badge.warn { background: var(--warn-dim); color: var(--warn); }
.badge.failed, .badge.danger { background: var(--bad-dim); color: var(--bad); }
input:where(:not([type=checkbox]):not([type=radio]):not([type=range])), textarea, select, .sel-btn {
  min-height: 38px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 12px; padding: 9px 12px; box-shadow: none;
}
input:focus, textarea:focus, select:focus, .sel-btn:focus { border-color: var(--accent); box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: .8; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.field > span, .field > label, .form-row label { color: var(--text-2); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.sel-btn { min-height: 34px; background: var(--surface); font-size: 10px; padding: 8px 10px; }
.sel-menu { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--lift-2); padding: 5px; }
.sel-opt { color: var(--text-2); font-size: 11px; border-radius: 6px; min-height: 34px; }
.sel-opt:hover, .sel-opt.current { background: var(--surface-3); color: var(--accent); }
.toolbar-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0; margin-bottom: 16px; }
#workspace-order-filter, #workspace-audit-filter { flex: 1 1 200px; max-width: 340px; min-width: 0; font-size: 11px; }
.table-card { padding: 0; overflow: hidden; }
table { font: 400 11px/1.5 var(--sans); }
thead th, :root[data-theme="light"] thead th { background: var(--surface-2); color: var(--text-3); font: 500 9px/1.4 var(--sans); letter-spacing: .06em; padding: 14px 18px; border-color: var(--line); }
tbody td { padding: 15px 18px; color: var(--text-2); border-color: var(--line-soft); }
tbody tr.clickable:hover td { background: var(--surface-2); }
td.mono, td .mono { font-size: 10px; color: var(--text-2); }
.empty, .empty-row td { padding: 30px 18px; color: var(--text-3); font-size: 11px; }
[hidden] { display: none !important; }
.filtered-empty { text-align: center; padding: 24px; color: var(--text-3); font-size: 11px; }
.figure-row { padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figure { padding: 22px; }
.figure-label, .avail-label { color: var(--text-3); font-size: 11px; text-transform: none; letter-spacing: 0; }
.figure-value { font: 600 25px/1.25 var(--sans); letter-spacing: -.04em; margin: 14px 0; }
.liq-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.liq-card { padding: 20px; border-left-width: 1px; }
.liq-name { font-size: 11px; color: var(--text-3); }.liq-top .coin { width: 24px; height: 24px; }
.liq-value, .liq-value.blue, .liq-value.purple, .liq-value.cyan { color: var(--text); font: 600 25px/1.3 var(--sans); letter-spacing: -.04em; }
.liq-usd { font-size: 10px; margin: 5px 0 16px; }.meter { background: var(--surface-3); height: 4px; }.meter > i { background: var(--accent); }
.meter > i.low { background: var(--bad); }.meter > i.mid { background: var(--warn); }.meter-legend { font-size: 9px; margin-top: 7px; }
.mkt { display: flex; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; gap: 20px; padding: 20px; border-left-width: 1px; }.mkt.closed { border-left-color: var(--line); background: var(--surface); }
.mkt-name { font-size: 13px; }.mkt-sub, .route-sub { color: var(--text-3); font-size: 10px; }
.sw input:checked ~ .sw-track { background: var(--accent); border-color: var(--accent); }.sw input:checked ~ .sw-thumb { background: var(--accent-ink); }
.sw-track { background: var(--surface-3); border-color: var(--line-2); }
.sw { width: 42px; height: 24px; }.sw input { z-index: 2; }
.wallet-row, .deposit-row { border-left-width: 1px; padding: 14px; background: var(--bg); }
.wallet-mode, .avail-row, .restock-notify-row, .mc-sweep { border-color: var(--line); background: var(--bg); border-radius: 9px; }
.restock-card { padding: 22px; align-self: start; }.wallet-feed { background: none; }.feed-head { color: var(--text-2); font-size: 11px; }
.wallet-addr code, .deposit-address code { color: var(--text-2); }
.rn-name { font-size: 11px; color: var(--text-2); }.rn-sub { font-size: 10px; color: var(--text-3); }
.wf-row { border-color: var(--line-soft); padding: 12px 0; font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings-group { padding: 24px; }.settings-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.settings-guide { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--surface); }
.settings-guide h3 { margin: 0 0 10px; font-size: 15px; }.settings-guide p { margin: 0 0 20px; color: var(--text-3); font-size: 12px; line-height: 1.8; }
.settings-guide dl { margin: 0; font-size: 11px; }.settings-guide dt { color: var(--text-2); font-weight: 500; margin-top: 16px; }.settings-guide dd { margin: 5px 0 0; color: var(--text-3); line-height: 1.7; }
.settings-guide .guide-footer { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 22px; font-size: 10px; color: var(--text-3); }
.settings-fields .field > span { font-size: 11px; }.settings-fields input, .settings-fields .sel-btn { height: 40px; }
.save-bar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; padding: 15px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; margin-top: 20px; box-shadow: var(--shadow); }
.subnav { display: inline-flex; flex-wrap: wrap; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: var(--surface); margin-bottom: 26px; }
.subnav-btn { border: 0; border-radius: 7px; background: none; color: var(--text-3); font: 500 11px var(--sans); padding: 10px 18px; box-shadow: none; }
.subnav-btn.active { background: var(--surface-3); color: var(--text); box-shadow: none; }.subnav-btn:hover { color: var(--text); }
#view-accounts { max-width: 1480px; }#view-accounts > .card { margin-bottom: 18px; }
.acct-row { padding: 17px 0; border-bottom-color: var(--line-soft); }.acct-ign { font-size: 12px; }
.form-row { gap: 14px; align-items: end; }.form-row label { min-width: 110px; }.form-row input { width: 100%; }
.signin-box { background: var(--bg); border-color: var(--line); border-radius: 10px; }
.mc-log { background: var(--bg); border-color: var(--line); border-radius: 10px; font-size: 11px; }
.mc-row { margin-top: 14px; gap: 10px; }.mc-sweep { margin-top: 14px; padding: 12px; }
#view-console .workspace-page-heading h2 { font-size: 28px; letter-spacing: 0; }
#view-console .section-head { flex-wrap: wrap; }
#view-console .section-head h2 { letter-spacing: 0; }
#view-console .section-head .sel { min-width: 0; max-width: 100%; }
#view-console #mc-status { flex-basis: 100%; margin-left: 0 !important; overflow-wrap: anywhere; }
#view-console .card, #view-console .mc-log, #view-console .mc-sweep { border-radius: 8px; }
#view-console .mc-log { height: 360px; max-height: 45dvh; font-size: 13px; }
.alert-banner { border: 1px solid var(--warn); background: var(--warn-dim); border-radius: 12px; color: var(--warn); }
.review-card { padding: 20px; margin-bottom: 12px; }.review-actions { gap: 8px; }
.kv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.notif-panel, .search-results, .modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--lift-2); backdrop-filter: none; }
.notif-head { font-size: 12px; padding: 16px; }.notif-panel { right: 36px; }.ni-title { font-size: 11px; }.ni-sub { font-size: 10px; }
.badge-dot { color: var(--accent-ink); background: var(--accent); }
.modal-root, :root[data-theme="light"] .modal-root { position: fixed; background: #07090bb0; backdrop-filter: blur(5px); }
.modal { padding: 26px; }.modal-title { font-size: 19px; letter-spacing: -.04em; }.modal-body { color: var(--text-2); font-size: 12px; }
.toast { border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); box-shadow: var(--lift-2); font-size: 12px; }.toast-stack { position: fixed; }

.skeleton-line, .skeleton-number { background: var(--surface-3); border-radius: 5px; height: 12px; width: 70%; }.skeleton-number { height: 30px; width: 35%; margin: 24px 0 14px; }.skeleton-line.short { width: 45%; height: 9px; }.skeleton { animation: workspace-pulse 1.4s ease-in-out infinite; }
@keyframes workspace-pulse { 50% { opacity: .55; } }@keyframes workspace-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Authentication shares the same type, surfaces, and controls. */
.login-body { display: block; min-height: 100dvh; background: var(--bg); padding: 0; }
.auth-layout { display: grid; grid-template-columns: 1.1fr 1fr; width: 100%; max-width: none; min-height: 100dvh; justify-self: stretch; }
.auth-story { display: flex; flex-direction: column; padding: 40px 48px 26px; background: var(--auth-ground); border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.auth-story::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 20% 40%, var(--accent-dim), transparent 65%); }
.auth-wordmark { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: -.04em; text-decoration: none; position: relative; }
.auth-wordmark img { width: 36px; height: 36px; object-fit: contain; }.auth-wordmark > span { font-size: 9px; color: var(--text-3); font-weight: 400; letter-spacing: .12em; margin-left: auto; }
.auth-story-content { position: relative; width: 100%; max-width: 500px; margin: auto; padding: 68px 0; }.auth-story-content > .eyebrow { color: var(--accent); font-size: 10px; }
.auth-story-content h1 { font: 500 clamp(30px, 3.3vw, 48px)/1.16 var(--sans); letter-spacing: -.065em; margin: 22px 0; }.auth-story-content h1 span { color: var(--text-3); }
.auth-story-content > p { color: var(--text-3); font-size: 14px; line-height: 1.8; }
.auth-illustration { margin-top: 42px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); box-shadow: 0 20px 50px #00000020; transform: perspective(1000px) rotateY(-6deg) rotateX(3deg); }
.illustration-top { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 9px; letter-spacing: 0; }.illustration-dots { display: flex; gap: 4px; }.illustration-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.illustration-body { display: flex; }.illustration-rail { width: 50px; border-right: 1px solid var(--line); padding: 18px 13px; display: flex; flex-direction: column; gap: 16px; }.illustration-rail i { width: 22px; height: 5px; background: var(--surface-3); border-radius: 2px; }.illustration-rail i:first-child { background: var(--accent); }
.illustration-content { flex: 1; padding: 20px; min-width: 0; }.illustration-cards { display: flex; gap: 10px; margin-bottom: 20px; }.illustration-cards i { flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 5px; background: linear-gradient(90deg, var(--surface-2), var(--surface)); }.illustration-content svg { display: block; width: 100%; height: auto; color: var(--accent); }.illustration-grid { stroke: var(--line); stroke-width: 1; }.illustration-rows { display: flex; flex-direction: column; gap: 9px; margin-top: 17px; }.illustration-rows i { height: 5px; width: 100%; border-radius: 2px; background: var(--surface-2); }.illustration-rows i:last-child { width: 66%; }
.auth-story-footer { display: flex; justify-content: space-between; gap: 20px; font-size: 9px; color: var(--text-3); position: relative; }.auth-status { display: flex; align-items: center; gap: 7px; }
.auth-form-wrap { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 370px; padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; border-radius: 0; }
.login-brand { display: none; }.auth-heading { margin-bottom: 34px; }.auth-heading h2 { font: 600 30px/1.25 var(--sans); letter-spacing: -.05em; margin: 12px 0; }.auth-heading p { color: var(--text-3); font-size: 12px; margin: 0; }
.login-card .field { margin-bottom: 22px; gap: 8px; }.login-card .field > label { font-size: 12px; }.login-card input { background: var(--surface); min-height: 46px; font-size: 13px; width: 100%; }
.login-card .btn.full { margin-top: 10px; min-height: 46px; width: 100%; font-size: 12px; }.login-card .subtitle { font-size: 12px; color: var(--text-3); }.error-box { background: var(--bad-dim); border: 1px solid var(--bad); color: var(--bad); border-radius: 9px; font-size: 12px; }
.auth-note { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 10px; margin: 30px 0 0; }.auth-note svg { width: 13px; height: 13px; }

@media (min-width: 861px) { .menu-btn, .sidebar-close { display: none; } }
@media (max-width: 1200px) {
  :root { --sidebar-w: 220px; }.topbar { padding: 20px 28px; }.view { padding: 28px; }.search { width: 180px; flex-basis: 180px; }
  .overview-heading h2 { font-size: 27px; }.date-pill { display: none; }.kpi { padding: 17px; }.kpi-label { font-size: 10px; }.kpi-trace { right: 16px; width: 40px; }.overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); }
  .shortcut { padding: 15px; }.shortcut small { font-size: 9px; }.topbar-actions { gap: 4px; }.auth-story { padding: 32px; }
}
@media (max-width: 1000px) {
  .search { width: 160px; flex-basis: 160px; }.topbar-title p { max-width: 200px; }.overview-grid { grid-template-columns: minmax(0, 1fr); }.activity-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }.activity-entry { padding: 15px 0; }
  .workspace-shortcuts { gap: 10px; }.shortcut-icon { display: none; }.settings-grid { grid-template-columns: 1fr; }.auth-wordmark > span { display: none; }
}
@media (max-width: 860px) {
  :root { --topbar-h: 76px; }.app { display: block; overflow-x: clip; }.sidebar, :root[data-theme="light"] .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; height: 100dvh; transform: translateX(-100%); transition: transform .2s ease; z-index: 100; background: var(--surface); }.sidebar.open { transform: translateX(0); }.backdrop.open { position: fixed; inset: 0; z-index: 90; background: #07090bb0; backdrop-filter: blur(3px); }
  .menu-btn, .sidebar-close { display: grid; }.sidebar-close { margin-left: auto; }.topbar { padding: 16px 20px; flex-wrap: nowrap; gap: 12px; }.topbar-title { flex: 1; }#page-title { font-size: 16px; }#page-subtitle { font-size: 10px; max-width: 210px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.topbar-actions { margin-left: auto; }.search { width: 170px; flex-basis: 170px; }.topbar .btn.danger, .topbar .btn.resume { width: 36px; height: 36px; padding: 8px; }.topbar .btn.danger span, .topbar .btn.resume span { display: none; }.topbar .btn.danger svg, .topbar .btn.resume svg { display: block; width: 16px; height: 16px; }
  .view { padding: 26px 24px; width: 100%; max-width: 100%; }.overview-heading { margin-bottom: 24px; }.overview-heading h2, .workspace-page-heading h2 { font-size: 28px; }.health-strip { gap: 16px; }.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }.kpi-value { font-size: 29px; }.kpi-trace { display: none; }.overview-grid { grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 14px; }.performance-panel, .activity-panel { padding: 18px; }.activity-panel { padding-bottom: 0; }.activity-list { display: block; }.panel-heading h2 { font-size: 13px; }.panel-heading p { font-size: 10px; }.activity-event-value { font-size: 10px; }.activity-event-icon { width: 27px; height: 27px; }.activity-entry { gap: 8px; }
  .btn, .icon-btn, .sel-btn, .chip, .subnav-btn, .link-btn { min-height: 44px; }.icon-btn { width: 40px; }.nav { min-height: 46px; }.toolbar-row { gap: 8px; }.sel-opt { min-height: 44px; }.sw::before { content: ''; position: absolute; inset: -10px -4px; }.sw input { inset: -10px -4px; width: 50px; height: 44px; }.notif-panel { right: 20px; max-width: calc(100vw - 40px); }.btn.sm { min-height: 38px; }
  .auth-layout { grid-template-columns: 1fr 1fr; }.auth-story { padding: 28px; }.auth-story-content h1 { font-size: 32px; }.auth-form-wrap { padding: 28px; }.auth-story-footer { flex-wrap: wrap; }.auth-story-content > p { font-size: 12px; }
}
@media (max-width: 700px) {
  .search { display: none; }.topbar-actions { gap: 2px; }.topbar { padding: 12px 16px; }.view { padding: 24px 18px; }.overview-heading { align-items: start; }.overview-heading h2 { font-size: 25px; }.overview-heading p { max-width: 250px; font-size: 11px; }.eyebrow { font-size: 9px; }.overview-actions > .btn { font-size: 10px; padding: 10px; }.health-strip { gap: 12px; flex-wrap: wrap; }.hs-updated { width: 100%; margin: 0; }.hs-state { display: none; }.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }.kpi { min-height: 138px; padding: 18px; }.kpi-label { font-size: 11px; }.kpi-trace { display: block; width: 45px; right: 18px; }.overview-grid { grid-template-columns: 1fr; }.panel-heading h2 { font-size: 15px; }.activity-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }.activity-event-value { display: none; }.workspace-shortcuts { grid-template-columns: 1fr; gap: 10px; }.shortcut { padding: 16px; }.shortcut-icon { display: grid; }.shortcut small { font-size: 10px; }.section-head { flex-wrap: wrap; }.section-meta { font-size: 10px; }.grid-2, .liq-grid { grid-template-columns: 1fr; }.figure-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }.figure { border-bottom: 1px solid var(--line-soft); padding: 18px; }.figure-value { font-size: 23px; }.figure:nth-child(2) { border-right: 0; }.figure:nth-child(n+3) { border-bottom: 0; }.kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.settings-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }.workspace-page-heading h2 { font-size: 26px; }.workspace-page-heading .page-index { display: none; }.settings-group { padding: 20px; }.card { padding: 18px; }.table-card { padding: 0; }.table-scroll { max-width: 100%; }.mc-sweep { flex-wrap: wrap; }.section-head .section-meta { margin-left: 0; }.form-row label { flex: 1 1 180px; min-width: 0; }.form-row > .btn { width: 100%; }#view-accounts { max-width: 100%; }.restock-row { flex-wrap: wrap; }.restock-row input { min-width: 0; flex: 1 1 120px; }.restock-row .sel { max-width: 100%; }.restock-notify-row { gap: 14px; }.mc-row input { min-width: 0; }.chart-legend { font-size: 9px; gap: 14px; }tbody td { padding: 13px 14px; }thead th { padding: 12px 14px; }
  .auth-layout { display: flex; flex-direction: column; }.auth-story { padding: 24px; background: var(--bg); border: 0; }.auth-story-content, .auth-story-footer { display: none; }.auth-wordmark > span { display: block; }.auth-form-wrap { flex: 1; padding: 40px 28px 60px; }.auth-heading h2 { font-size: 30px; }.login-card { max-width: 380px; }.auth-note { margin-top: 28px; }
}
@media (max-width: 400px) {
  #page-subtitle { max-width: 150px; }.topbar-actions #btn-theme { display: none; }.overview-heading { flex-direction: column; gap: 16px; }.overview-actions { width: 100%; }.overview-actions > .btn { width: 100%; }.kpi-trace { display: none; }.activity-list { display: block; }.activity-event-value { display: block; }.settings-fields { grid-template-columns: 1fr; }.auth-wordmark > span { display: none; }.section-meta { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }*, *::before, *::after { animation: none !important; transition: none !important; }.auth-illustration { transform: none; } }
@media (max-width: 700px) {
  .recent-table, #view-orders .table-card table, #sub-audit table { display: block; width: 100%; }
  .recent-table thead, #view-orders .table-card thead, #sub-audit thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .recent-table tbody, #orders-body, #audit-body { display: grid; padding: 12px; gap: 12px; }
  .recent-table tbody tr, #orders-body tr, #audit-body tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
  .recent-table tbody td, #orders-body td, #audit-body td { display: flex !important; flex-direction: column; align-items: start; gap: 5px; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; white-space: normal; font-size: 11px; }
  .recent-table tbody td::before, #orders-body td::before, #audit-body td::before { content: attr(data-label); color: var(--text-3); font: 400 9px/1.4 var(--sans); letter-spacing: 0; }
  .recent-table tbody td:first-child, #orders-body td:first-child, #audit-body td:first-child { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
  .recent-table tbody td:last-child { grid-column: 1 / -1; align-items: stretch; }.recent-table tbody td:last-child::before { display: none; }.recent-table tbody td:last-child .btn { border: 1px solid var(--line); }
  .recent-table tbody tr.clickable:hover td, #orders-body tr.clickable:hover td { background: none; }
  .recent-table .empty-row, #orders-body .empty-row, #audit-body .empty-row { display: block; }
  .recent-table .empty-row td::before, #orders-body .empty-row td::before, #audit-body .empty-row td::before { display: none; }
  .badge { white-space: normal; }
}
/* The workspace presents the decisions people make, rather than diagnostic
   tables. Source mounts remain available to the existing operational app. */
.topbar { min-height: 68px; padding-block: 15px; }
#page-title { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; display: flex; gap: 10px; align-items: center; }
#page-title::before { content: 'Workspace /'; font-weight: 400; color: var(--text-3); }
#page-subtitle { display: none; }
.brand-name { font-size: 19px; }.brand-sub { font-size: 11px; }.nav { font-size: 14px; min-height: 48px; }.nav-caption { font-size: 10px; }
.view { padding-top: 40px; max-width: 1400px; }
.overview-heading { align-items: end; margin-bottom: 30px; }.overview-heading h2 { font-size: 36px; font-weight: 500; }.overview-heading p { font-size: 14px; line-height: 1.6; }.eyebrow { font-size: 11px; letter-spacing: .08em; }
.workspace-page-heading { margin-bottom: 32px; }.workspace-page-heading h2 { font-size: 36px; font-weight: 500; }.workspace-page-heading p { font-size: 14px; }.workspace-page-heading .page-index { display: none; }
.snapshot-section { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 0; margin: 0 0 26px !important; }
.snapshot-section > .section-head { display: none; }.snapshot-section #order-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; }
.snapshot-section .kpi { border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 0 30px; background: none; box-shadow: none; min-height: 85px; }
.snapshot-section .kpi:last-child { border: 0; }.snapshot-section .kpi:nth-child(3) { display: none; }.snapshot-section .kpi-label { color: var(--text-3); font-size: 13px; font-weight: 400; }.snapshot-section .kpi-label svg { display: none; }
.snapshot-section .kpi-value { font: 500 40px/1.2 var(--sans); margin-top: 8px; }.snapshot-section .kpi-foot { display: none; }.snapshot-section .kpi-trace { width: 72px; height: 28px; right: 30px; top: 44px; }
.overview-grid { grid-template-columns: minmax(0,1.7fr) minmax(290px,1fr); gap: 24px; margin-bottom: 32px; }
.performance-panel { padding: 28px; }.panel-heading h2 { font-size: 18px; font-weight: 500; letter-spacing: -.03em; }.panel-heading p { font-size: 12px; margin-top: 6px; }.performance-panel .chart-card { margin-top: 26px; }.chart-legend { font-size: 11px; margin-top: 22px; }
.operations-panel { display: flex; flex-direction: column; gap: 18px; }.desk-status { padding: 24px; }.desk-state { display: flex; align-items: center; gap: 10px; margin: 13px 0 18px; }.desk-state h3 { font: 500 21px/1.3 var(--sans); margin: 0; letter-spacing: -.035em; }
.desk-state-dot { background: var(--good); width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 4px var(--good-dim); }.desk-state-dot.paused { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-dim); }
.market-state { display: flex; gap: 10px; }.market-state > span { font-size: 11px; color: var(--text-3); padding: 5px 9px; background: var(--bg); border-radius: 6px; border: 1px solid var(--line); }.market-state strong { font-weight: 400; color: var(--good); margin-left: 5px; }.market-state .closed strong { color: var(--warn); }
.desk-review { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }.desk-review strong { font-size: 13px; font-weight: 500; }.desk-review p { margin: 6px 0 14px; color: var(--text-3); font-size: 12px; line-height: 1.65; }.desk-review .btn { width: 100%; justify-content: space-between; }
.funds-summary { padding: 24px; }.funds-summary > strong { display: block; font: 500 30px/1.4 var(--sans); letter-spacing: -.045em; margin: 10px 0 16px; }#workspace-funds-coins { display: flex; gap: 22px; }#workspace-funds-coins span { font-size: 10px; color: var(--text-3); }#workspace-funds-coins strong { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); margin-top: 4px; }.funds-link { display: flex; justify-content: space-between; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); margin-top: 20px; padding: 15px 0 0; color: var(--text-2); font-size: 12px; cursor: pointer; }.funds-link:hover { color: var(--accent); }
.section-head h2 { font-size: 18px; font-weight: 500; }.section-meta { font-size: 12px; }.link-btn { font-size: 12px; }
.btn { font-size: 12px; min-height: 40px; font-weight: 500; padding: 11px 15px; }.btn.sm { font-size: 11px; }.overview-actions .btn { min-height: 42px; }.date-pill { font-size: 12px; padding-block: 12px; }
.order-list { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.order-item { display: grid; grid-template-columns: 36px minmax(140px,1fr) minmax(85px,.55fr) minmax(110px,.7fr) minmax(90px,.55fr) 16px; gap: 18px; width: 100%; align-items: center; padding: 20px 24px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text-2); text-align: left; cursor: pointer; }
.order-item:last-child { border-bottom: 0; }.order-item:hover { background: var(--surface-2); }.order-direction { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-2); border-radius: 11px; font-size: 17px; color: var(--accent); }.order-direction.sell { color: var(--text-2); }
.order-customer, .order-amount { min-width: 0; }.order-customer strong, .order-amount strong { display: block; font: 500 14px/1.5 var(--sans); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.order-customer small, .order-amount small { display: block; font-size: 11px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.order-amount strong { font-variant-numeric: tabular-nums; font-size: 15px; }.order-item .order-state { font-size: 11px; font-weight: 400; width: max-content; max-width: 100%; padding: 5px 9px; border-radius: 7px; text-transform: none; }.order-date { font-size: 11px; color: var(--text-3); }.order-chevron { color: var(--text-3); }
.order-empty { text-align: center; padding: 48px 24px; }.order-empty > span { display: grid; place-items: center; margin: 0 auto 20px; width: 46px; height: 46px; color: var(--accent); background: var(--accent-dim); border-radius: 13px; font-size: 22px; }.order-empty h3 { font-size: 18px; font-weight: 500; margin: 0; }.order-empty p { color: var(--text-3); font-size: 13px; margin-top: 8px; }
.orders-workspace { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; overflow: hidden; }.orders-workspace .order-list { border: 0; border-radius: 0; }.orders-workspace .toolbar-row { padding: 18px 24px; border-bottom: 1px solid var(--line); margin: 0; gap: 12px; }#workspace-order-filter { max-width: none; flex: 1; font-size: 13px; min-height: 42px; }.orders-workspace .sel-btn { min-height: 42px; font-size: 12px; }.orders-workspace #btn-refresh-orders { min-height: 42px; }
.order-type-tabs { display: flex; padding: 0 24px; gap: 28px; border-bottom: 1px solid var(--line); }.order-type-tabs button { position: relative; border: 0; background: none; color: var(--text-3); font: 400 13px var(--sans); padding: 20px 0; cursor: pointer; }.order-type-tabs button.active { color: var(--text); }.order-type-tabs button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.review-section { border: 1px solid var(--warn-dim); border-radius: 14px; background: var(--warn-dim); padding: 20px 24px; }.review-section .section-head { margin-bottom: 12px; }.review-section .section-head h2 { font-size: 15px; color: var(--warn); }.review-card { border: 0; background: none; box-shadow: none; padding: 12px 0; border-radius: 0; font-size: 13px; }.review-card:hover { background: none; box-shadow: none; }.review-card .unit { font-size: 12px; }
.workspace-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }.workspace-tabs > button { position: relative; padding: 14px 0 18px; border: 0; background: none; color: var(--text-3); font: 400 13px var(--sans); cursor: pointer; }.workspace-tabs > button.active { color: var(--text); }.workspace-tabs > button.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); }
.wallet-pane > .liq-grid { margin: 0 0 28px !important; }.wallet-pane > .grid-2 { margin: 0 0 24px !important; align-items: start; }.liq-card { padding: 26px; }.liq-top { margin-bottom: 20px; }.liq-name { font-size: 12px; }.liq-value, .liq-value.blue, .liq-value.purple, .liq-value.cyan { font-size: 32px; font-weight: 500; }.liq-usd { font-size: 12px; }.liq-card .meter, .liq-card .meter-legend { display: none; }.liq-card .coin { width: 28px; height: 28px; }.volume-disclosure { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }.volume-disclosure summary { display: flex; justify-content: space-between; padding: 20px 24px; list-style: none; font-size: 13px; cursor: pointer; }.volume-disclosure summary span { color: var(--text-3); font-size: 11px; }.volume-disclosure .figure-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }.figure-label { font-size: 12px; }.figure-value { font-size: 25px; font-weight: 500; }.figure .spark { display: none; }
.restock-card { padding: 26px; }.card-title { font-size: 18px; font-weight: 500; gap: 10px; }.card-sub { font-size: 13px; margin: 10px 0 24px; }.hint { font-size: 12px; }.wallet-row { padding: 16px; border-radius: 11px; }.wallet-head b { font-size: 13px; }.wallet-head .unit { font-size: 10px; }.wallet-bal { font-size: 12px; }.wallet-addr { margin-top: 16px; }.wallet-addr code { font-size: 11px; border: 0; background: none; padding: 0; }.wallet-addr .btn { font-size: 11px; }.avail-row { padding: 16px; }.avail-label { font-size: 12px; }.avail-value { font-size: 18px; }.avail-value .sub-amount { font-size: 11px; margin-top: 4px; }.restock-row { margin-top: 16px; gap: 12px; }.restock-row input { min-height: 44px; font-size: 13px; }.restock-row .sel-btn { min-height: 44px; font-size: 12px; }.chip-row { gap: 8px; margin: 14px 0; }.chip { font-size: 12px; }.restock-card .hint { font-size: 11px; }.wallet-history-card { padding: 26px; }.feed-head { font-size: 16px; font-weight: 500; margin-bottom: 20px; }.feed-head .sel-btn { font-size: 12px; }.wf-row { font-size: 13px; }.mkt { padding: 26px; }.mkt-name { font-size: 16px; font-weight: 500; }.mkt-sub { font-size: 12px; }.restock-notify-row { margin: 24px 0 0; padding: 22px 26px; }.rn-name { font-size: 14px; font-weight: 500; }.rn-sub { font-size: 12px; }
.account-disclosure { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-top: 18px; overflow: hidden; }.account-disclosure > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; padding: 22px 26px; }.account-disclosure summary strong { font-size: 15px; font-weight: 500; }.account-disclosure summary small { display: block; margin-top: 5px; font-size: 12px; color: var(--text-3); }.account-disclosure > .card { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin-bottom: 0 !important; }.account-disclosure > .card > .card-head { display: none; }
#view-accounts > .card { padding: 26px; border: 0; background: none; box-shadow: none; padding: 0; }#view-accounts > .card > .card-head { font-size: 18px; font-weight: 500; border: 0; }#view-accounts > .card > .hint { display: none; }#accounts-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }#accounts-list > .empty, #accounts-list > .feed-warn { grid-column: 1 / -1; }
#accounts-list .acct-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }#accounts-list .acct-main { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }#accounts-list .acct-main b { font-size: 19px; font-weight: 500; letter-spacing: -.025em; }#accounts-list .acct-status { font-size: 11px; font-weight: 400; border-radius: 6px; padding: 4px 8px; }#accounts-list .acct-coins { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; gap: 20px; }#accounts-list .check { font-size: 12px; }#accounts-list .acct-exit-cell { display: none; }#accounts-list .btn { grid-column: 2; font-size: 11px; color: var(--text-3); }.acct-new-coins .check { font-size: 12px; }
.settings-grid { gap: 24px; }.settings-group { padding: 28px; }.settings-fields { gap: 24px; }.settings-fields .field > span { font-size: 13px; }.settings-fields input { font-size: 14px; min-height: 44px; }.settings-guide { padding: 28px; }.settings-guide h3 { font-size: 20px; font-weight: 500; }.settings-guide p { font-size: 13px; }.settings-guide dl { font-size: 13px; }.settings-guide dt { margin-top: 22px; }.settings-guide .guide-footer { font-size: 12px; }.subnav { margin-bottom: 28px; }.subnav-btn { font-size: 13px; min-height: 40px; }.save-bar { padding: 18px 22px; }.save-bar .btn { min-width: 150px; }
.profile-name { font-size: 13px; }.profile-role { font-size: 11px; }.profile-dropdown button { font-size: 13px; }.command-result { font-size: 14px; }.command-result small { font-size: 12px; }.command-footer { font-size: 11px; }
@media (max-width: 1200px) { .order-item { gap: 14px; grid-template-columns: 32px minmax(110px,1fr) 90px 110px 14px; padding: 18px 20px; }.order-date { display: none; }.overview-grid { gap: 18px; }.snapshot-section .kpi { padding-inline: 24px; }.snapshot-section .kpi-trace { width: 45px; right: 24px; }.view { padding: 32px; }.overview-heading h2, .workspace-page-heading h2 { font-size: 32px; } }
@media (max-width: 1000px) { .overview-grid { grid-template-columns: 1fr; }.operations-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.desk-status, .funds-summary { padding: 24px; }.funds-summary > strong { margin-top: 14px; }.snapshot-section .kpi-trace { display: none; }.settings-guide { display: none; }.settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .topbar { min-height: 68px; padding: 12px 20px; }.view { padding: 28px 24px; }.overview-heading h2 { font-size: 31px; }.overview-heading p { font-size: 13px; }.snapshot-section .kpi-label { font-size: 12px; }.snapshot-section .kpi-value { font-size: 36px; }.btn, .sel-btn, .link-btn, .chip { min-height: 44px; }.order-item { grid-template-columns: 36px minmax(140px,1fr) 110px 130px 16px; }.workspace-page-heading p { font-size: 13px; } }
@media (max-width: 700px) {
  .view { padding: 28px 18px; }.topbar { padding: 12px 14px; }#page-title { font-size: 12px; gap: 6px; }#page-title::before { display: none; }.overview-heading, .workspace-page-heading { margin-bottom: 24px; gap: 18px; }.overview-heading h2, .workspace-page-heading h2 { font-size: 30px; }.overview-heading p { max-width: none; font-size: 13px; }.overview-heading { flex-direction: column; align-items: start; }.overview-actions { width: 100%; }.overview-actions .btn { width: 100%; font-size: 13px; }.overview-heading .eyebrow { font-size: 10px; }
  .snapshot-section { padding: 22px 0; margin-bottom: 24px !important; }.snapshot-section .kpi { padding-inline: 14px; min-height: 66px; }.snapshot-section .kpi-label { font-size: 10px; }.snapshot-section .kpi-value { font-size: 32px; margin-top: 10px; }.overview-grid { gap: 18px; }.performance-panel { padding: 22px 18px; }.panel-heading { gap: 12px; }.panel-heading h2 { font-size: 17px; }.panel-heading p { font-size: 11px; }.chart-legend { font-size: 10px; gap: 14px; }.chart-legend .chart-period { display: none; }.performance-panel .sel-btn { font-size: 11px; padding: 9px; }.operations-panel { grid-template-columns: 1fr; gap: 16px; }.desk-status, .funds-summary { padding: 22px; }.desk-state h3 { font-size: 22px; }.market-state > span { font-size: 12px; }.desk-review strong { font-size: 14px; }.desk-review p { font-size: 13px; }.funds-summary > strong { font-size: 32px; }#workspace-funds-coins span { font-size: 11px; }#workspace-funds-coins strong { font-size: 14px; }.funds-link { font-size: 13px; }
  .order-item { grid-template-columns: 32px minmax(0,1fr) auto; column-gap: 12px; row-gap: 13px; padding: 18px; }.order-direction { width: 32px; height: 32px; border-radius: 9px; }.order-customer strong { font-size: 14px; }.order-customer small { font-size: 10px; }.order-amount strong { font-size: 15px; text-align: right; }.order-amount small { font-size: 10px; text-align: right; }.order-item .order-state { grid-column: 2; grid-row: 2; font-size: 10px; padding: 4px 7px; }.order-chevron { grid-column: 3; grid-row: 2; text-align: right; }.order-type-tabs { padding: 0 18px; gap: 26px; }.order-type-tabs button { font-size: 13px; padding-block: 19px; }.orders-workspace .toolbar-row { padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; }#workspace-order-filter { grid-column: 1 / -1; width: 100%; font-size: 13px; }.orders-workspace .toolbar-row > .sel { min-width: 0; }.orders-workspace .sel-btn { width: 100%; }.review-section { padding: 18px; }.review-section .section-meta { display: none; }.review-card { flex-wrap: wrap; gap: 10px; }
  .workspace-tabs { gap: 20px; }.workspace-tabs button { font-size: 11px; white-space: nowrap; }.liq-grid { grid-template-columns: 1fr; gap: 12px; }.liq-card { padding: 22px; }.liq-top { margin-bottom: 14px; }.liq-value, .liq-value.blue, .liq-value.purple, .liq-value.cyan { font-size: 30px; }.liq-usd { margin-bottom: 0; }.restock-card, .wallet-history-card { padding: 22px 18px; }.card-title { font-size: 18px; }.card-sub { font-size: 12px; }.wallet-row { padding: 14px; }.wallet-addr { gap: 10px; }.wallet-addr code { flex-basis: 100%; }.wallet-addr .btn { width: 100%; }.volume-disclosure summary { padding: 18px; }.volume-disclosure summary span { display: none; }.volume-disclosure .figure-row { grid-template-columns: 1fr 1fr; }.figure-label { font-size: 11px; }.figure-value { font-size: 20px; }.rn-name { font-size: 13px; }.rn-sub { font-size: 11px; }
  #accounts-list { grid-template-columns: 1fr; gap: 14px; }#accounts-list .acct-row { padding: 22px; }#accounts-list .acct-main b { font-size: 20px; }.account-disclosure > summary { padding: 20px; }.account-disclosure summary small { font-size: 11px; }.account-disclosure > .card { padding: 20px; }.form-row label { font-size: 12px; }.form-row input { min-height: 44px; }.settings-group { padding: 22px; }.settings-fields { gap: 22px 14px; }.settings-fields .field > span { font-size: 12px; }.settings-fields input { font-size: 13px; }.settings-guide { display: none; }.save-bar { padding: 14px; }.save-bar .btn { width: 100%; }.subnav-btn { font-size: 12px; }.section-head h2 { font-size: 18px; }
}
@media (max-width: 400px) { .settings-fields { grid-template-columns: 1fr; }.workspace-tabs { gap: 15px; }.workspace-tabs button { font-size: 10px; }.snapshot-section .kpi { padding-inline: 12px; }.snapshot-section .kpi-label { font-size: 9px; } }
.sys-widget { padding: 14px; }.sys-spark, .sys-foot { display: none; }
.review-card { display: flex; align-items: center; width: 100%; justify-content: space-between; gap: 14px; min-height: 65px; margin: 0; text-align: left; }.review-main { display: block; flex: 1; min-width: 0; font-size: 13px; line-height: 1.7; }.review-reason { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); }.review-card > .btn { min-width: 70px; border: 1px solid var(--line); background: var(--surface); color: var(--text); min-height: 40px; }
.performance-panel { align-self: start; }.desk-review .btn { border: 0; background: none; justify-content: start; min-height: 22px; padding: 0; color: var(--accent); }.desk-review p { margin-bottom: 12px; }.desk-review { margin-top: 18px; padding-top: 16px; }
#order-detail-content .detail-head { display: flex; align-items: center; gap: 10px; margin-top: -14px; margin-bottom: 28px; }#order-detail-content .detail-head .badge { font-size: 12px; padding: 5px 9px; }.kv-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 26px; }.kv { padding: 20px 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; }.kv em { display: block; font: 400 12px var(--sans); color: var(--text-3); font-style: normal; margin-bottom: 8px; }.kv b { font: 400 14px/1.6 var(--sans); color: var(--text); overflow-wrap: anywhere; }.kv .mono { font: 400 12px/1.6 var(--mono); }.kv.order-value-summary { grid-column: 1 / -1; }.kv.order-value-summary b { font: 500 36px/1.3 var(--sans); letter-spacing: -.04em; }#order-detail-content > .grid-2 { grid-template-columns: 1fr; }.tl-msg { font-size: 13px; }.tl-time { font-size: 11px; }.card-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width:700px) { .review-card > .btn { min-height: 44px; }.review-main { font-size: 12px; }.review-reason { font-size: 11px; }.kv-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }.kv b { font-size: 13px; }.kv em { font-size: 11px; }.card-actions .btn { width: 100%; }.desk-review .btn { min-height: 44px; }.performance-panel { align-self: stretch; } }

/* A control has one painted surface. Clear the old inset background on
   select wrappers so square corners cannot show behind the rounded button. */
.sel, :root[data-theme="light"] .sel {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 12px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sel-btn, .restock-row .sel-btn, .orders-workspace .sel-btn,
.performance-panel .sel-btn, .feed-head .sel-btn {
  height: auto;
  min-height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 10px 13px;
  font-size: 12px;
  overflow: hidden;
  transition: background .15s ease, border-color .15s ease;
}
.sel-btn:hover, .sel-btn[aria-expanded="true"] {
  background: var(--surface-3);
  border-color: var(--line-2);
}
.sel-btn:active { transform: none; }
.sel-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sel-chev { width: 14px; height: 14px; }
.sel-menu { padding: 6px; border-radius: 14px; overflow-x: hidden; }
.sel-opt { min-height: 40px; border-radius: 9px; padding: 10px 12px; font-size: 12px; }
.card, .settings-group, .liq-card, .mkt, .wallet-history-card,
.orders-workspace, .order-list, .volume-disclosure, .account-disclosure,
.notif-panel { overflow: clip; }
.sel-menu { overflow-y: auto; }

/* One funding panel, with simple currency rows rather than nested boxes. */
#deposit-wallets .wallet-row {
  margin: 0;
  padding: 22px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}
#deposit-wallets .wallet-row:last-child { padding-bottom: 0; }
#deposit-wallets .wallet-head { align-items: center; gap: 16px; margin: 0 0 20px; }
.wallet-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wallet-identity > b { font-size: 15px; font-weight: 500; }
.wallet-currency-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 22px;
}
.wallet-currency-mark svg { width: 21px; height: 21px; }
#deposit-wallets .wallet-bal { margin-left: auto; text-align: right; }
#deposit-wallets .wallet-bal > b { font: 500 20px/1.3 var(--sans); color: var(--text); letter-spacing: -.03em; }
#deposit-wallets .wallet-bal .sub-amount { font: 400 11px/1.5 var(--sans); margin-top: 4px; color: var(--text-3); }
#deposit-wallets .wallet-addr {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.wallet-address-text { display: grid; gap: 7px; flex: 1; min-width: 0; }
.wallet-address-label { font-size: 11px; color: var(--text-3); }
#deposit-wallets .wallet-address-text code {
  display: block;
  flex-basis: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-2);
  font: 400 12px/1.65 var(--mono);
  overflow-wrap: anywhere;
}
#deposit-wallets .btn-wcopy {
  width: auto;
  min-height: 38px;
  flex: none;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  white-space: nowrap;
}
#deposit-wallets .btn-wcopy:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
#deposit-wallets .wallet-row.bad { color: var(--bad); }
.restock-card .avail-row {
  padding: 0 0 20px;
  margin-bottom: 20px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
@media (max-width: 700px) {
  .sel-btn, .restock-row .sel-btn, .orders-workspace .sel-btn, .performance-panel .sel-btn, .feed-head .sel-btn, .sel-opt { min-height: 44px; }
  #deposit-wallets .wallet-head { gap: 10px; }
  .wallet-identity { gap: 10px; }.wallet-identity > b { font-size: 14px; }
  .wallet-currency-mark { width: 34px; height: 34px; border-radius: 10px; }
  #deposit-wallets .wallet-bal > b { font-size: 19px; }
  #deposit-wallets .wallet-bal .sub-amount { font-size: 10px; }
  #deposit-wallets .wallet-addr { flex-wrap: wrap; gap: 12px; }
  .wallet-address-text { flex-basis: 100%; }
  #deposit-wallets .wallet-address-text code { font-size: 12px; }
  #deposit-wallets .btn-wcopy { width: 100%; min-height: 44px; font-size: 12px; }
}

/* Cards share their row edge; forms use the space for clear, labelled fields. */
.wallet-pane > .grid-2 { align-items: stretch; gap: 20px; }
.restock-card { align-self: stretch; }
.withdraw-panel { display: flex; flex-direction: column; }
.withdraw-amount-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .7fr); gap: 14px; margin-top: 0; }
.withdraw-field { display: grid; gap: 9px; min-width: 0; width: 100%; }
.withdraw-field label, .withdraw-label { color: var(--text-2); font-size: 12px; }
.withdraw-field input, .withdraw-field .sel, .withdraw-field .sel-btn { width: 100%; }
.withdraw-amount-row input, .withdraw-amount-row .sel-btn, .withdraw-address-row input { min-height: 48px; }
.withdraw-address-row { margin-top: 12px; }
.withdraw-panel .chip-row { margin: 12px 0 20px; }
.withdraw-footer { margin-top: auto; padding-top: 24px; display: grid; gap: 14px; }
.withdraw-footer p { margin: 0; color: var(--text-3); font-size: 12px; line-height: 1.6; }
.withdraw-footer #btn-withdraw { width: 100%; min-height: 48px; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); }
.withdraw-footer #btn-withdraw:hover { background: var(--line-2); }
.performance-panel { align-self: stretch; display: flex; flex-direction: column; }
.performance-panel .chart-legend { margin-top: auto; padding-top: 22px; }
.operations-panel > .card { flex: 1; }
.settings-grid { grid-template-columns: minmax(0, 1fr); }
.order-history-grid { grid-template-columns: minmax(0, 1fr); }
.order-history-grid .section { margin-bottom: 0; }
.order-history-grid .timeline { padding-top: 4px; }
.order-history-grid .tl-item { grid-template-columns: 16px 1fr; gap: 14px; }
.order-history-grid .tl-body { padding-bottom: 22px; }
.order-history-grid .tl-msg { font-size: 14px; line-height: 1.6; }
.order-history-grid .tl-time { font-size: 12px; margin-top: 4px; }
.order-history-grid .tl-dot { width: 7px; height: 7px; margin-top: 8px; background: var(--text-3); }
.payment-reference { color: var(--text); font: 500 13px/1.6 var(--sans); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 3px; overflow-wrap: anywhere; }
.payment-reference:hover { color: var(--accent); border-color: currentColor; }
.payment-reference:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* Quiet notifications, with a separate visual language for confirmations. */
.toast-stack { right: 24px; bottom: 24px; width: min(380px, calc(100vw - 32px)); gap: 10px; }
.toast-stack > .toast { align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 40px #0003; }
.toast .t-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); margin: 0; }
.toast .t-icon svg { width: 16px; height: 16px; }
.toast.err .t-icon, .toast.bad .t-icon { color: var(--bad); }
.toast .t-body { display: grid; gap: 4px; min-width: 0; }
.toast .t-title { font: 500 13px/1.5 var(--sans); color: var(--text); }
.toast .t-sub { font: 400 12px/1.5 var(--sans); color: var(--text-3); overflow-wrap: anywhere; }
.toast .t-close, .dialog-close { display: grid; place-items: center; width: 30px; height: 30px; flex: none; margin-left: auto; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); font: 400 22px var(--sans); cursor: pointer; }
.toast .t-close:hover, .dialog-close:hover { color: var(--text); background: var(--surface-3); }
.modal-root { padding: 20px; }
.modal-root .modal { width: min(480px, 100%); padding: 0; border-radius: 20px; background: var(--surface); box-shadow: 0 24px 100px #0005; }
.dialog-header { display: flex; align-items: center; gap: 14px; padding: 26px 26px 20px; }
.dialog-header .modal-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; margin: 0; flex: none; background: var(--surface-3); color: var(--text-2); }
.dialog-header .modal-icon.danger { color: var(--bad); background: var(--surface-3); }
.dialog-titles { min-width: 0; }
.dialog-titles .eyebrow { font-size: 9px; letter-spacing: .12em; }
.modal .dialog-titles h3 { font: 500 21px/1.4 var(--sans); letter-spacing: -.03em; margin: 6px 0 0; }
.modal > p { padding: 0 26px; margin: 0 0 24px; font-size: 14px; line-height: 1.75; color: var(--text-2); }
.modal > .field { margin: 0 26px 24px; display: grid; gap: 9px; }
.modal .field label { font-size: 12px; color: var(--text-2); }
.modal .field input { width: 100%; min-height: 46px; }
.modal .modal-actions { padding: 18px 26px; margin: 0; background: var(--surface-2); border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; gap: 10px; }
.modal-actions .btn { min-height: 42px; font-size: 12px; border-radius: 11px; }
.modal-actions .btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.notif-panel { width: 390px; max-width: calc(100vw - 32px); border-radius: 18px; }
.notif-panel .notif-head { padding: 20px; font-size: 14px; font-weight: 500; background: var(--surface); border-bottom: 1px solid var(--line); }
.notif-head .link-btn { font-size: 11px; color: var(--text-3); }
.notif-panel .notif-list { max-height: 380px; overflow-y: auto; }
.notif-panel .notif-item { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 18px 20px; background: transparent; border-bottom: 1px solid var(--line-soft); }
.notif-panel .notif-item:hover { background: var(--surface-2); }
.notif-item .dot { width: 6px; height: 6px; }
.notif-panel .ni-title { font: 500 13px/1.5 var(--sans); }
.notif-panel .ni-sub { font-size: 12px; line-height: 1.5; margin-top: 5px; color: var(--text-3); }
.notif-panel .ni-time { font-size: 10px; margin-top: 3px; color: var(--text-3); }
.notif-panel .notif-empty { padding: 32px 24px; text-align: center; }
.notif-empty > span { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 14px; background: var(--surface-3); border-radius: 12px; color: var(--text-2); font-size: 18px; }
.notif-empty strong { display: block; color: var(--text); font-size: 14px; font-weight: 500; }
.notif-empty p { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-3); }
@media (max-width: 700px) {
  .withdraw-amount-row { grid-template-columns: minmax(0, 1fr) minmax(130px, .8fr); }
  .withdraw-footer { padding-top: 24px; }
  .modal-root { padding: 16px; }.dialog-header { padding: 22px 20px 18px; gap: 10px; }
  .modal > p { padding-inline: 20px; }.modal > .field { margin-inline: 20px; }.modal .modal-actions { padding: 16px 20px; }
  .modal .dialog-titles h3 { font-size: 19px; }.dialog-header .modal-icon { width: 34px; height: 34px; }
  .toast-stack { right: 16px; bottom: 16px; }.notif-panel { right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .toast-stack > .toast { animation: none; } }
@media (min-width: 701px) {
  .wallet-pane #deposit-wallets { display: flex; flex-direction: column; }
  #deposit-wallets .wallet-row { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
  #deposit-wallets .wallet-row:last-child { padding-bottom: 20px; }
}
.notif-panel .notif-item { width: 100%; margin: 0; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; text-align: left; box-shadow: none; color: var(--text); cursor: pointer; }
.notif-panel .notif-item:last-child { border-bottom: 0; }
#order-detail-content .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#order-detail-content .order-meta-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#order-detail-content .order-meta-row em { margin: 0; flex: none; }
#order-detail-content .order-meta-row b { text-align: right; min-width: 0; }
.search #global-search { padding-right: 14px; }
.search-results .search-item { width: 100%; border: 0; border-radius: 0; background: transparent; text-align: left; cursor: pointer; }
.search-results .search-item:hover, .search-results .search-item.sel { background: var(--surface-3); }

.profile #btn-logout { display: none; }

/* The legacy account width cap and generic input widths must not constrain
   the new layout or turn a checkbox into a text field. */
#view-accounts { width: 100%; max-width: none; }
#view-accounts .card, #view-accounts .account-disclosure { width: 100%; max-width: none; }
#view-accounts #accounts-list { width: 100%; }
#accounts-list .acct-row { gap: 18px; padding: 22px; }
#accounts-list .acct-main { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
#accounts-list .acct-coins { grid-column: 1; padding-top: 0; border: 0; flex-wrap: wrap; }
#accounts-list .acct-row > .btn { grid-column: 2; align-self: center; margin: 0; }
#view-accounts .add-account-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: end; margin: 0 0 18px; }
#view-accounts .add-account-form > label { min-width: 0; width: 100%; }
#view-accounts .add-account-form > label > input { min-width: 0; width: 100%; min-height: 46px; }
#view-accounts .account-currency-field { display: grid; gap: 12px; min-width: 0; }
.account-currency-field > span { font-size: 12px; color: var(--text-2); }
#view-accounts .acct-new-coins { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; min-height: 42px; }
#view-accounts .acct-new-coins > .check { display: inline-flex; flex-direction: row; align-items: center; gap: 9px; min-width: 0; width: auto; flex: none; font-size: 13px; white-space: nowrap; cursor: pointer; }
#view-accounts .check input[type="checkbox"] { width: 20px; height: 20px; min-width: 20px; max-width: 20px; min-height: 20px; max-height: 20px; flex: 0 0 20px; margin: 0; padding: 0; }
#view-accounts .add-account-form > #acct-add { justify-self: end; width: min(220px, 100%); min-height: 46px; }
#order-detail-content .wallet-address-detail b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; word-break: normal; user-select: text; }
@media (max-width: 700px) {
  #view-accounts .add-account-form { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #view-accounts .add-account-form > #acct-add { width: 100%; }
  #order-detail-content .wallet-address-detail { display: grid; gap: 9px; }
  #order-detail-content .wallet-address-detail b { text-align: left; }
}
#accounts-list .acct-exit-cell { display: grid; grid-column: 1 / -1; gap: 9px; min-width: 0; }
.account-proxy-label { color: var(--text-3); font-size: 12px; }
#accounts-list .acct-exit-cell .sel, #accounts-list .acct-exit-cell .sel-btn { width: 100%; min-width: 0; }
#accounts-list .acct-exit-cell .sel-btn { min-height: 42px; text-align: left; }
#view-accounts .add-account-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.add-account-form > label:has(#acct-ign) { grid-column: 1; grid-row: 1; }
.add-account-form > label:has(#acct-email) { grid-column: 2; grid-row: 1; }
.add-account-form > label:has(#acct-proxy) { grid-column: 3; grid-row: 1; }
.add-account-form > .account-currency-field { grid-column: 1 / span 2; grid-row: 2; }
#view-accounts .add-account-form > #acct-add { grid-column: 3; grid-row: 2; width: 100%; }
.add-account-form #acct-proxy + .sel-btn { min-height: 46px; }
@media (max-width: 1000px) and (min-width: 701px) {
  #view-accounts .add-account-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .add-account-form > label:has(#acct-proxy) { grid-column: 1; grid-row: 2; }
  .add-account-form > .account-currency-field { grid-column: 2; grid-row: 2; }
  #view-accounts .add-account-form > #acct-add { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 700px) {
  #view-accounts .add-account-form { grid-template-columns: minmax(0, 1fr); }
  #view-accounts .add-account-form > label, .add-account-form > .account-currency-field,
  #view-accounts .add-account-form > #acct-add { grid-column: 1; grid-row: auto; }
  #accounts-list .acct-exit-cell .sel-btn { min-height: 44px; }
}
#accounts-list .acct-main { grid-row: 1; }
#accounts-list .acct-coins, #accounts-list .acct-row > .btn { grid-row: 2; }
#accounts-list .acct-exit-cell { grid-row: 3; }
