:root {
  color-scheme: light;
  --ink: #202826;
  --ink-soft: #46514b;
  --muted: #7b847e;
  --canvas: #f3f5f1;
  --surface: #ffffff;
  --line: #e1e6e0;
  --line-strong: #d0d8d1;
  --sidebar: #202b28;
  --sidebar-muted: #a1afa8;
  --green: #347d65;
  --green-deep: #27664f;
  --green-soft: #e6f2ec;
  --blue: #527b91;
  --blue-soft: #e9f1f5;
  --amber: #a57418;
  --amber-soft: #fbf2df;
  --coral: #ba634c;
  --coral-soft: #f8ece7;
  --radius: 8px;
  --shadow: 0 10px 28px rgba(30, 44, 37, .08);
  font-family: "BIZ UDPGothic", "Yu Gothic UI", Meiryo, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 13px; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(65, 132, 108, .24); outline-offset: 2px; }
svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 236px; padding: 26px 16px 18px; color: #f2f5f1; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 32px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #79a18d; border-radius: 11px 11px 11px 3px; color: #b8dec9; font: 700 21px Georgia, serif; transform: rotate(-3deg); }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 14px; letter-spacing: 1.8px; }
.brand-copy small { color: #9eaea6; font-size: 9px; letter-spacing: 1.55px; }
.sidebar-label { padding: 0 11px 10px; color: #8c9b93; font-size: 10px; font-weight: 700; letter-spacing: .9px; }
.main-nav, .sidebar-bottom { display: grid; gap: 5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 11px; border: 0; border-radius: 6px; color: var(--sidebar-muted); background: transparent; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #344a41; box-shadow: inset 3px 0 #86bb9e; }
.nav-item svg { width: 16px; height: 16px; }
.nav-item span:nth-of-type(1) { flex: 1; }
.nav-count { display: grid; min-width: 21px; height: 20px; place-items: center; border-radius: 20px; color: #d5e7dc; background: #425a4e; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin: 20px 3px 0; padding: 15px 5px 0; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: #294b3a; background: #bad5c3; font-size: 11px; font-weight: 700; }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user strong { font-size: 11px; font-weight: 600; }
.sidebar-user small { margin-top: 4px; color: #9eaea6; font-size: 10px; }
.user-menu { margin-left: auto; color: #9eaea6; font-size: 19px; letter-spacing: 1px; }

.main-content { min-height: 100vh; margin-left: 236px; }
.topbar { position: sticky; z-index: 4; top: 0; display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.93); backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.breadcrumb strong { color: var(--ink-soft); font-weight: 600; }
.crumb-separator { color: #c0c8c1; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.demo-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #e8d9bd; border-radius: 4px; color: #80612b; background: #fff8e9; font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.demo-pill i { width: 6px; height: 6px; border-radius: 50%; background: #d19b39; }
.topbar-divider { height: 23px; border-left: 1px solid var(--line); }
.clock-label { display: grid; gap: 2px; color: var(--muted); font-size: 9px; text-align: right; }
.clock-label strong { color: var(--ink-soft); font: 600 11px "Bahnschrift", "Yu Gothic UI", sans-serif; }
.icon-button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid transparent; border-radius: 6px; color: #64716a; background: transparent; cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: #f8faf7; }
.icon-button svg { width: 17px; height: 17px; }

.page-wrap { width: min(100%, 1600px); margin: 0 auto; padding: 28px 34px 24px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 23px; }
.eyebrow { margin: 0 0 8px; color: #79857d; font-size: 9px; font-weight: 700; letter-spacing: 1.15px; }
.eyebrow span { color: #c08d49; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 26px; font-weight: 700; letter-spacing: 0; }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
.page-description { margin: 0; color: var(--muted); font-size: 11px; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .16s ease, border .16s ease, transform .16s ease; }
.button:active { transform: translateY(1px); }
.button svg { width: 15px; height: 15px; }
.button-quiet { border-color: var(--line-strong); color: #4c5b52; background: #fff; }
.button-quiet:hover, .button-outline:hover { border-color: #aebdb1; background: #f8faf7; }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-deep); }
.button-stop { border-color: #e5c5bb; color: #9b4f3e; background: #fff8f5; }
.button-stop:hover, .button-stop.is-paused { border-color: #c36d54; color: white; background: #b45845; }
.button-small { min-height: 31px; padding: 0 10px; font-size: 10px; }
.button-outline { border-color: var(--line-strong); color: #4c5b52; background: #fff; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.stop-icon { width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px; }
.plus-icon { font-size: 17px; font-weight: 400; line-height: 1; }

.view-panel { display: none; animation: reveal .24s ease both; }
.view-panel.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.notice-strip { display: flex; align-items: center; gap: 12px; min-height: 59px; margin-bottom: 17px; padding: 10px 15px; border: 1px solid #efddba; border-radius: 6px; background: #fffaf0; }
.notice-symbol { display: grid; flex: none; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #936b22; background: #f4e4bf; font: 700 13px Georgia, serif; }
.notice-strip > div { display: grid; gap: 4px; flex: 1; }
.notice-strip strong { color: #5d4a2b; font-size: 11px; }
.notice-strip > div span { color: #887858; font-size: 10px; }
.text-button { padding: 4px 0; border: 0; color: var(--green-deep); background: transparent; font-size: 10px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.text-button:hover { color: #214d3d; text-decoration: underline; text-underline-offset: 3px; }
.slim-notice { margin-bottom: 19px; }
.slim-notice .notice-symbol { color: #547467; background: #e0ece5; }
.slim-notice strong { color: #374c41; }
.slim-notice > div span { color: #718078; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric-card { position: relative; min-height: 121px; overflow: hidden; padding: 15px 17px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.metric-card::after { position: absolute; right: -13px; bottom: -31px; width: 80px; height: 80px; border: 1px solid currentColor; border-radius: 50%; opacity: .07; content: ""; }
.metric-green { color: var(--green); }
.metric-blue { color: var(--blue); }
.metric-amber { color: var(--amber); }
.metric-coral { color: var(--coral); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.metric-mark { color: #b4bcb6; font: 10px "Bahnschrift", sans-serif; }
.metric-value { display: flex; align-items: baseline; gap: 6px; margin: 9px 0 6px; color: var(--ink); }
.metric-value strong { font: 600 27px "Bahnschrift", "Yu Gothic UI", sans-serif; letter-spacing: 0; }
.metric-value > span { color: #818b84; font-size: 11px; }
.metric-value.metric-currency { gap: 1px; }
.metric-currency > span { color: #8b958e; font-size: 15px; }
.metric-currency strong { font-size: 24px; }
.metric-success { margin-left: auto; padding: 4px 7px; border-radius: 4px; color: var(--green-deep) !important; background: var(--green-soft); font-size: 9px !important; }
.metric-foot { display: flex; align-items: center; gap: 6px; color: #818b84; font-size: 9px; }
.metric-dot { width: 6px; height: 6px; border-radius: 50%; }
.green-dot { background: #53a17e; }
.blue-dot { background: #6593ac; }
.amber-dot { background: #c39135; }
.coral-dot { background: #c5755d; }

.content-section { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.account-section { margin-bottom: 16px; }
.full-section { padding: 20px 20px 14px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 18px 12px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { font-size: 15px; }
.section-heading > div > .section-description { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.full-section .section-heading { padding: 0 0 15px; }
.compact-heading { padding-top: 16px; }
.compact-heading .text-button { align-self: center; }
.table-tools { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-top: 1px solid #edf0ec; border-bottom: 1px solid #edf0ec; }
.filter-tabs { display: flex; align-self: stretch; gap: 18px; }
.filter-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 1px; border: 0; color: #778179; background: transparent; font-size: 10px; cursor: pointer; }
.filter-tab.active { color: var(--green-deep); font-weight: 700; }
.filter-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--green); content: ""; }
.filter-tab span { color: #8b948d; font-size: 9px; }
.filter-tab .filter-alert { display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: #8a601a; background: #f8edcf; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.search-field { display: flex; align-items: center; gap: 6px; width: 190px; height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: #869089; background: #fff; }
.search-field:focus-within { border-color: #94b7a4; box-shadow: 0 0 0 2px rgba(63,134,111,.1); }
.search-field svg { width: 14px; height: 14px; }
.search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 9px; }
.search-field input::placeholder { color: #9ba49d; }
#bulkEditButton span, .bulk-edit-copy span { display: grid; min-width: 16px; height: 16px; place-items: center; border-radius: 20px; color: #657269; background: #edf1ed; font-size: 9px; }
.table-scroll { overflow-x: auto; }
.accounts-table, .simple-table { width: 100%; border-collapse: collapse; text-align: left; }
.accounts-table { min-width: 1040px; }
.accounts-table th { height: 35px; padding: 0 9px; color: #8a948d; background: #fafbf9; font-size: 9px; font-weight: 600; white-space: nowrap; }
.accounts-table th:first-child { padding-left: 17px; }
.accounts-table th:nth-child(2) { min-width: 206px; }
.accounts-table th:nth-child(4), .accounts-table th:nth-child(5), .accounts-table th:nth-child(6) { text-align: right; }
.accounts-table td { height: 55px; padding: 6px 9px; border-top: 1px solid #edf0ec; color: #4f5c54; font-size: 10px; vertical-align: middle; }
.accounts-table td:first-child { padding-left: 17px; }
.accounts-table td:nth-child(4), .accounts-table td:nth-child(5), .accounts-table td:nth-child(6) { text-align: right; }
.accounts-table input[type="checkbox"], .modal input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--green); cursor: pointer; }
.owner-row td { height: 42px; padding: 0 14px; border-top: 1px solid var(--line); background: #f8faf7; }
.owner-row-content { display: flex; align-items: center; gap: 9px; }
.owner-toggle { display: grid; width: 20px; height: 20px; place-items: center; padding: 0; border: 0; color: #738077; background: transparent; cursor: pointer; transition: transform .16s ease; }
.owner-toggle svg { width: 12px; height: 12px; }
.owner-row.is-collapsed .owner-toggle { transform: rotate(-90deg); }
.owner-avatar { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 6px; color: #41654f; background: #e3eee6; font-size: 9px; font-weight: 700; }
.owner-name { color: #35443a; font-size: 10px; font-weight: 700; }
.owner-meta { margin-left: 2px; color: #929b94; font-size: 9px; }
.owner-vps { margin-left: auto; color: #828c84; font-size: 9px; }
.owner-vps b { margin-right: 5px; color: #66736a; font-weight: 600; }
.site-cell { display: flex; align-items: center; gap: 9px; }
.site-monogram { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: #496657; background: #f6faf7; font: 700 10px "Bahnschrift", sans-serif; }
.site-monogram.jfx { color: #8a5e38; background: #fbf5ef; }
.site-monogram.bi { color: #4d6f88; background: #f0f6f9; }
.site-copy strong, .site-copy small, .cell-stack strong, .cell-stack small { display: block; }
.site-copy strong { color: #344139; font-size: 10px; font-weight: 650; }
.site-copy small { margin-top: 3px; color: #929b94; font-size: 9px; }
.inline-switch { position: relative; display: inline-block; width: 31px; height: 18px; }
.inline-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: absolute; inset: 0; border-radius: 20px; background: #cbd2cc; cursor: pointer; transition: background .16s ease; }
.switch-track::after { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: transform .16s ease; content: ""; }
.inline-switch input:checked + .switch-track { background: #579476; }
.inline-switch input:checked + .switch-track::after { transform: translateX(13px); }
.inline-switch input:focus-visible + .switch-track { outline: 3px solid rgba(65,132,108,.24); outline-offset: 2px; }
.money-input, .slip-input { height: 28px; border: 1px solid transparent; border-radius: 4px; color: #3f4e44; background: transparent; font: 600 10px "Bahnschrift", "Yu Gothic UI", sans-serif; text-align: right; transition: border .14s ease, background .14s ease; }
.money-input { width: 87px; }
.slip-input { width: 47px; }
.money-input:hover, .slip-input:hover { border-color: #dce4dc; background: #fbfcfa; }
.money-input:focus, .slip-input:focus { border-color: #86ad98; background: white; outline: none; }
.currency-edit { display: inline-flex; align-items: center; gap: 3px; color: #8b948d; font-size: 9px; }
.unit-edit { margin-left: 2px; color: #9aa39c; font-size: 8px; }
.balance-cell strong { color: #35433b; font: 600 10px "Bahnschrift", "Yu Gothic UI", sans-serif; }
.cell-stack small { margin-top: 4px; color: #99a29b; font-size: 8px; }
.connection-stack { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 21px; padding: 0 7px; border-radius: 3px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-online, .status-success { color: #347858; background: #e8f3ec; }
.status-login, .status-attention { color: #966719; background: #fbf2df; }
.status-offline, .status-error { color: #a34f40; background: #f9ece8; }
.status-scheduled { color: #52758c; background: #eaf2f6; }
.last-entry strong { color: #46544c; font: 600 10px "Bahnschrift", "Yu Gothic UI", sans-serif; }
.last-entry small { display: block; max-width: 142px; overflow: hidden; margin-top: 4px; color: #858e87; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.result-success { color: #347858 !important; }
.result-error { color: #ac5847 !important; }
.row-action { display: flex; align-items: center; justify-content: flex-end; gap: 3px; white-space: nowrap; }
.row-icon-button { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid transparent; border-radius: 5px; color: #718078; background: transparent; cursor: pointer; }
.row-icon-button:hover { border-color: var(--line); color: var(--green-deep); background: #f8faf7; }
.row-icon-button svg { width: 14px; height: 14px; }
.row-icon-button:disabled { cursor: wait; opacity: .5; }
.no-results { padding: 30px !important; color: var(--muted) !important; text-align: center !important; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 37px; padding: 0 17px; border-top: 1px solid #edf0ec; color: #8a948d; font-size: 9px; }
.full-section .table-footer { padding: 0; }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .8fr); gap: 16px; }
.signal-list { padding: 0 17px 6px; }
.signal-item { display: flex; align-items: center; gap: 10px; min-height: 54px; border-top: 1px solid #edf0ec; }
.signal-direction { display: grid; width: 41px; height: 22px; place-items: center; border-radius: 3px; font: 700 8px "Bahnschrift", sans-serif; letter-spacing: .3px; }
.direction-low, .low-chip { color: #39775d; background: #e8f3ec; }
.direction-high, .high-chip { color: #a35743; background: #f8ece7; }
.signal-main { display: grid; flex: 1; gap: 4px; min-width: 0; }
.signal-main strong { color: #3e4b43; font-size: 10px; }
.signal-main strong span { margin-left: 4px; color: #858f88; font-size: 9px; font-weight: 400; }
.signal-main small { overflow: hidden; color: #969f98; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.signal-time { color: #7e8981; font: 10px "Bahnschrift", sans-serif; }
.signal-state { min-width: 49px; color: #478069; font-size: 8px; text-align: right; white-space: nowrap; }
.signal-state.state-error { color: #b35f49; }
.health-label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 4px; color: #3b7a5b; background: #e8f3ec; font-size: 9px; }
.health-label i, .health-dot { width: 6px; height: 6px; border-radius: 50%; background: #4c9b70; }
.health-list { padding: 0 17px 12px; }
.health-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 35px; border-top: 1px solid #edf0ec; color: #7f8981; font-size: 9px; }
.health-list strong { display: inline-flex; align-items: center; gap: 6px; color: #526057; font-size: 9px; font-weight: 600; }
.health-list strong small { color: #89938b; font-size: 8px; font-weight: 400; }
.mode-dry { padding: 4px 6px; border: 1px solid #eadab9; border-radius: 3px; color: #896726; background: #fff8e9; font-size: 8px; font-weight: 700; }
.mock-disclaimer { display: flex; align-items: center; gap: 7px; margin: 14px 1px 0; color: #8b948d; font-size: 9px; }
.mock-disclaimer span { display: grid; width: 14px; height: 14px; place-items: center; border: 1px solid #bbc5bc; border-radius: 50%; font: 700 9px Georgia, serif; }

.simple-table { min-width: 690px; }
.simple-table th { height: 38px; padding: 0 12px; border-top: 1px solid #edf0ec; border-bottom: 1px solid #edf0ec; color: #879189; background: #fafbf9; font-size: 9px; font-weight: 600; white-space: nowrap; }
.simple-table td { height: 58px; padding: 8px 12px; border-bottom: 1px solid #edf0ec; color: #536057; font-size: 10px; white-space: nowrap; }
.simple-table tbody tr:last-child td { border-bottom: 0; }
.simple-table td strong { color: #39483f; font-size: 10px; }
.simple-table td small { display: inline-block; margin-left: 4px; color: #8d9790; font-size: 9px; }
.simple-table td:first-child small { display: block; margin: 4px 0 0; }
.pair-badge { color: #435a4b; font: 600 10px "Bahnschrift", sans-serif; }
.direction-chip { display: inline-grid; min-width: 40px; height: 20px; place-items: center; margin: 0 3px; border-radius: 3px; font: 700 8px "Bahnschrift", sans-serif; }
.row-menu { width: 25px; height: 25px; border: 0; border-radius: 4px; color: #7c877f; background: transparent; font-size: 17px; cursor: pointer; }
.row-menu:hover { background: #f1f4f0; }
.source-tag { display: inline-block; padding: 4px 6px; border-radius: 3px; font-size: 8px; font-weight: 600; }
.source-line { color: #53705c; background: #edf4ee; }
.source-schedule { color: #7c6947; background: #f5f1e8; }
.event-list { border-top: 1px solid #edf0ec; }
.event-row { display: grid; grid-template-columns: 12px minmax(160px, 1fr) 76px minmax(125px, auto); align-items: center; gap: 12px; min-height: 62px; padding: 9px 18px; border-bottom: 1px solid #edf0ec; }
.event-marker { width: 8px; height: 8px; border-radius: 50%; }
.event-warn { background: #c79539; box-shadow: 0 0 0 4px #fbf3df; }
.event-good { background: #579474; box-shadow: 0 0 0 4px #eaf3ed; }
.event-neutral { background: #82918a; box-shadow: 0 0 0 4px #edf1ee; }
.event-row strong { color: #405047; font-size: 10px; }
.event-row p { margin: 4px 0 0; color: #89938b; font-size: 9px; }
.event-row time { color: #7d8981; font: 10px "Bahnschrift", sans-serif; }
.event-code { color: #879189; font: 8px "Bahnschrift", sans-serif; text-align: right; }
.settings-section { max-width: 820px; padding: 20px; }
.settings-section .section-heading { padding: 0 0 20px; }
.settings-form fieldset { margin: 0 0 18px; padding: 0; border: 0; }
.settings-form legend { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); color: #4a584f; font-size: 11px; font-weight: 700; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; border-bottom: 1px solid #edf0ec; }
.setting-row > span:first-child { display: grid; gap: 5px; }
.setting-row strong { color: #49574e; font-size: 10px; }
.setting-row small { color: #89938b; font-size: 9px; }
.setting-control { display: inline-flex; align-items: center; gap: 7px; color: #7f8981; }
.setting-control input { width: 68px; height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: #3f4e44; background: white; text-align: right; }
.setting-control b { width: 15px; font-size: 9px; font-weight: 400; }
.setting-static { color: #556259; font-size: 10px; }
.setting-static code { color: #547462; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 6px; }
.form-actions > span { color: #939c95; font-size: 9px; }
.page-footer { display: flex; justify-content: space-between; margin-top: 22px; padding: 12px 1px 0; border-top: 1px solid #e1e6e0; color: #98a19a; font: 8px "Bahnschrift", "Yu Gothic UI", sans-serif; letter-spacing: .5px; }
.page-footer i { display: inline-block; width: 5px; height: 5px; margin: 0 4px 1px; border-radius: 50%; background: #cda65e; }

.modal { width: min(100% - 28px, 450px); max-width: 450px; padding: 0; border: 1px solid #dce3dd; border-radius: 8px; color: var(--ink); background: white; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(25, 38, 32, .38); backdrop-filter: blur(2px); }
.modal form { padding: 20px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-head .eyebrow { margin-bottom: 5px; }
.modal-head h2 { font-size: 17px; }
.close-dialog { margin-top: -5px; font-size: 19px; }
.modal-description { margin: 13px 0 18px; color: #7b867e; font-size: 10px; line-height: 1.7; }
.modal-description span { color: #43554a; font-weight: 700; }
.bulk-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; border-top: 1px solid #edf0ec; }
.bulk-field-label { display: flex; align-items: center; gap: 8px; color: #526057; font-size: 10px; }
.input-with-unit { display: inline-flex; align-items: center; gap: 6px; color: #879189; font-size: 9px; }
.input-with-unit input { width: 95px; height: 31px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: #33433a; text-align: right; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19px; padding-top: 14px; border-top: 1px solid #edf0ec; }
.form-label { display: grid; gap: 6px; margin: 13px 0; color: #5c6960; font-size: 10px; font-weight: 600; }
.form-label input, .form-label select { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; color: #3f4c44; background: white; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast-region { position: fixed; z-index: 12; right: 22px; bottom: 20px; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 230px; max-width: min(360px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid #dbe5dc; border-radius: 6px; color: #3d5145; background: white; box-shadow: var(--shadow); font-size: 10px; animation: toast-in .2s ease both; }
.toast i { width: 7px; height: 7px; border-radius: 50%; background: #579474; }
.toast.toast-warn i { background: #c18a2b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1250px) {
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; }
  .page-wrap { padding-right: 24px; padding-left: 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .metric-grid { gap: 9px; }
  .metric-card { padding-right: 12px; padding-left: 12px; }
  .metric-currency strong { font-size: 20px; }
}
@media (max-width: 980px) {
  .sidebar { width: 64px; padding-right: 8px; padding-left: 8px; }
  .brand { justify-content: center; padding-right: 0; padding-left: 0; }
  .brand-copy, .sidebar-label, .nav-item > span, .sidebar-user > span:not(.avatar) { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item svg { width: 18px; height: 18px; }
  .nav-count { position: absolute; top: 2px; right: 3px; display: grid !important; min-width: 15px; height: 15px; font-size: 8px; }
  .sidebar-user { justify-content: center; margin-right: 0; margin-left: 0; }
  .main-content { margin-left: 64px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 12px; }
  .sidebar { inset: auto 0 0; width: 100%; height: 61px; padding: 5px 8px max(5px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.12); }
  .brand, .sidebar-label, .sidebar-bottom { display: none; }
  .main-nav { display: flex; flex: 1; justify-content: space-around; gap: 2px; }
  .main-nav .nav-item { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; min-height: 48px; padding: 4px 1px; border-radius: 5px; }
  .main-nav .nav-item > span:nth-of-type(1) { display: block; overflow: hidden; max-width: 100%; color: inherit; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .main-nav .nav-item svg { width: 16px; height: 16px; }
  .main-nav .nav-item.active { box-shadow: inset 0 2px #86bb9e; }
  .main-nav .nav-count { top: 0; right: 12%; }
  .main-content { margin-left: 0; padding-bottom: 61px; }
  .topbar { height: 49px; padding: 0 14px; }
  .breadcrumb { font-size: 9px; }
  .topbar-actions { gap: 9px; }
  .demo-pill { padding: 5px 6px; font-size: 8px; }
  .topbar-divider { height: 19px; }
  .clock-label { font-size: 8px; }
  .clock-label strong { font-size: 9px; }
  .topbar-actions .icon-button { display: none; }
  .page-wrap { padding: 22px 13px 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 15px; }
  h1 { font-size: 22px; }
  .page-description { font-size: 10px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; min-height: 34px; font-size: 9px; }
  .notice-strip { align-items: flex-start; gap: 8px; padding: 10px; }
  .notice-strip > div span { line-height: 1.5; }
  .notice-strip .text-button { align-self: center; font-size: 9px; }
  .metric-grid { gap: 8px; margin-bottom: 14px; }
  .metric-card { min-height: 106px; padding: 11px 10px 9px; }
  .metric-top { font-size: 9px; }
  .metric-value { margin: 8px 0 6px; }
  .metric-value strong { font-size: 23px; }
  .metric-currency strong { font-size: 17px; }
  .metric-foot { font-size: 8px; }
  .metric-success { padding: 3px 4px; font-size: 8px !important; }
  .section-heading { padding: 14px 12px 11px; }
  .table-tools { align-items: flex-start; flex-direction: column; padding: 0 12px 9px; }
  .filter-tabs { min-height: 36px; }
  .table-actions { width: 100%; }
  .search-field { flex: 1; width: auto; }
  .button-small { font-size: 9px; }
  .table-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 8px 12px; line-height: 1.5; }
  .lower-grid { gap: 10px; }
  .signal-list { padding-right: 11px; padding-left: 11px; }
  .signal-item { gap: 7px; }
  .signal-time { font-size: 9px; }
  .signal-state { min-width: 42px; font-size: 8px; }
  .full-section { padding: 14px 12px 10px; }
  .full-section .section-heading { align-items: flex-start; }
  .full-section .section-heading .button { min-height: 32px; padding: 0 8px; font-size: 9px; }
  .event-row { grid-template-columns: 10px 1fr 52px; gap: 8px; padding-right: 11px; padding-left: 11px; }
  .event-code { display: none; }
  .settings-section { padding: 15px 12px; }
  .setting-row { gap: 10px; }
  .setting-row strong { font-size: 9px; }
  .setting-row small { max-width: 200px; line-height: 1.5; }
  .toast-region { right: 10px; bottom: 71px; left: 10px; }
  .toast { min-width: 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}