@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope-400-7fe97da0.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope-500-fa12a073.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope-600-c0e79af6.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope-700-6501e5cd.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope-800-8fd8c8e7.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  --canvas: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --ink: #19233d;
  --ink-soft: #526078;
  --muted: #8490a7;
  --line: #e5eaf3;
  --line-strong: #d7deeb;
  --signal: #5c5ce6;
  --signal-dark: #4545c5;
  --signal-soft: #eeefff;
  --green: #1e9b73;
  --green-soft: #e7f8f1;
  --amber: #c98220;
  --amber-soft: #fff4df;
  --red: #d45b67;
  --red-soft: #fff0f2;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --shadow-card: 0 12px 34px rgb(47 63 101 / 6%);
  --shadow-modal: 0 24px 80px rgb(24 35 64 / 20%);
  --focus-ring: #a6a8ff;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; background: var(--canvas); scroll-behavior: smooth; }

body {
  min-width: 320px;
  overflow-x: hidden;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgb(224 225 255 / 45%), transparent 30rem),
    var(--canvas);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgb(111 121 155 / 3%) 1px, transparent 1px), linear-gradient(90deg, rgb(111 121 155 / 3%) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  pointer-events: none;
}

h1, h2, p { margin: 0; }
h1, h2, strong { letter-spacing: -0.035em; }
h1 { font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.08; font-weight: 800; }
h2 { font-size: 1.1rem; line-height: 1.2; font-weight: 800; }

button, input, select { font: inherit; }
button { cursor: pointer; }

:where(button, input, select):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; padding: 24px clamp(16px, 4vw, 64px) 60px; }
.surface { border: 1px solid rgb(222 228 240 / 85%); border-radius: var(--radius-lg); background: rgb(255 255 255 / 88%); box-shadow: var(--shadow-card); }
.eyebrow, .section-kicker, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.eyebrow { color: var(--signal); font-size: .66rem; font-weight: 800; letter-spacing: .16em; line-height: 1.2; }
.eyebrow-divider { color: var(--muted); padding-inline: .45rem; }
.section-kicker { color: var(--signal); font-size: .64rem; font-weight: 800; letter-spacing: .13em; }
.muted, small, .card-meta { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 28px; max-width: 1500px; margin: 0 auto 24px; padding: 26px 30px; }
.brand-lockup { display: flex; align-items: flex-start; gap: 17px; }
.brand-mark { display: flex; align-items: end; gap: 4px; min-width: 33px; height: 34px; padding-top: 2px; }
.brand-mark span { display: block; width: 8px; border-radius: 8px; background: var(--signal); transform: skewY(-18deg); }
.brand-mark span:nth-child(1) { height: 19px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 28px; opacity: .78; }
.brand-mark span:nth-child(3) { height: 34px; }
.topbar h1 { margin-top: 9px; }
.topbar-subtitle { margin-top: 9px; color: var(--ink-soft); font-size: .86rem; }
.operator-menu { display: flex; align-items: center; gap: 14px; }
.operator-pill { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-soft); }
.operator-pill strong, .operator-pill small { display: block; line-height: 1.2; }
.operator-pill strong { font-size: .78rem; letter-spacing: 0; }
.operator-pill small { margin-top: 2px; font-size: .64rem; }
.operator-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--signal); color: white; font-weight: 800; }

.dashboard-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; max-width: 1500px; margin: 0 auto; align-items: start; }
.source-rail { position: sticky; top: 24px; padding: 24px 20px 18px; }
.rail-heading, .workspace-heading, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.rail-tools { display: flex; align-items: center; gap: 8px; }
.source-add { width: 32px; min-height: 32px; padding: 0; border-radius: 10px; font-size: 1rem; }
.rail-heading h2 { margin-top: 4px; }
.source-count { color: var(--signal); font-size: 1.25rem; font-weight: 800; }
.source-count small { font-size: .72rem; font-weight: 600; }
.rail-intro { max-width: 190px; margin-top: 13px; color: var(--ink-soft); font-size: .76rem; line-height: 1.55; }
.source-list { margin-top: 24px; }
.source-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); animation: rise-in .45s both; animation-delay: var(--row-delay); }
.source-dot, .pulse-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgb(132 144 167 / 12%); }
.source-ok .source-dot { background: var(--green); box-shadow: 0 0 0 4px rgb(30 155 115 / 12%); }
.source-unavailable .source-dot { background: var(--red); box-shadow: 0 0 0 4px rgb(212 91 103 / 12%); }
.source-not_synced .source-dot { background: var(--amber); box-shadow: 0 0 0 4px rgb(201 130 32 / 12%); }
.source-copy { min-width: 0; flex: 1; }
.source-copy strong, .source-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-copy strong { font-size: .78rem; }
.source-copy small { margin-top: 3px; font-size: .65rem; }
.source-latency { color: var(--ink-soft); font-family: ui-monospace, monospace; font-size: .7rem; }
.source-latency small { margin-left: 2px; font-size: .58rem; }
.source-remove { display: grid; width: 22px; height: 22px; margin-top: 1px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 1.15rem; line-height: 1; }
.source-remove:hover { background: var(--red-soft); color: var(--red); }
.rail-footer { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--ink-soft); font-size: .68rem; }
.pulse-dot { width: 7px; height: 7px; margin: 0; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); animation: pulse 2.4s infinite; }

.workspace { min-width: 0; }
.workspace-heading { align-items: end; margin: 4px 2px 18px; }
.workspace-heading h2 { margin-top: 5px; font-size: 1.25rem; }
.freshness-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #d9eee6; border-radius: var(--radius-pill); background: var(--green-soft); color: #257c62; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; min-height: 148px; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.metric-card::after { position: absolute; right: -24px; bottom: -38px; width: 100px; height: 100px; border-radius: 50%; background: var(--signal-soft); content: ""; }
.metric-card:hover { border-color: #cfd1ff; box-shadow: 0 16px 40px rgb(47 63 101 / 10%); transform: translateY(-3px); }
.metric-card span:not(.metric-icon) { color: var(--ink-soft); font-size: .73rem; font-weight: 700; }
.metric-card strong { display: block; margin-top: 9px; font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1; }
.metric-card small { display: block; margin-top: 10px; font-size: .65rem; }
.metric-icon { position: relative; z-index: 1; display: grid; width: 31px; height: 31px; margin-bottom: 17px; place-items: center; border-radius: 10px; background: var(--signal-soft); color: var(--signal); font-weight: 800; }
.metric-icon-green { background: var(--green-soft); color: var(--green); }
.metric-icon-amber { background: var(--amber-soft); color: var(--amber); }
.metric-icon-blue { background: #e7f3ff; color: #4383c9; }
.metric-primary { border-color: #d9d8ff; background: linear-gradient(145deg, #fff, #f8f8ff); }

.filter-bar { display: grid; grid-template-columns: minmax(150px, 1.1fr) repeat(4, minmax(120px, 1fr)) auto auto; align-items: end; gap: 12px; margin-top: 22px; padding: 14px; }
.filter-heading { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.filter-heading strong, .filter-heading small { display: block; }
.filter-heading small { margin-top: 2px; color: var(--muted); font-size: .62rem; font-weight: 500; }
.filter-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; background: var(--signal-soft); color: var(--signal); font-size: 1.1rem; }
.filter-bar label, .operation-form label, .modal-action-form label { display: grid; gap: 5px; color: var(--ink-soft); font-size: .66rem; font-weight: 700; }
.filter-bar select, .filter-bar input, .operation-form select, .operation-form input, .operation-form textarea, .modal-action-form input { min-height: 40px; min-width: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: var(--surface-soft); color: var(--ink); font: inherit; font-size: .78rem; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.operation-form textarea { min-height: 88px; resize: vertical; }
.filter-bar select:focus, .filter-bar input:focus, .operation-form select:focus, .operation-form input:focus, .operation-form textarea:focus, .modal-action-form input:focus { border-color: var(--signal); background: var(--surface); box-shadow: 0 0 0 4px var(--signal-soft); }
.date-control { position: relative; display: block; }
.date-control > span { position: absolute; z-index: 1; top: 10px; left: 11px; color: var(--signal); font-size: .8rem; pointer-events: none; }
.date-control input { width: 100%; padding-left: 31px; color-scheme: light; }
.date-control input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: .75rem; font-weight: 800; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { border-color: #bfc3ff; background: var(--signal-soft); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { border-color: var(--signal); background: var(--signal); color: white; box-shadow: 0 8px 18px rgb(92 92 230 / 20%); }
.button-primary:hover { border-color: var(--signal-dark); background: var(--signal-dark); color: white; }
.button-quiet { min-height: 36px; padding-inline: 12px; background: transparent; }
.button-small { min-height: 34px; padding: 7px 10px; font-size: .67rem; }
.button-outline { background: var(--surface-soft); }
.button-wide { width: 100%; margin-top: 5px; }
.button[disabled] { cursor: wait; opacity: .58; transform: none; }

.trend-card, .data-card { margin-top: 22px; padding: 23px 24px; }
.data-card { contain: paint; overflow: hidden; }
.card-heading { align-items: center; margin-bottom: 20px; }
.card-heading h2 { margin-top: 5px; }
.card-meta { font-size: .66rem; }
.balance-search { display: grid; gap: 6px; margin: -2px 0 18px; }
.balance-search > label { color: var(--ink-soft); font-size: .66rem; font-weight: 700; }
.balance-search-controls { display: flex; align-items: center; gap: 8px; max-width: 620px; }
.balance-search-controls input { flex: 1; min-width: 0; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: var(--surface-soft); color: var(--ink); font: inherit; font-size: .78rem; }
.balance-search-controls input:focus { border-color: var(--signal); background: var(--surface); box-shadow: 0 0 0 4px var(--signal-soft); }
.chart-heading { align-items: flex-start; }
.chart-subtitle { margin-top: 7px; color: var(--muted); font-size: .72rem; }
.chart-controls { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.chart-toggle { min-height: 30px; padding: 5px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .67rem; font-weight: 800; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.chart-toggle:hover, .chart-toggle.is-active { background: var(--surface); color: var(--signal); box-shadow: 0 3px 9px rgb(47 63 101 / 9%); }
.chart-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin: 3px 0 8px; }
.chart-summary strong { font-size: .82rem; }
.chart-summary span { color: var(--muted); font-size: .65rem; }
.chart-stage { min-height: 280px; }
.chart-svg { display: block; width: 100%; height: 280px; overflow: visible; }
.chart-grid-line { stroke: var(--line); stroke-width: 1; }
.chart-y-label, .chart-x-label { fill: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; }
.chart-bar { fill: #8988f4; animation: chart-rise .65s ease both; }
.chart-bar-share { fill: #61b99c; }
.chart-line { stroke: var(--signal); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; animation: chart-draw .8s ease both; }
.chart-point { fill: var(--surface); stroke: var(--signal); stroke-width: 3; }
.chart-value-label { fill: var(--ink-soft); font-size: 11px; font-weight: 800; }
.chart-caption { display: flex; align-items: center; gap: 8px; margin-top: 3px; color: var(--muted); font-size: .67rem; }
.chart-caption-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.chart-breakdown { display: grid; gap: 8px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.chart-breakdown-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chart-breakdown-heading strong { color: var(--ink-soft); font-size: .73rem; }
.chart-breakdown-heading span { color: var(--muted); font-size: .66rem; }
.chart-breakdown ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.chart-breakdown li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: .71rem; }
.chart-breakdown li strong { color: var(--signal); }
.chart-breakdown .muted { margin: 0; font-size: .7rem; }
.trend-list { display: grid; gap: 5px; }
.trend-row { display: grid; grid-template-columns: 92px minmax(100px, 1fr) 34px; align-items: center; gap: 12px; padding: 6px 0; }
.trend-date { color: var(--ink-soft); font-family: ui-monospace, monospace; font-size: .67rem; }
.trend-track { height: 8px; overflow: hidden; border-radius: var(--radius-pill); background: #eef1f8; }
.trend-bar { display: block; width: var(--value); height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, #9a99ff, var(--signal)); animation: grow-width .7s ease both; }
.trend-row strong { color: var(--ink-soft); font-family: ui-monospace, monospace; font-size: .7rem; text-align: right; }

.table-wrap { overflow-x: auto; margin-inline: -8px; padding-inline: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .77rem; }
th, td { padding: 13px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .61rem; letter-spacing: .1em; text-transform: uppercase; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: #fafbff; }
td strong { font-size: .77rem; letter-spacing: -.02em; }
.source-tag { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-family: ui-monospace, monospace; font-size: .68rem; }
.source-tag i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.balance-value { color: var(--ink); font-weight: 800; }
.status-chip { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: var(--radius-pill); background: var(--amber-soft); color: #9c681d; font-size: .63rem; font-weight: 800; }
.status-connected { background: var(--green-soft); color: #287c62; }
.row-actions { text-align: right; }
.empty-state { padding: 24px 0 5px; color: var(--muted); font-size: .78rem; }

dialog.detail-dialog { width: min(570px, calc(100% - 32px)); max-width: 570px; max-height: calc(100vh - 32px); margin: auto; overflow: auto; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-modal); opacity: 0; transform: translateY(12px) scale(.97); transition: opacity .2s ease, transform .2s ease, display .2s allow-discrete; }
dialog.detail-dialog[open] { opacity: 1; transform: translateY(0) scale(1); }
dialog.detail-dialog::backdrop { background: rgb(21 31 56 / 32%); backdrop-filter: blur(8px); animation: fade-in .2s ease both; }
.dialog-inner { position: relative; padding: 30px; }
.dialog-inner h2 { margin-top: 9px; padding-right: 35px; font-size: 1.35rem; }
.dialog-close { position: absolute; top: 17px; right: 17px; display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--ink-soft); font-size: 1.55rem; line-height: 1; transition: background .18s ease, color .18s ease, transform .18s ease; }
.dialog-close:hover { background: var(--signal-soft); color: var(--signal); transform: rotate(8deg); }
.detail-list { display: grid; gap: 0; margin: 25px 0 0; padding: 5px 17px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.detail-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; min-height: 54px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: .73rem; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; font-size: .77rem; font-weight: 700; }
.detail-actions { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-action-form, .operation-form { display: grid; gap: 13px; margin-top: 22px; }
.detail-actions .modal-action-form { margin-top: 0; }
.detail-actions > .button { width: 100%; }
.detail-actions [role="status"] { margin: 10px 0 0; }
.operation-list { display: grid; gap: 9px; margin-top: 22px; }
.operation-list article { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.operation-list article strong { font-size: .77rem; }
.operation-list article span { color: var(--green); font-weight: 800; }
.operation-list small { grid-column: 1 / -1; font-family: ui-monospace, monospace; font-size: .64rem; }
.operation-list article p { grid-column: 1 / -1; margin: 3px 0 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.45; overflow-wrap: anywhere; }
.operation-list article p b { color: var(--muted); }
.alert { padding: 11px 13px; border-radius: var(--radius-sm); font-size: .78rem; }
.alert-danger { background: var(--red-soft); color: #a33f4b; }

.login-page { display: grid; min-height: calc(100vh - 84px); place-items: center; padding: 24px; }
.login-panel { width: min(460px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgb(255 255 255 / 92%); box-shadow: 0 24px 70px rgb(47 63 101 / 12%); }
.login-panel::before { display: block; width: 52px; height: 5px; margin-bottom: 27px; border-radius: var(--radius-pill); background: var(--signal); content: ""; }
.login-panel h1 { margin: 13px 0 9px; }
.login-panel .muted { font-size: .82rem; line-height: 1.6; }
.login-form { display: grid; gap: 8px; margin-top: 27px; }
.login-form label { margin-top: 7px; color: var(--ink-soft); font-size: .72rem; font-weight: 700; }
.login-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: var(--surface-soft); color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease; }
.login-form input:focus { border-color: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
.login-form .button { width: 100%; margin-top: 10px; }
.login-form .button-primary { min-height: 48px; border-color: #5656dc; background: linear-gradient(135deg, #7777f4 0%, #5555dc 52%, #4545c5 100%); box-shadow: 0 12px 24px rgb(82 82 218 / 28%); font-size: .82rem; }
.login-form .button-primary:hover { border-color: #3f3fb8; background: linear-gradient(135deg, #8585ff 0%, #6262eb 52%, #4b4bd0 100%); box-shadow: 0 15px 29px rgb(82 82 218 / 36%); transform: translateY(-2px); }

@keyframes rise-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow-width { from { width: 0; } to { width: var(--value); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .48; } }
@keyframes chart-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chart-draw { from { stroke-dasharray: 0 1000; } to { stroke-dasharray: 1000 0; } }

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 16px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-heading { width: 100%; height: auto; }
}

@media (max-width: 760px) {
  .app-shell { padding: 12px 12px 35px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 14px; padding: 21px 19px; }
  .topbar h1 { font-size: 1.55rem; }
  .desktop-break { display: none; }
  .operator-menu { width: 100%; justify-content: space-between; }
  .dashboard-grid { display: block; }
  .source-rail { position: static; margin-bottom: 14px; padding: 17px; }
  .rail-intro { display: none; }
  .source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; gap: 8px; margin-top: 13px; padding-bottom: 3px; }
  .source-row { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
  .rail-footer { display: none; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 11px; margin-inline: 2px; }
  .freshness-pill { font-size: .63rem; }
  .kpi-grid { gap: 9px; }
  .metric-card { min-height: 132px; padding: 15px; }
  .metric-icon { width: 27px; height: 27px; margin-bottom: 12px; }
  .metric-card strong { font-size: 1.65rem; }
  .filter-bar { display: flex; align-items: stretch; flex-direction: column; margin-top: 14px; padding: 13px; }
  .filter-bar label, .filter-bar select, .filter-bar input { width: 100%; }
  .filter-bar .button { width: 100%; }
  .filter-heading { width: 100%; }
  .trend-card, .data-card { margin-top: 14px; padding: 18px 14px; }
  .card-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 13px; }
  .chart-controls { width: 100%; }
  .chart-toggle { flex: 1; }
  .balance-search-controls { max-width: none; }
  .chart-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
  .chart-stage { min-height: 230px; }
  .chart-svg { height: 230px; }
  .table-wrap { margin-inline: -6px; padding-inline: 6px; }
  th, td { padding: 11px 7px; }
  .row-actions .button { padding-inline: 8px; }
  dialog.detail-dialog { width: calc(100% - 24px); max-height: calc(100vh - 24px); }
  .dialog-inner { padding: 24px 19px; }
  .detail-row { grid-template-columns: 1fr; gap: 3px; min-height: 0; padding: 12px 0; }
  .login-page { min-height: calc(100vh - 24px); padding: 12px 0; }
  .login-panel { padding: 27px 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
