:root {
  --ink: #16211f;
  --ink-soft: #3f4d49;
  --muted: #84908b;
  --line: #e4e9e5;
  --line-strong: #d6ded8;
  --paper: #f5f7f4;
  --card: #fff;
  --deep: #10201b;
  --deep-2: #1a322a;
  --green: #128c59;
  --green-dark: #087047;
  --mint: #e6f4ec;
  --amber: #a76706;
  --amber-bg: #fff4da;
  --red: #b84b45;
  --red-bg: #fceae8;
  --shadow: 0 10px 32px rgba(24, 45, 37, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 236px; padding: 26px 16px 22px; display: flex; flex-direction: column; background: var(--deep); color: #fff; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #f4fbf6; color: var(--deep); font-size: 18px; font-weight: 900; }
.brand strong { display: block; font-size: 16px; letter-spacing: .06em; }
.brand div > span { display: block; margin-top: 3px; color: #8fa19a; font-size: 11px; }
.workspace-label { margin: 0 12px 11px; color: #647871; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.workspace-label span { float: right; color: #a9c8b9; letter-spacing: 0; }
.side-nav { display: grid; gap: 3px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; color: #9eafa7; text-decoration: none; transition: background .16s ease, color .16s ease; }
.nav-link:hover, .nav-link.active { color: #fff; background: var(--deep-2); }
.nav-link.active::before { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: #45c685; content: ""; }
.nav-icon { width: 18px; color: #7e988d; text-align: center; font-size: 16px; }
.nav-link.active .nav-icon { color: #73d6a4; }
.nav-logout { margin-top: 13px; border-top: 1px solid #294038; border-radius: 0; color: #879a91; }
.nav-logout:hover { color: #f0d5d1; background: #2a2726; }
.sidebar-bottom { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid #294038; color: #91a59c; }
.online-state { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #c8ded2; font-size: 12px; }
.online-state i { width: 7px; height: 7px; border-radius: 50%; background: #5add94; box-shadow: 0 0 0 4px rgba(90, 221, 148, .14); }
.sidebar-bottom small { color: #63766e; font-size: 10px; line-height: 1.7; }

.main-content { width: calc(100% - 236px); max-width: 1500px; margin-left: 236px; padding: 31px 48px 34px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 31px; }
.menu-button { display: none; }
.eyebrow { display: block; margin-bottom: 8px; color: #8b9791; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.topbar h1 { max-width: 660px; margin: 0; font-size: clamp(23px, 2.1vw, 31px); line-height: 1.2; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 16px; padding-top: 6px; color: var(--muted); white-space: nowrap; font-size: 12px; }
.last-sync::before { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); content: ""; }
.api-link { padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-soft); text-decoration: none; }
.api-link:hover { border-color: #9dbdac; color: var(--green-dark); }
.api-link span { margin-left: 4px; color: var(--green); }
.logout-link { color: #8d605b; }
.logout-link:hover { border-color: #e4b9b2; color: var(--red); }
.flash { position: fixed; top: 20px; right: 24px; z-index: 80; max-width: min(380px, calc(100vw - 32px)); padding: 11px 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow); color: var(--ink-soft); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
.flash.is-success, .flash.is-error { opacity: 1; pointer-events: auto; transform: translateY(0); }
.flash.is-success { border-color: #bce4cd; color: var(--green-dark); }
.flash.is-error { border-color: #efc3bd; color: var(--red); }

.page-section { margin: 0 0 54px; scroll-margin-top: 22px; }
.overview-section { padding: 27px 30px 30px; border-radius: 13px; background: var(--deep); color: #fff; box-shadow: var(--shadow); }
.overview-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.overview-intro .eyebrow { color: #8fa79b; }
.overview-intro h2 { margin: 0 0 7px; font-size: 23px; letter-spacing: -.02em; }
.overview-intro p { margin: 0; color: #a9bcb3; }
.quick-actions { display: flex; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 13px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 750; white-space: nowrap; transition: background .16s, border-color .16s, color .16s, transform .16s; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: .58; }
.button-dark { background: #f3faf5; color: var(--deep); }
.button-dark:hover { background: #fff; }
.button-light { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.button-light:hover { border-color: #9cb5a7; background: #f7fbf8; }
.overview-section .button-light { border-color: #39574a; background: transparent; color: #d4e6dc; }
.overview-section .button-light:hover { border-color: #6c9c83; background: var(--deep-2); }
.button-outline { border-color: #b9d8c6; background: #f4fbf7; color: var(--green-dark); }
.button-outline:hover { border-color: var(--green); background: var(--mint); }
.button-quiet { border-color: var(--line); background: #fff; color: var(--ink-soft); }
.button-quiet:hover { border-color: #a7beb0; color: var(--green-dark); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric { position: relative; min-height: 116px; padding: 17px 18px; border: 1px solid #dfe8e1; border-radius: 9px; background: #fff; color: var(--ink); overflow: hidden; }
.metric > span { color: #7b8882; font-size: 12px; }
.metric strong { display: block; margin-top: 12px; font-size: 32px; line-height: 1; letter-spacing: -.05em; }
.metric small { display: block; margin-top: 9px; color: #9aa59f; font-size: 11px; }
.metric-primary { border-color: #bfe6cd; background: #f1fbf4; }
.metric-green { border-color: #b9e1cb; background: #dff3e7; }
.metric-mark { position: absolute; right: 16px; bottom: 14px; color: #c5d4cb; font-size: 10px; letter-spacing: .12em; }
.metric-primary .metric-mark, .metric-green .metric-mark { color: #8bc6a2; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.section-tools { display: flex; align-items: center; gap: 10px; }
.result-count { color: #9aa59f; font-size: 11px; }
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.search-box { display: flex; align-items: center; flex: 1; max-width: 400px; height: 37px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #9da9a3; }
.search-box:focus-within { border-color: #8fc2a6; box-shadow: 0 0 0 3px #e4f3e9; }
.search-box span { margin-right: 8px; font-size: 19px; line-height: 1; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.toolbar select, .inline-field input { height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fff; color: var(--ink-soft); font-size: 12px; }
.toolbar select:focus, .inline-field input:focus { border-color: #8fc2a6; }
.table-wrap { border: 1px solid var(--line); border-radius: 9px; background: var(--card); box-shadow: 0 3px 12px rgba(23, 50, 38, .025); overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; }
.data-table th { padding: 12px 15px; border-bottom: 1px solid var(--line); background: #fafcfb; color: #89958f; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 15px; border-bottom: 1px solid #edf1ee; color: var(--ink-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfb; }
.data-table td strong, .data-table td small { display: block; }
.data-table td strong { color: var(--ink); font-weight: 700; }
.data-table td small { margin-top: 3px; color: #9aa59f; font-size: 11px; }
.actions-col { width: 115px; }
.actions { white-space: nowrap; }
.row-action { padding: 3px 5px; border: 0; background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.row-action:hover { color: var(--ink); text-decoration: underline; }
.row-action.danger { color: #b56a63; }
.row-action.danger:hover { color: var(--red); }
.cell-title { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.rock-thumb, .sequence { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: #e4f2e9; color: var(--green-dark); font-weight: 800; }
.sequence { border-radius: 50%; background: #f0f3f0; color: #7e8d84; font-size: 11px; }
.tag, .tag-list { display: inline-block; padding: 4px 7px; border-radius: 4px; background: #f1f5f2; color: #60766a; font-size: 11px; white-space: nowrap; }
.tag-list { max-width: 165px; overflow: hidden; text-overflow: ellipsis; }
.rating { color: #a96b08; font-weight: 750; white-space: nowrap; }
.status-pill { display: inline-block; padding: 4px 8px; border-radius: 4px; background: #f0f3f1; color: #6d7a72; font-size: 11px; white-space: nowrap; }
.status-good { background: var(--mint); color: var(--green-dark); }
.status-warn { background: var(--amber-bg); color: var(--amber); }
.status-muted { background: #f4eeee; color: #91726e; }
.loading-row, .empty-row { height: 90px; color: #99a59f !important; text-align: center; }
.summary-cell { max-width: 255px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.activity-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .65fr); gap: 18px; align-items: start; }
.activity-list { display: grid; gap: 9px; }
.activity-card { display: flex; align-items: stretch; gap: 15px; min-height: 116px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 3px 12px rgba(23, 50, 38, .025); }
.activity-date { flex: 0 0 49px; padding: 3px 13px 0 0; border-right: 1px solid var(--line); text-align: center; }
.activity-date b { display: block; font-size: 24px; line-height: 1; }
.activity-date span { display: block; margin-top: 4px; color: #9ba69f; font-size: 10px; }
.activity-main { flex: 1; min-width: 0; }
.activity-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.activity-title h3 { margin: 0; color: var(--ink); font-size: 16px; }
.activity-main p { margin: 4px 0 11px; color: #6d7d73; font-size: 12px; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 8px 15px; color: #8b9890; font-size: 11px; }
.capacity-track { height: 4px; margin-top: 13px; border-radius: 3px; background: #eef2ef; overflow: hidden; }
.capacity-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.activity-actions { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 3px; }
.side-note { padding: 21px 20px; border-left: 3px solid #a4d6b8; background: #eef8f1; }
.side-note .eyebrow { color: #65a07e; }
.side-note h3 { margin: 0 0 8px; font-size: 17px; }
.side-note p { margin: 0 0 17px; color: #667c6f; line-height: 1.75; font-size: 12px; }
.text-link { padding: 0; border: 0; background: transparent; color: var(--green-dark); font-size: 12px; font-weight: 800; }
.text-link span { margin-left: 5px; }
.loading-card, .empty-card { padding: 34px 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #99a59f; text-align: center; }
.privacy-note { display: flex; align-items: center; gap: 7px; margin: -3px 0 11px; color: #84928a; font-size: 11px; }
.privacy-note span { color: var(--green); font-size: 17px; }
.inline-field { display: flex; align-items: center; gap: 6px; color: #84928a; font-size: 11px; }
.inline-field input { width: 130px; }
.status-select { height: 27px; padding: 2px 6px; border: 1px solid transparent; border-radius: 4px; outline: 0; font-size: 11px; }
.status-select.status-good { border-color: #bce4cd; }
.status-select.status-warn { border-color: #efd9a5; }
.table-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 2px 0; color:#84928a; font-size:11px; }
.table-pagination > div { display:flex; align-items:center; gap:8px; }
.table-pagination .button { min-height:30px; padding:5px 9px; font-size:11px; }
.review-context { margin:0 0 15px; padding:10px 12px; border-radius:6px; background:#f5f8f5; color:#61756a; font-size:12px; }
.review-toggles { display:flex; flex-wrap:wrap; gap:18px; margin-bottom:17px; color:var(--ink-soft); font-size:12px; }
.review-toggles label { display:flex; align-items:center; gap:6px; }
.review-photo-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; color:var(--ink); font-size:12px; }
.review-photo-head .upload-picker { min-height:30px; padding:5px 9px; font-size:11px; }
.review-photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(115px,1fr)); gap:10px; min-height:70px; padding:10px; border:1px dashed var(--line-strong); border-radius:6px; background:#fafcfb; }
.review-photo { position:relative; min-width:0; }
.review-photo a { display:block; }
.review-photo img { display:block; width:100%; height:86px; border:1px solid var(--line); border-radius:5px; object-fit:cover; background:#eef2ef; }
.review-photo .row-action { display:block; margin:3px auto 0; }
.review-empty { align-self:center; color:#98a59e; font-size:11px; }
.route-editor-status.is-dirty { color:var(--amber); font-weight:700; }
.route-editor-status.is-saved { color:var(--green-dark); }

.system-band { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 16px 0 20px; padding: 23px 25px; border: 1px solid #d8e7dc; background: #ebf6ee; }
.system-band h2 { margin: 0 0 7px; font-size: 19px; }
.system-band p { max-width: 630px; margin: 0; color: #688071; font-size: 12px; line-height: 1.75; }
.system-band .eyebrow { color: #5d9974; }
.endpoint-list { display: grid; gap: 6px; min-width: 240px; }
.endpoint-list code { padding: 7px 9px; border: 1px solid #d3e5d9; border-radius: 4px; background: #fff; color: #4f7960; font-size: 11px; }
footer { padding: 2px 0 8px; color: #99a59f; font-size: 11px; }
footer span { margin-left: 13px; color: #b1bbb5; }

.editor-dialog { width: min(730px, calc(100vw - 32px)); max-height: min(850px, calc(100vh - 32px)); padding: 0; border: 0; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px rgba(15, 42, 29, .24); }
.editor-dialog::backdrop { background: rgba(9, 27, 20, .52); }
.editor-dialog form { display: flex; flex-direction: column; max-height: min(850px, calc(100vh - 32px)); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 23px 25px 17px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 21px; }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 5px; background: #f2f5f3; color: #687a70; font-size: 21px; line-height: 1; }
.icon-button:hover { background: #e7eeea; color: var(--ink); }
.dialog-body { padding: 19px 25px 6px; overflow: auto; }
.form-grid-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 15px; }
.field { display: grid; gap: 5px; color: #5a6d62; font-size: 11px; font-weight: 750; }
.field.full { grid-column: 1 / -1; }
.field em { color: var(--red); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 5px; outline: 0; background: #fff; color: var(--ink); font-size: 13px; font-weight: 400; }
.field textarea { min-height: 76px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #84bd9a; box-shadow: 0 0 0 3px #e8f5ec; }
.dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 15px 25px 20px; border-top: 1px solid var(--line); }
.form-message { flex: 1; color: var(--red); font-size: 11px; }

.route-editor-field { grid-column: 1 / -1; margin-top: 5px; padding: 15px; border: 1px solid #dce8df; border-radius: 8px; background: #f7fbf8; }
.route-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.route-editor-head strong { display: block; color: var(--ink); font-size: 13px; }
.route-editor-head small { display: block; max-width: 520px; margin-top: 4px; color: #788a80; font-size: 11px; font-weight: 400; line-height: 1.6; }
.route-editor-head > span { flex: 0 0 auto; padding: 4px 8px; border-radius: 4px; background: #e4f3e9; color: var(--green-dark); font-size: 11px; white-space: nowrap; }
.route-editor-toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 9px; }
.route-editor-toolbar .button { min-height: 31px; padding: 6px 9px; font-size: 11px; }
.route-editor-toolbar .button:focus { border-color: #72ad89; background: #e8f5ec; box-shadow: 0 0 0 2px rgba(114, 173, 137, .16); }
.route-draw-map { position: relative; width: 100%; height: 320px; min-height: 0; border: 1px solid #d9e4dc; border-radius: 6px; background: #e7efe8; overflow: hidden; }
.route-point-editor { margin-top: 10px; padding-top: 10px; border-top: 1px solid #dce8df; }
.route-point-editor-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.route-point-editor-head strong { color: var(--ink); font-size: 11px; }
.route-point-editor-head small, .route-point-empty { color: #788a80; font-size: 10px; font-weight: 400; line-height: 1.5; }
.route-point-list { display: grid; gap: 6px; max-height: 190px; overflow: auto; padding-right: 2px; }
.route-point-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.route-point-index { align-self: center; color: #61756a; font-size: 10px; font-weight: 700; white-space: nowrap; }
.route-point-row label { display: grid; gap: 3px; color: #73857b; font-size: 9px; font-weight: 700; }
.route-point-row input { width: 100%; height: 29px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; outline: 0; background: #fff; color: var(--ink); font: inherit; font-size: 11px; font-weight: 500; }
.route-point-row input:focus { border-color: #84bd9a; box-shadow: 0 0 0 2px #e8f5ec; }
.route-point-remove { height: 29px; padding: 0 7px; border: 1px solid #e3c9c9; border-radius: 4px; background: #fff; color: #a45a5a; cursor: pointer; font-size: 10px; }
.route-point-remove:hover { border-color: #c88f8f; background: #fff7f7; }
.route-editor-status { margin-top: 7px; color: #75877d; font-size: 11px; }
.route-editor-status.is-error { color: var(--red); }
.upload-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 10px; }
.upload-picker { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 11px; border: 1px dashed #9fc7ad; border-radius: 5px; background: #f5fbf7; color: var(--green-dark); cursor: pointer; font-size: 12px; font-weight: 700; }
.upload-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-preview { grid-column: 1 / -1; width: 100%; max-height: 130px; border: 1px solid var(--line); border-radius: 5px; object-fit: cover; background: #f2f5f3; }
.upload-status { grid-column: 1 / -1; color: #87958d; font-size: 10px; font-weight: 400; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--deep); }
.login-card { width: min(420px, 100%); padding: 34px; border: 1px solid #2c493c; border-radius: 12px; background: #f8fbf8; box-shadow: 0 24px 80px rgba(0, 0, 0, .22); }
.login-mark { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 27px; border-radius: 12px; background: var(--deep); color: #eaf8ef; font-size: 23px; font-weight: 900; }
.login-card h1 { margin: 0 0 9px; color: var(--ink); font-size: 25px; letter-spacing: -.03em; }
.login-card p { margin: 0 0 24px; color: #748179; font-size: 13px; line-height: 1.7; }
.login-card form { display: grid; gap: 8px; }
.login-card label { color: #53665b; font-size: 12px; font-weight: 750; }
.login-card input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 6px; outline: 0; background: #fff; color: var(--ink); }
.login-card input:focus { border-color: #84bd9a; box-shadow: 0 0 0 3px #e8f5ec; }
.button-login { width: 100%; margin-top: 9px; background: var(--deep); color: #f4fbf6; }
.button-login:hover { background: var(--deep-2); }
.button-login span { color: #7bd5a5; }
.login-error { margin: -6px 0 15px; padding: 9px 11px; border: 1px solid #efc3bd; border-radius: 5px; background: var(--red-bg); color: var(--red); font-size: 12px; }
.login-home { display: block; margin-top: 22px; color: #7c8b82; font-size: 11px; text-align: center; text-decoration: none; }
.login-home:hover { color: var(--green-dark); }

@media (max-width: 1120px) {
  .main-content { padding: 27px 28px 30px; }
  .sidebar { width: 210px; }
  .main-content { width: calc(100% - 210px); margin-left: 210px; }
  .activity-layout { grid-template-columns: 1fr; }
  .side-note { border-left: 0; border-top: 3px solid #a4d6b8; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 16px 0 35px rgba(0, 0, 0, .13); }
  .sidebar.is-open { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; padding: 19px 15px 27px; }
  .topbar { align-items: center; gap: 11px; margin-bottom: 23px; }
  .menu-button { display: grid; flex: 0 0 35px; width: 35px; height: 35px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 18px; }
  .topbar-copy { flex: 1; min-width: 0; }
  .topbar h1 { font-size: 21px; }
  .topbar-actions { display: none; }
  .overview-section { padding: 20px 17px 18px; }
  .overview-intro { display: block; margin-bottom: 20px; }
  .overview-intro h2 { font-size: 20px; }
  .overview-intro p { font-size: 12px; }
  .quick-actions { margin-top: 15px; }
  .quick-actions .button { flex: 1; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { min-height: 106px; padding: 13px; }
  .metric strong { margin-top: 10px; font-size: 27px; }
  .page-section { margin-bottom: 40px; scroll-margin-top: 14px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 11px; }
  .section-tools { width: 100%; justify-content: flex-start; }
  .section-tools .button-outline { margin-left: auto; }
  .toolbar { flex-wrap: wrap; }
  .search-box { flex: 1 0 100%; max-width: none; }
  .toolbar select { flex: 1; }
  .activity-card { gap: 10px; padding: 13px; }
  .activity-date { flex-basis: 41px; padding-right: 9px; }
  .activity-date b { font-size: 20px; }
  .activity-title h3 { font-size: 14px; }
  .activity-meta { gap: 5px 9px; }
  .activity-actions { display: flex; flex-direction: row; align-self: flex-start; gap: 2px; }
  .activity-actions .row-action { padding: 3px 2px; font-size: 10px; }
  .system-band { display: block; padding: 19px; }
  .endpoint-list { margin-top: 16px; min-width: 0; }
  .inline-field { flex: 1; }
  .inline-field input { width: 100%; min-width: 0; }
  .form-grid-editor { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .route-editor-field { grid-column: auto; }
  .route-draw-map { height: 260px; }
  .route-editor-head { display: block; }
  .route-editor-head > span { display: inline-block; margin-top: 8px; }
  .route-point-editor-head { display: block; }
  .route-point-editor-head small { display: block; margin-top: 3px; }
  .route-point-row { grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 5px; }
  .route-point-row input { padding-left: 5px; padding-right: 5px; font-size: 10px; }
  .route-point-remove { padding-left: 5px; padding-right: 5px; }
  .upload-field { grid-template-columns: 1fr; }
  .upload-picker { width: 100%; }
  .dialog-head, .dialog-body, .dialog-foot { padding-left: 17px; padding-right: 17px; }
}
@media (max-width: 420px) {
  .section-tools { gap: 6px; }
  .result-count { font-size: 10px; }
  .button { padding-left: 10px; padding-right: 10px; }
  .quick-actions .button { font-size: 11px; }
  .data-table { min-width: 680px; }
}
