:root {
  color-scheme: light;
  --ink: #202722;
  --muted: #737d75;
  --line: #e4e9e4;
  --paper: #ffffff;
  --canvas: #f3f5f2;
  --sidebar: #17231d;
  --sidebar-soft: #26352c;
  --lime: #c5e74c;
  --lime-soft: #f0f7d7;
  --orange: #e56b39;
  --orange-soft: #fff0e9;
  --blue: #527d91;
  --blue-soft: #eaf2f5;
  --red: #c45147;
  --red-soft: #fff0ee;
  --green: #2b754b;
  --green-soft: #e7f3ea;
  --shadow: 0 12px 34px rgba(20, 37, 26, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 20; inset: 0 auto 0 0; width: 236px; display: flex; flex-direction: column;
  padding: 24px 14px 16px; background: var(--sidebar); color: #f5f8f4;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 25px; }
.brand-mark { position: relative; width: 38px; height: 38px; border-radius: 10px; background: var(--lime); display: grid; place-items: center; color: #17231d; font-weight: 900; font-size: 20px; overflow: hidden; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 2px solid currentColor; border-radius: 50%; width: 15px; height: 15px; top: 10px; }
.brand-mark::before { left: 6px; }
.brand-mark::after { right: 6px; }
.brand-mark span { position: relative; z-index: 1; font-size: 11px; font-weight: 900; background: var(--lime); padding: 1px; }
.brand-name { font-size: 17px; font-weight: 760; letter-spacing: 0; line-height: 1.2; }
.brand-caption { margin-top: 4px; color: #a4b2a7; font-size: 11px; }
.nav-label { padding: 14px 11px 8px; color: #819187; font-size: 10px; font-weight: 700; }
.nav-list { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: #c9d2cb; text-align: left; transition: background .16s, color .16s; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: var(--sidebar-soft); color: #fff; box-shadow: inset 3px 0 var(--lime); }
.nav-icon { width: 19px; text-align: center; color: #98a79c; font-size: 17px; line-height: 1; }
.nav-link.active .nav-icon { color: var(--lime); }
.sidebar-spacer { flex: 1; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 13px 9px 2px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #34473a; color: var(--lime); font-weight: 750; }
.sidebar-user-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.sidebar-role { display: block; margin-top: 3px; color: #9aa99e; font-size: 10px; }
.sidebar-logout { width: 32px; height: 32px; border: 0; border-radius: 5px; background: transparent; color: #bac4bc; font-size: 17px; }
.sidebar-logout:hover { background: rgba(255,255,255,.1); color: #fff; }
.workspace { min-height: 100vh; margin-left: 236px; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 0 32px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.breadcrumb { color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.month-control { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.month-control .month-select { min-height: 36px; }
.search-box { position: relative; width: min(260px, 30vw); }
.search-box input { width: 100%; height: 36px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: #f8faf8; color: var(--ink); }
.search-box input:focus { border-color: #92aa79; box-shadow: 0 0 0 3px rgba(197,231,76,.2); }
.search-glyph { position: absolute; left: 11px; top: 9px; color: #87938a; font-size: 15px; }
.main { max-width: 1560px; margin: 0 auto; padding: 29px 32px 48px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 0 0 22px; }
.page-heading h1 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 740; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.monthly-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: -5px 0 16px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.55); }
.monthly-metric { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 8px; min-width: 0; padding: 1px 14px; border-right: 1px solid var(--line); }
.monthly-metric:nth-child(4n) { border-right: 0; }
.monthly-metric:nth-child(n + 5) { margin-top: 9px; }
.monthly-metric span { color: var(--muted); font-size: 11px; }
.monthly-metric strong { justify-self: end; overflow-wrap: anywhere; font-size: 13px; font-variant-numeric: tabular-nums; }
.monthly-metric small { grid-column: 2; justify-self: end; color: var(--muted); font-size: 10px; }
.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-weight: 650; color: var(--ink); background: #fff; transition: transform .12s, background .12s, border-color .12s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.button-primary { background: var(--sidebar); color: #fff; }
.button-primary:hover { background: #26372c; }
.button-accent { background: var(--lime); color: #17231d; }
.button-accent:hover { background: #b9de38; }
.button-secondary { border-color: var(--line); background: #fff; }
.button-secondary:hover { border-color: #b7c0b8; background: #f9fbf8; }
.button-danger { border-color: #f0cbc7; background: var(--red-soft); color: #a73e36; }
.button-small { min-height: 30px; padding: 0 9px; font-size: 12px; }
.icon-command { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #526057; font-size: 15px; }
.icon-command:hover { background: #f6f8f5; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { min-width: 0; padding: 17px 18px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; font-size: 14px; font-weight: 700; }
.tone-orange { color: #bd562e; background: var(--orange-soft); }
.tone-green { color: #286a44; background: var(--green-soft); }
.tone-blue { color: #416b80; background: var(--blue-soft); }
.tone-lime { color: #4e6820; background: var(--lime-soft); }
.stat-value { margin-top: 12px; font-size: 24px; line-height: 1.2; font-weight: 750; letter-spacing: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-foot { margin-top: 6px; color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .9fr); gap: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.panel + .panel { margin-top: 14px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 13px; border-bottom: 1px solid #edf0ed; }
.panel-title { margin: 0; font-size: 14px; font-weight: 700; }
.panel-caption { margin-top: 4px; color: var(--muted); font-size: 11px; }
.panel-body { padding: 16px 18px; }
.month-select { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); }
.chart { display: grid; grid-template-columns: 34px 1fr; gap: 10px; height: 192px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0 20px; color: #909a91; font-size: 10px; text-align: right; }
.chart-plot { position: relative; display: flex; align-items: end; justify-content: space-around; gap: 13px; padding: 7px 8px 23px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 46px, #edf0ed 47px, transparent 48px); }
.chart-group { display: flex; align-items: end; justify-content: center; gap: 3px; width: 100%; height: 100%; position: relative; }
.chart-bar { min-width: 7px; max-width: 18px; width: 26%; min-height: 3px; border-radius: 3px 3px 0 0; }
.chart-bar.sales { background: var(--orange); }
.chart-bar.purchase { background: #829eac; }
.chart-bar.profit { background: #abd343; }
.chart-month { position: absolute; bottom: -19px; color: #758077; font-size: 10px; white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.account-list { display: grid; gap: 0; }
.account-row { display: grid; grid-template-columns: minmax(75px, 1fr) minmax(95px, 1.1fr) minmax(76px, .8fr); align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eef1ee; }
.account-row:last-child { border-bottom: 0; }
.account-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 650; }
.account-swatch { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); }
.account-value { text-align: right; font-size: 12px; font-weight: 680; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-movement { color: var(--muted); text-align: right; font-size: 10px; line-height: 1.55; }
.list-table { width: 100%; border-collapse: collapse; }
.list-table th { padding: 10px 12px; color: #78837b; background: #f8faf8; font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; }
.list-table td { padding: 12px; border-top: 1px solid #edf0ed; vertical-align: middle; }
.list-table tbody tr:hover { background: #fbfcfb; }
.table-wrap { overflow: auto; }
.vehicle-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.vehicle-thumb { flex: none; position: relative; width: 43px; height: 34px; border-radius: 5px; background: #eef2ec; overflow: hidden; }
.bike-wheel { position: absolute; bottom: 5px; width: 11px; height: 11px; border: 2px solid #536358; border-radius: 50%; }
.bike-wheel.left { left: 6px; }
.bike-wheel.right { right: 5px; }
.bike-frame { position: absolute; left: 12px; bottom: 9px; width: 20px; height: 10px; border-bottom: 2px solid var(--orange); border-left: 2px solid var(--orange); transform: skew(-27deg); }
.bike-tank { position: absolute; left: 17px; bottom: 15px; width: 12px; height: 5px; border-radius: 4px 5px 2px 2px; background: var(--orange); transform: rotate(-10deg); }
.vehicle-main { font-weight: 680; }
.vehicle-sub { margin-top: 4px; color: var(--muted); font-size: 10px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-positive { color: var(--green); }
.money-negative { color: #a34b40; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; font-size: 10px; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-stock { color: #476c25; background: var(--lime-soft); }
.status-sold { color: #416d82; background: var(--blue-soft); }
.status-due { color: #ad543a; background: var(--orange-soft); }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; }
.table-action { border: 0; background: transparent; color: #527060; font-weight: 650; font-size: 11px; padding: 5px; white-space: nowrap; }
.table-action:hover { color: #1f5a36; text-decoration: underline; }
.table-action.danger { color: #ae4d45; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-input, .filter-select { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); outline: none; }
.filter-input { width: min(260px, 55vw); }
.filter-input:focus, .filter-select:focus { border-color: #91a77b; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf8; }
.segment { min-height: 27px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 11px; }
.segment.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 680; }
.empty-state { display: grid; place-items: center; min-height: 180px; padding: 24px; color: var(--muted); text-align: center; }
.empty-bike { position: relative; width: 84px; height: 52px; margin-bottom: 12px; opacity: .62; transform: scale(1.25); }
.empty-bike .bike-wheel { width: 18px; height: 18px; bottom: 3px; }
.empty-bike .bike-wheel.left { left: 6px; }
.empty-bike .bike-wheel.right { right: 7px; }
.empty-bike .bike-frame { left: 21px; bottom: 10px; width: 42px; height: 18px; }
.empty-bike .bike-tank { left: 35px; bottom: 26px; width: 21px; height: 9px; }
.empty-title { color: var(--ink); font-weight: 680; }
.empty-copy { margin-top: 5px; font-size: 11px; }
.split-summary { display: flex; flex-wrap: wrap; gap: 18px; padding: 13px 18px; color: var(--muted); font-size: 11px; border-top: 1px solid #edf0ed; }
.split-summary strong { margin-left: 5px; color: var(--ink); font-size: 12px; }
.setting-list { display: grid; }
.setting-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) repeat(3, minmax(95px, .8fr)) auto; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #edf0ed; }
.setting-row:last-child { border-bottom: 0; }
.setting-title { font-weight: 680; }
.setting-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.metric-label { display: block; color: var(--muted); font-size: 10px; }
.metric-value { display: block; margin-top: 4px; font-size: 12px; font-weight: 680; font-variant-numeric: tabular-nums; }
.helper-line { color: var(--muted); font-size: 11px; line-height: 1.6; }
.page-tabs { display: flex; gap: 18px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.page-tab { position: relative; min-height: 42px; padding: 0 2px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.page-tab.active { color: var(--ink); font-weight: 700; }
.page-tab.active::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--orange); }
.account-total { display: flex; align-items: baseline; gap: 8px; padding: 16px 18px; background: #f9fbf8; border-bottom: 1px solid var(--line); }
.account-total-label { color: var(--muted); font-size: 11px; }
.account-total-value { font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; }
.period-note { margin-left: auto; color: var(--muted); font-size: 10px; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(13, 24, 17, .48); }
.modal { display: flex; flex-direction: column; width: min(600px, 100%); max-height: min(92vh, 880px); overflow: hidden; border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.modal.wide { width: min(820px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-size: 16px; font-weight: 720; }
.modal-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-close { width: 30px; height: 30px; border: 0; border-radius: 5px; background: #f4f6f4; color: #536057; font-size: 18px; }
.modal-body { overflow: auto; padding: 18px 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: #fbfcfb; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 14px; }
.form-field { min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-label { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; color: #4d5951; font-size: 11px; font-weight: 650; }
.required-mark { color: var(--orange); }
.form-control { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #dce3dc; border-radius: 5px; outline: none; background: #fff; color: var(--ink); }
.form-control:focus { border-color: #8ba273; box-shadow: 0 0 0 3px rgba(197,231,76,.2); }
textarea.form-control { min-height: 76px; resize: vertical; }
.form-note { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-section { grid-column: 1 / -1; padding: 11px 0 0; border-top: 1px solid #edf0ed; color: #56625a; font-size: 11px; font-weight: 700; }
.detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 20px; background: #f8faf8; border-bottom: 1px solid var(--line); }
.detail-model { font-size: 18px; font-weight: 740; }
.detail-plate { margin-top: 5px; color: var(--muted); font-size: 11px; }
.detail-profit { text-align: right; }
.detail-profit-label { color: var(--muted); font-size: 10px; }
.detail-profit-value { margin-top: 4px; font-size: 19px; font-weight: 730; font-variant-numeric: tabular-nums; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 17px 20px; }
.detail-item-label { color: var(--muted); font-size: 10px; }
.detail-item-value { margin-top: 4px; font-weight: 650; overflow-wrap: anywhere; }
.modal-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; font-size: 12px; font-weight: 720; }
.modal-section { padding: 15px 20px; border-top: 1px solid var(--line); }
.detail-list { display: grid; gap: 8px; margin-top: 10px; }
.detail-line { display: grid; grid-template-columns: 1.3fr .8fr .8fr auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf0ed; font-size: 11px; }
.detail-line:last-child { border-bottom: 0; }
.toast-root { position: fixed; z-index: 100; top: 18px; right: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: min(360px, calc(100vw - 36px)); padding: 11px 14px; border: 1px solid #cce0ce; border-radius: 5px; background: #f3fbf4; color: #285f39; box-shadow: var(--shadow); animation: toast-in .16s ease-out; }
.toast.error { border-color: #e9c7c3; background: #fff5f4; color: #963d36; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); background: var(--sidebar); }
.login-brand-panel { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 42px; color: #eef4ec; background: var(--sidebar); }
.login-brand-panel .brand { padding: 0; }
.login-brand-panel .brand-mark { width: 44px; height: 44px; }
.login-copy { max-width: 420px; margin: 0 auto; padding: 38px 0; }
.login-copy h1 { margin: 0; font-size: 28px; line-height: 1.3; }
.login-copy p { max-width: 340px; margin-top: 13px; color: #b1beb4; line-height: 1.75; }
.login-bike { position: relative; width: 300px; height: 150px; margin-top: 36px; border-bottom: 1px solid #415448; opacity: .95; }
.login-bike .bike-wheel { bottom: 13px; width: 52px; height: 52px; border-width: 4px; border-color: #b7cf92; }
.login-bike .bike-wheel.left { left: 28px; }
.login-bike .bike-wheel.right { right: 27px; }
.login-bike .bike-frame { left: 83px; bottom: 40px; width: 144px; height: 54px; border-bottom-width: 4px; border-left-width: 4px; border-color: var(--orange); }
.login-bike .bike-tank { left: 135px; bottom: 82px; width: 60px; height: 25px; border-radius: 12px 17px 6px 8px; background: var(--orange); }
.login-bike::before { content: ""; position: absolute; left: 85px; bottom: 97px; width: 68px; height: 5px; border-radius: 4px; background: #b7cf92; transform: rotate(-7deg); }
.login-bike::after { content: ""; position: absolute; right: 20px; bottom: 68px; width: 63px; height: 5px; border-radius: 4px; background: #b7cf92; transform: rotate(72deg); transform-origin: right; }
.login-panel { display: grid; place-items: center; padding: 28px; background: #f3f5f2; }
.login-card { width: min(410px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 12px 30px rgba(20,37,26,.07); }
.login-card h2 { margin: 0; font-size: 20px; }
.login-card > p { margin: 7px 0 22px; color: var(--muted); font-size: 12px; }
.login-fields { display: grid; gap: 14px; }
.login-card .button { width: 100%; margin-top: 8px; min-height: 40px; }
.login-lock { margin-top: 17px; color: var(--muted); font-size: 10px; text-align: center; }
.permission-tag { padding: 4px 7px; border-radius: 4px; color: #3d6b4a; background: var(--green-soft); font-size: 10px; font-weight: 680; }
.permission-tag.admin { color: #9a4a2d; background: var(--orange-soft); }
.mobile-header { display: none; }
.hidden { display: none !important; }

@media (max-width: 1120px) {
  .sidebar { width: 210px; }
  .workspace { margin-left: 210px; }
  .main { padding: 24px 22px 38px; }
  .topbar { padding: 0 22px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(270px, .9fr); }
  .setting-row { grid-template-columns: minmax(130px, 1.1fr) repeat(2, minmax(95px, .8fr)) auto; }
  .setting-row .setting-extra { display: none; }
  .monthly-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .monthly-metric:nth-child(3n) { border-right: 0; }
  .monthly-metric:nth-child(4n) { border-right: 1px solid var(--line); }
  .monthly-metric:nth-child(n + 4) { margin-top: 9px; }
}
@media (max-width: 960px) {
  .breadcrumb { display: none; }
  .topbar-right { flex: 1; }
  .search-box { flex: 1 1 220px; min-width: 130px; }
}
@media (max-width: 760px) {
  body { font-size: 13px; }
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; padding: 9px 10px 8px; }
  .brand { padding: 0 5px 9px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-mark::before, .brand-mark::after { width: 12px; height: 12px; top: 9px; }
  .brand-mark::before { left: 5px; }
  .brand-mark::after { right: 5px; }
  .brand-mark span { font-size: 9px; }
  .brand-name { font-size: 15px; }
  .brand-caption, .nav-label, .sidebar-user, .sidebar-spacer { display: none; }
  .nav-list { display: flex; overflow-x: auto; gap: 3px; padding: 0 1px 1px; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; min-height: 36px; width: auto; gap: 6px; padding: 0 9px; font-size: 11px; white-space: nowrap; }
  .nav-icon { width: auto; font-size: 14px; }
  .nav-link.active { box-shadow: inset 0 -2px var(--lime); }
  .workspace { min-height: calc(100vh - 85px); margin-left: 0; }
  .topbar { min-height: 53px; padding: 0 14px; }
  .breadcrumb { display: none; }
  .topbar-right { width: 100%; justify-content: flex-end; }
  .month-control > span { display: none; }
  .month-control .month-select { width: 138px; min-height: 34px; }
  .search-box { flex: 1; width: auto; }
  .search-box input { height: 34px; }
  .main { padding: 20px 14px 36px; }
  .page-heading { align-items: flex-start; margin-bottom: 16px; }
  .page-heading h1 { font-size: 19px; }
  .page-heading p { max-width: 55vw; font-size: 11px; }
  .heading-actions { gap: 6px; }
  .heading-actions .button { min-height: 33px; padding: 0 9px; font-size: 11px; }
  .stats-grid { gap: 8px; margin-bottom: 10px; }
  .monthly-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; padding: 8px 0; }
  .monthly-metric { padding: 7px 10px; border-right: 1px solid var(--line); }
  .monthly-metric:nth-child(3n) { border-right: 1px solid var(--line); }
  .monthly-metric:nth-child(even) { border-right: 0; }
  .monthly-metric:nth-child(n + 3) { margin-top: 0; }
  .stat { padding: 13px 12px; }
  .stat-label { font-size: 10px; }
  .stat-icon { width: 25px; height: 25px; }
  .stat-value { margin-top: 10px; font-size: 20px; }
  .stat-foot { font-size: 10px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .panel + .panel { margin-top: 10px; }
  .panel-header { padding: 13px 14px 11px; }
  .panel-body { padding: 13px 14px; }
  .chart { height: 165px; }
  .account-row { grid-template-columns: minmax(67px, .8fr) minmax(90px, 1fr) minmax(70px, .8fr); gap: 7px; }
  .filter-row { align-items: flex-start; flex-direction: column; padding: 10px 12px; }
  .filter-controls { width: 100%; }
  .filter-input { width: 100%; }
  .filter-row > .button { align-self: flex-end; }
  .table-wrap { margin: 0 -1px; }
  .list-table th { padding: 9px 10px; }
  .list-table td { padding: 10px; }
  .setting-row { grid-template-columns: minmax(110px, 1fr) minmax(85px, .7fr) minmax(85px, .7fr); gap: 9px; padding: 12px; }
  .setting-row > :nth-child(4) { display: none; }
  .setting-row > .heading-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .account-total { padding: 13px 14px; }
  .account-total-value { font-size: 18px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 94dvh; border-radius: 9px 9px 0 0; }
  .modal-header { padding: 15px 16px 12px; }
  .modal-body { padding: 15px 16px; }
  .modal-footer { padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); }
  .form-grid { gap: 11px 10px; }
  .form-control { min-height: 40px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 15px 16px; }
  .modal-section { padding: 14px 16px; }
  .login-screen { display: block; background: #f3f5f2; }
  .login-brand-panel { min-height: auto; padding: 22px 20px 10px; }
  .login-copy { width: 100%; padding: 24px 0 17px; }
  .login-copy h1 { font-size: 23px; }
  .login-copy p { margin-top: 7px; font-size: 12px; }
  .login-bike { display: none; }
  .login-brand-panel > .helper-line { display: none; }
  .login-panel { min-height: calc(100vh - 173px); align-items: start; padding: 10px 16px 28px; }
  .login-card { padding: 23px 20px; }
}
@media (max-width: 430px) {
  .topbar-right { gap: 6px; }
  .month-control .month-select { width: 126px; padding: 0 5px; font-size: 11px; }
  .topbar-right > .button { width: 35px; min-width: 35px; padding: 0; font-size: 0; }
  .topbar-right > .button::first-letter { font-size: 15px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-value { font-size: 18px; }
  .page-heading { gap: 8px; }
  .heading-actions .button span.optional-label { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full, .form-section { grid-column: 1; }
  .segmented { max-width: 100%; }
  .segment { padding: 0 7px; }
}
