:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #dfe5ee;
  --line-strong: #c8d2df;
  --text: #1d2733;
  --muted: #657386;
  --primary: #1267b3;
  --primary-dark: #0b4d87;
  --primary-soft: #e6f1fb;
  --green: #198754;
  --amber: #a16207;
  --red: #c2413a;
  --ink: #263340;
  --shadow: 0 18px 45px rgba(40, 55, 75, 0.12);
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

/* 2026-08-25 usability fixes: removable pending files and a stable desktop rail. */
.pending-file-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.pending-file-list[hidden] { display: none; }
.pending-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid #d9e3ed;
  border-radius: 9px;
  background: #f5f9fd;
}
.pending-file-item span { min-width: 0; }
.pending-file-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-file-item small { display: block; margin-top: 3px; color: var(--muted); }
.pending-file-item button { flex: 0 0 auto; padding: 6px 11px; border: 1px solid #e2b8b4; border-radius: 7px; background: #fff; color: #a33d35; }

@media (min-width: 821px) {
  .application-workspace .app-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: 272px;
    height: 100dvh;
    overflow-y: auto;
    z-index: 60;
  }
  .application-workspace .workspace-main { grid-column: 2 / 3; }
}
@media (min-width: 821px) and (max-width: 1180px) {
  .application-workspace .app-rail { width: 230px; }
}

@media (max-width: 820px) {
  .native-app .monthly-task-table,
  .native-app .monthly-task-table tbody,
  .native-app .monthly-task-table tr,
  .native-app .monthly-task-table td {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
  .native-app .monthly-task-table td:empty { display: none; }
  .native-app .monthly-task-table td::before { min-width: 0; }
  .native-app .monthly-task-table + * { clear: both; }
  .native-app .resizable-table-wrap:has(.monthly-task-table) { overflow: visible; border: 0; }
}

.power-ledger-shell { margin-bottom: 18px; border: 1px solid #c9d9f2; }
.power-ledger-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.power-ledger-tabs button { white-space: nowrap; }
.power-error, .power-notice { padding: 14px 16px; border-radius: 10px; background: #fff5f3; color: #9b2c23; margin: 12px 0; }
.power-notice { background: #eef6ff; color: #244f7d; }
.power-status { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: #eef2f7; font-size: 12px; }
.power-status-approved, .power-status-confirmed, .power-status-running { background: #e8f7ee; color: #167444; }
.power-status-rejected, .power-status-reversed { background: #fff0f0; color: #a72b2b; }
.power-status-pending_review, .power-status-pending_finance, .power-status-pending_confirmation { background: #fff5dc; color: #8a5a00; }
.power-inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 12px; margin: 12px 0; background: #f7f9fc; border-radius: 10px; }
.power-inline-form label { min-width: 150px; flex: 1; }
.power-inline-form label span { display: block; margin-bottom: 5px; color: #536175; font-size: 12px; }
.power-command-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 12px; }
.power-row-card { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid #e6ebf2; }
.power-audit-view { display:grid; gap:18px; }
.power-audit-filter { display:grid; grid-template-columns:minmax(220px,1.2fr) minmax(180px,1fr) minmax(180px,1fr) auto; align-items:end; gap:14px; padding:18px; border:1px solid #ddd9d0; border-radius:12px; background:#f6f5f0; }
.power-audit-filter label>span { display:block; margin-bottom:6px; color:#40556a; font-size:13px; font-weight:700; }
.power-audit-filter select,.power-audit-filter input { width:100%; min-height:44px; padding:10px 12px; border:1px solid #cfd8e2; border-radius:8px; background:#fff; }
.power-audit-list { display:grid; gap:12px; }
.power-audit-card { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border:1px solid #e1e6ec; border-radius:12px; background:#fff; box-shadow:0 3px 12px rgba(17,48,77,.04); }
.power-audit-card-main { display:grid; grid-template-columns:minmax(220px,1fr) minmax(170px,.7fr) minmax(230px,.8fr); align-items:center; gap:20px; min-width:0; }
.power-audit-card-main strong { color:#173a59; font-size:16px; }
.power-audit-card-main span,.power-audit-seq { color:#5e7081; font-size:14px; }
.power-audit-seq { flex:none; padding:6px 10px; border-radius:999px; background:#eef5fc; color:#27689f; }
.power-finance-history { margin:22px 0; padding:20px; border:1px solid #e1e6ec; border-radius:14px; background:#fbfcfd; }
.power-self-warning { color: var(--red); font-size: 12px; margin: 6px 0 0; }
.power-detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.power-detail-sections { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 12px; margin-top: 14px; }
.power-detail-sections section { padding: 12px; background: #f7f9fc; border-radius: 10px; overflow: auto; }
.power-detail-sections pre { white-space: pre-wrap; font-size: 12px; }
.power-page-head { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:8px 4px 22px; }
.power-page-head h2 { margin:4px 0 8px; font-size:28px; color:#183b5b; }
.power-page-head p { margin:0; color:var(--muted); }
.power-eyebrow { color:#1673cf; font-size:12px; font-weight:800; letter-spacing:.14em; }
.power-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.power-summary-grid>div { padding:18px; border:1px solid #e2e8f0; border-radius:14px; background:linear-gradient(145deg,#fff,#f8fbff); }
.power-summary-grid span,.power-summary-grid small { display:block; color:var(--muted); font-size:13px; }
.power-summary-grid strong { display:inline-block; margin-top:8px; font-size:24px; color:#173a59; }
.power-list-tools { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:18px 0 12px; }
.power-search { display:flex; gap:8px; flex-wrap:wrap; }
.power-search input,.power-search select { min-width:180px; padding:10px 12px; border:1px solid var(--line-strong); border-radius:8px; background:#fff; }
.power-search button,.mini-btn { padding:9px 14px; border:1px solid #c9d5e2; border-radius:8px; background:#fff; color:#244968; cursor:pointer; }
.power-business-table strong { color:#173a59; }
.power-money-alert { color:#c2413a; font-weight:700; }
.power-empty { padding:56px 20px; text-align:center; color:var(--muted); }
.power-empty>div { font-size:36px; opacity:.5; }.power-empty h3 { margin:12px 0 6px; color:#36536d; }.power-empty p { margin:0; }
.power-help-text { color:var(--muted); font-size:13px; }
.power-back { margin:4px 0 14px; padding:0; border:0; background:none; color:#1673cf; cursor:pointer; }
.power-detail-hero { display:flex; justify-content:space-between; align-items:flex-start; padding:22px; border-radius:16px; color:#fff; background:linear-gradient(135deg,#133b5d,#246ca8); }
.power-detail-hero span,.power-detail-hero p { opacity:.76; }.power-detail-hero h2 { margin:6px 0; font-size:28px; }.power-detail-hero p { margin:0; }
.power-detail-actions { display:flex; flex-wrap:wrap; gap:10px; padding:16px 0 4px; }
.power-detail-sections section { background:#fff; border:1px solid #e3e9f0; border-radius:14px; }
.power-detail-sections h3 { display:flex; justify-content:space-between; margin:0 0 10px; color:#173a59; }.power-detail-sections h3 span { font-size:12px; color:var(--muted); font-weight:400; }
.power-detail-row { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid #edf1f5; }.power-detail-row p { margin:4px 0 0; color:var(--muted); }
.power-dialog-backdrop { z-index:2000; background:rgba(15,25,38,.38); backdrop-filter:none; }
.power-dialog { width:min(720px,100%); max-height:min(86vh,820px); padding:20px; overflow:auto; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:var(--shadow); }
.power-dialog-head { align-items:center; margin-bottom:14px; padding:0; border:0; }.power-dialog-head h3 { margin:0; color:var(--text); }.power-dialog-head>button { flex:0 0 auto; }
.power-dialog-form { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:0; }.power-dialog-form label { display:block; }.power-dialog-form label[hidden] { display:none !important; }.power-dialog-form label>span { display:block; margin-bottom:6px; color:#40556a; font-size:13px; font-weight:600; }.power-dialog-form input,.power-dialog-form select,.power-dialog-form textarea { width:100%; padding:11px 12px; border:1px solid #cfd8e2; border-radius:8px; background:#fff; }.power-context-field input:not([type="hidden"]) { background:#f3f6f9; color:#173a59; font-weight:700; cursor:not-allowed; }.power-file-field,.power-dialog-footer { grid-column:1/-1; }.power-file-field small { display:block; margin-top:6px; color:var(--muted); }.power-dialog-footer { display:flex; justify-content:flex-end; gap:10px; margin-top:16px; padding-top:0; }
.power-dialog-wide { width:min(1120px,100%); max-height:min(90vh,900px); }
.power-info-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:14px 0 24px; }
.power-info-grid>div { border:1px solid #dce4ee; border-radius:14px; padding:14px; background:#fbfcfe; }
.power-info-grid span { display:block; color:#6b7280; font-size:13px; margin-bottom:6px; }
.power-gap-panel { border:1px solid #d8e4f2; background:#f7fbff; border-radius:16px; padding:18px; margin-bottom:18px; }
.power-gap-row { display:grid; grid-template-columns:minmax(120px,.6fr) minmax(180px,.8fr) minmax(240px,1fr) 2fr; gap:12px; align-items:center; padding:10px 0; border-top:1px solid #e1e9f2; }
.power-gap-row:first-of-type { border-top:0; }
.power-gap-end-form { display:flex; align-items:end; gap:8px; }.power-gap-end-form label span { display:block; margin-bottom:4px; color:var(--muted); font-size:12px; }.power-gap-end-form input { padding:8px; border:1px solid var(--line-strong); border-radius:8px; }
.power-dialog-error { grid-column:1/-1; padding:12px 14px; border:1px solid #f1b5b5; border-radius:9px; background:#fff2f2; color:#9b2c23; font-weight:700; }.power-dialog-error[hidden] { display:none; }.power-field-error { display:block; margin-top:5px; color:#b42318; }.power-dialog-form [aria-invalid="true"] { border-color:#d92d20; box-shadow:0 0 0 2px rgba(217,45,32,.12); }
.power-preflight-summary,.power-well-periods { grid-column:1/-1; }.power-preflight-summary { display:flex; justify-content:space-between; gap:12px; padding:12px 14px; border-radius:10px; background:#eef6ff; color:#244f7d; }.power-well-periods { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.power-well-periods label { padding:12px; border:1px solid #dce4ee; border-radius:10px; }.power-well-periods small { display:block; margin-top:5px; color:var(--muted); }
.power-list-tools>label { display:flex; align-items:center; gap:10px; font-weight:700; }
@media (max-width:900px){.power-info-grid,.power-gap-row{grid-template-columns:1fr}}
@media (max-width: 720px) { .power-inline-form { display: block; } .power-inline-form label, .power-inline-form button { display: block; width: 100%; margin-top: 10px; } .power-row-card { display: block; } }
@media (max-width: 900px) { .power-audit-filter { grid-template-columns:1fr 1fr; } .power-audit-card,.power-audit-card-main { display:grid; grid-template-columns:1fr; gap:8px; } }
@media (max-width:720px){.power-page-head,.power-list-tools{align-items:stretch;flex-direction:column}.power-summary-grid{grid-template-columns:1fr 1fr}.power-dialog-form,.power-well-periods{grid-template-columns:1fr}.power-file-field,.power-dialog-footer{grid-column:1}.power-search>*{width:100%}.power-detail-hero{gap:12px}.power-page-head h2{font-size:23px}}

/* 2026 visual refresh: Apple-like desktop, WeChat-like mobile */
:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.86);
  --line: rgba(29, 29, 31, 0.1);
  --line-strong: rgba(29, 29, 31, 0.16);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --primary: #0071e3;
  --primary-dark: #005bb5;
  --primary-soft: #e8f2ff;
  --green: #1a7f37;
  --amber: #b26a00;
  --red: #d70015;
  --ink: #1d1d1f;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.08);
}

body {
  background:
    radial-gradient(circle at 20% -10%, rgba(0, 113, 227, 0.1), transparent 28%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 42%, #f1f3f6 100%);
}

.app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(16, 24, 39, 0.94);
  backdrop-filter: blur(24px);
  color: rgba(255, 255, 255, 0.8);
  box-shadow: 14px 0 36px rgba(15, 23, 42, 0.12);
}

.side-head {
  padding: 24px 20px 18px;
}

.side-title {
  gap: 11px;
  letter-spacing: 0;
}

.side-title .brand-mark,
.brand-mark {
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.local-version-badge {
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.16);
  border-color: rgba(48, 209, 88, 0.4);
  color: #b9fbc8;
}

.nav {
  padding: 14px 12px;
  gap: 6px;
}

.nav button,
.nav a {
  min-height: 46px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.76);
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.nav button:hover,
.nav a:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.1);
}

.nav button.active,
.nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.95), rgba(91, 156, 255, 0.7));
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.28);
}

.nav-flyout {
  left: calc(100% + 10px);
  min-width: 226px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 28, 43, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.nav-flyout button,
.nav-flyout button.flyout-tertiary {
  border-radius: 12px;
}

.topbar {
  min-height: 76px;
  padding: 0 30px;
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 30;
}

.page-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
}

.crumb {
  color: #86868b;
}

.content {
  padding: 28px 30px 44px;
}

.card {
  border-radius: 22px;
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card:hover {
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.1);
}

.dashboard-intro {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 28px;
  padding: 36px;
  margin-bottom: 18px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 11, 18, 0.9), rgba(32, 44, 66, 0.74)),
    radial-gradient(circle at 86% 18%, rgba(0, 113, 227, 0.55), transparent 34%);
  overflow: hidden;
  position: relative;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2);
}

.dashboard-intro h2 {
  max-width: 840px;
  margin: 10px 0 12px;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.dashboard-intro p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  color: #d6e9ff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.dashboard-orbit {
  width: 210px;
  height: 210px;
  justify-self: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  animation: slowFloat 5s ease-in-out infinite;
}

.dashboard-orbit span {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dashboard-orbit span:nth-child(1) { left: 16px; top: 28px; }
.dashboard-orbit span:nth-child(2) { right: 18px; top: 78px; animation: pulseTile 1.8s ease-in-out infinite; }
.dashboard-orbit span:nth-child(3) { left: 72px; bottom: 24px; }

@keyframes slowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulseTile {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.08); opacity: 1; }
}

.dashboard-hero,
.dashboard-stats,
.dashboard-lower {
  animation: riseIn 420ms ease both;
}

@keyframes riseIn {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.stat {
  min-height: 136px;
  overflow: hidden;
  position: relative;
}

.stat::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
}

.stat .value {
  color: #111827;
  font-size: clamp(28px, 2.8vw, 42px);
}

.focus-grid div {
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f6f9ff);
  transition: transform 160ms ease, border-color 160ms ease;
}

.focus-grid div:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.22);
}

.tabs {
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.07);
}

.tabs button {
  border-radius: 14px;
  border: 0;
  background: transparent;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.tabs button:hover {
  background: rgba(0, 113, 227, 0.08);
}

.tabs button.active {
  background: #1d1d1f;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.primary-btn,
.ghost-btn,
.mini-btn,
.icon-btn {
  border-radius: 14px;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.mini-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .record-detail-grid {
    grid-template-columns: 1fr;
  }
  body {
    background: #ededed;
  }

  .app-shell {
    min-height: 100vh;
    background: #ededed;
  }

  .sidebar {
    width: min(318px, 86vw);
    border-radius: 0 20px 20px 0;
    background: rgba(21, 31, 45, 0.98);
  }

  .topbar {
    min-height: 54px;
    padding: 6px 12px;
    background: rgba(247, 247, 247, 0.96);
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .page-title {
    font-size: 18px;
    font-weight: 800;
  }

  .top-actions .icon-btn,
  .top-actions .ghost-btn {
    display: none;
  }

  .user-badge {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #07c160;
    color: #fff;
  }

  .content {
    padding: 12px 10px 86px;
  }

  .dashboard-intro {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 24px 20px;
    border-radius: 18px;
    margin-bottom: 12px;
  }

  .dashboard-intro h2 {
    font-size: 28px;
  }

  .dashboard-intro p {
    font-size: 14px;
  }

  .dashboard-orbit {
    display: none;
  }

  .card {
    border-radius: 16px;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: none;
    background: #fff;
  }

  .mobile-secondary-bar {
    top: 54px;
    padding: 8px 10px;
    background: #ededed;
    border-bottom: 0;
  }

  .mobile-secondary-bar button {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }

  .mobile-secondary-bar button.active {
    background: #07c160;
    color: #fff;
  }

  .mobile-bottom-nav {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(247, 247, 247, 0.98);
    box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.06);
  }

  .mobile-bottom-nav button {
    border-radius: 12px;
    color: #7a7a7a;
  }

  .mobile-bottom-nav button.active {
    background: transparent;
    color: #07c160;
  }

  .tabs,
  .toolbar,
  .filter-panel,
  .table-controls,
  .dashboard-hero,
  .dashboard-lower,
  .stats-grid {
    gap: 10px;
  }

  .simple-table {
    font-size: 14px;
  }

  .modal {
    width: min(100vw - 20px, 720px);
    border-radius: 18px;
  }
}

/* 2026.07.27 Executive botanical refresh — light, editorial and operational */
:root {
  --bg: #f3f5ef;
  --panel: #ffffff;
  --panel-tint: #f8faf5;
  --line: #dfe5d9;
  --line-strong: #c8d3c1;
  --text: #17251c;
  --muted: #68746a;
  --primary: #196b45;
  --primary-dark: #10452d;
  --primary-soft: #e4f1e8;
  --green: #238654;
  --amber: #a76b16;
  --red: #bd4f45;
  --ink: #10291d;
  --shadow: 0 18px 44px rgba(27, 53, 38, 0.08);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 86% -10%, rgba(178, 205, 156, 0.33), transparent 27%),
    radial-gradient(circle at 4% 36%, rgba(238, 217, 164, 0.17), transparent 23%),
    linear-gradient(145deg, #f9faf6 0%, #f2f5ee 48%, #eef2ea 100%);
}

.app-shell {
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background:
    radial-gradient(circle at 16% 10%, rgba(120, 172, 122, 0.22), transparent 26%),
    linear-gradient(165deg, #153526 0%, #10281c 48%, #0b2117 100%);
  box-shadow: 18px 0 48px rgba(16, 41, 29, 0.13);
}

.side-head {
  padding: 28px 22px 20px;
  border-bottom: 1px solid rgba(235, 247, 229, 0.1);
}

.side-title {
  font-family: "Avenir Next", "PingFang SC", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.side-title .brand-mark,
.brand-mark {
  border-radius: 14px;
  background: linear-gradient(145deg, #d7bc75, #9a7132);
  box-shadow: 0 10px 24px rgba(2, 12, 7, 0.28), inset 0 1px 0 rgba(255,255,255,.45);
}

.nav {
  padding: 18px 14px;
  gap: 7px;
}

.nav button,
.nav a {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(239, 248, 237, 0.72);
}

.nav button:hover,
.nav a:hover {
  background: rgba(226, 242, 222, 0.1);
  color: #fff;
}

.nav button.active,
.nav a.active {
  color: #183224;
  background: linear-gradient(100deg, #dceacb, #b8d7a5);
  box-shadow: 0 12px 28px rgba(5, 25, 14, 0.28);
}

.topbar {
  min-height: 82px;
  padding: 0 38px;
  background: rgba(249, 251, 246, 0.82);
  border-bottom-color: rgba(31, 65, 43, 0.1);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}

.page-title {
  font-family: Georgia, "Songti SC", serif;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.content {
  max-width: 1800px;
  padding: 32px 38px 54px;
}

.card {
  border: 1px solid rgba(32, 75, 48, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.card:hover {
  border-color: rgba(39, 111, 69, 0.22);
  box-shadow: 0 22px 52px rgba(27, 53, 38, 0.11);
}

button.primary,
.primary-btn,
.action-btn.primary,
.btn-primary {
  background: linear-gradient(135deg, #1e764c, #145b3b);
  border-color: #145b3b;
  box-shadow: 0 10px 20px rgba(20, 91, 59, 0.2);
}

button.primary:hover,
.primary-btn:hover,
.action-btn.primary:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #238857, #196b45);
}

.dashboard-command,
.dashboard-intro {
  border: 1px solid rgba(235, 244, 220, 0.2);
  background:
    linear-gradient(122deg, rgba(14, 48, 31, 0.98), rgba(25, 91, 58, 0.93) 62%, rgba(77, 120, 71, 0.82)),
    radial-gradient(circle at 84% 16%, rgba(229, 202, 125, 0.38), transparent 28%);
  box-shadow: 0 30px 80px rgba(16, 53, 33, 0.22);
}

.dashboard-command::before {
  background: linear-gradient(110deg, transparent 0%, rgba(244, 231, 187, 0.16) 42%, transparent 58%);
}

.eyebrow {
  color: #f2e4b4;
  background: rgba(245, 231, 183, 0.12);
  border: 1px solid rgba(245, 231, 183, 0.22);
}

.business-flow {
  border-color: rgba(230, 243, 220, 0.2);
  background:
    radial-gradient(circle at 50% 50%, rgba(166, 208, 135, 0.17), transparent 30%),
    linear-gradient(rgba(238,246,225,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238,246,225,.055) 1px, transparent 1px);
}

.flow-core {
  background: radial-gradient(circle at 35% 25%, #dae9b0, #529457 44%, #1a5738 75%);
  box-shadow: 0 0 0 10px rgba(219, 231, 177, .08), 0 0 54px rgba(169, 205, 118, .34), inset 0 0 20px rgba(255,255,255,.24);
}

.dashboard-kpi {
  border-top: 3px solid #91b777;
}

.dashboard-kpi.blue .kpi-glow { background: #78a987; }
.dashboard-kpi.green .kpi-glow { background: #b5d485; }
.dashboard-kpi.purple .kpi-glow { background: #d8c080; }
.dashboard-kpi.amber .kpi-glow { background: #d6a85c; }

.simple-table th {
  color: #365342;
  background: #edf3e9;
  border-bottom-color: #d5e0d0;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.simple-table tbody tr:hover td {
  background: #f5f9f2;
}

input,
select,
textarea {
  border-color: #d4dfcf;
  background: #fbfcfa;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #4b9467;
  box-shadow: 0 0 0 3px rgba(75, 148, 103, 0.14);
}

.tag,
.status-tag,
.pill {
  border-radius: 999px;
}

.system-version-badge {
  border-color: rgba(25, 107, 69, 0.18);
  color: #1d6a46;
  background: #e9f3e8;
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 238px minmax(0, 1fr); }
  .content { padding: 26px 26px 44px; }
  .topbar { padding: 0 26px; }
}

@media (max-width: 820px) {
  body { background: #f4f7f1; }
  .topbar { min-height: 64px; padding: 0 16px; }
  .page-title { font-size: 22px; }
  .content { padding: 16px 14px 96px; }
  .card { border-radius: 16px; }
  .dashboard-command,
  .dashboard-intro { border-radius: 20px; }
  .dashboard-command h2,
  .dashboard-intro h2 { font-size: 32px; letter-spacing: 0; }
  .simple-table th { white-space: nowrap; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.select-col {
  width: 42px;
  text-align: center;
}

.select-col input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.danger-action {
  color: var(--red);
  border-color: rgba(194, 65, 58, 0.35);
  background: #fff7f6;
}

.local-version-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.system-version-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.table-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.pager-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.progress-panel {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfe;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink);
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #e6edf5;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.progress-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.subtle-action {
  opacity: 0.72;
  border-style: dashed;
}

.subtle-action:hover {
  opacity: 1;
}

.usage-material-editor {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.usage-material-editor h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.usage-material-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.usage-material-row:first-of-type {
  border-top: 0;
}

.usage-material-row span {
  display: grid;
  gap: 3px;
  font-weight: 700;
}

.usage-material-row small {
  color: var(--muted);
  font-weight: 500;
}

.checkbox-multi-item[hidden] {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(380px, 1.05fr);
  background: #edf3f8;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px;
  background:
    linear-gradient(rgba(10, 53, 92, 0.78), rgba(9, 41, 72, 0.82)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1400&q=80") center/cover;
  color: #fff;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
}

.login-brand h1 {
  margin: 120px 0 18px;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 610px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.86);
}

.login-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.login-panel-wrap {
  display: grid;
  place-items: center;
  padding: 36px;
}

.login-panel {
  width: min(470px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.login-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.login-panel .hint {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.65;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label {
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 103, 179, 0.14);
}

.field input[readonly] {
  color: var(--muted);
  background: #f3f6fa;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.mini-btn {
  border: 0;
  border-radius: 6px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.primary-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  font-weight: 800;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.ghost-btn {
  padding: 9px 13px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.icon-btn {
  width: 38px;
  height: 38px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.mini-btn {
  min-height: 30px;
  padding: 5px 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
}

.error {
  display: none;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  color: #8b1f17;
  background: #fde8e5;
}

.error.show {
  display: block;
}

.demo-accounts {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.account-chip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  text-align: left;
}

.account-chip strong {
  display: block;
  color: var(--ink);
}

.account-chip span {
  color: var(--muted);
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: #102235;
  color: #d9e5ef;
  display: flex;
  flex-direction: column;
}

.side-head {
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: #fff;
}

.side-title .brand-mark {
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, 0.22);
}

.side-sub {
  margin: 12px 0 0;
  color: #98aabd;
  font-size: 13px;
}

.nav {
  padding: 14px 10px;
  display: grid;
  gap: 5px;
}

.nav-item-wrap {
  position: relative;
}

.nav button,
.nav a {
  min-height: 42px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c8d6e4;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  text-decoration: none;
}

.nav button:hover,
.nav button.active,
.nav a:hover,
.nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-flyout {
  position: absolute;
  left: 100%;
  top: 0;
  width: 210px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #102235;
  color: #d9e5ef;
  box-shadow: 0 18px 42px rgba(15, 35, 60, 0.18);
  z-index: 50;
  display: none;
}

.nav-item-wrap:hover > .nav-flyout {
  display: grid;
  gap: 4px;
}

.nav-flyout-title {
  padding: 6px 8px 8px;
  font-size: 13px;
  color: #98aabd;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.nav-flyout button {
  min-height: 34px;
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #c8d6e4;
  background: transparent;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-flyout button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-flyout button.active {
  color: #fff;
  background: #1267b3;
}

.flyout-group {
  position: relative;
  display: block;
}

.flyout-group.has-tertiary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 14px;
  height: 100%;
}

.nav-flyout .flyout-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.flyout-arrow {
  color: #98aabd;
  font-size: 18px;
  line-height: 1;
}

.tertiary-flyout {
  top: 0;
  left: calc(100% + 10px);
  width: 190px;
  display: none;
  gap: 4px;
}

.flyout-group:hover .tertiary-flyout {
  display: grid;
}

.nav-flyout button.flyout-tertiary {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #aebfd0;
  font-size: 13px;
}

.nav-flyout button.flyout-tertiary.active {
  color: #fff;
  background: rgba(18, 103, 179, 0.68);
  border-left-color: #73b8ff;
}

.mobile-secondary-bar {
  display: none;
}

.side-foot {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9fb0c2;
  font-size: 13px;
  line-height: 1.6;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.top-left {
  min-width: 0;
}

.crumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.page-title {
  margin: 0;
  font-size: 21px;
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.user-badge strong {
  display: block;
  font-size: 14px;
}

.user-badge span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.content {
  min-width: 0;
  padding: 22px 24px 34px;
}

.grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-col {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(35, 50, 70, 0.06);
}

.stat {
  min-height: 122px;
}

.stat .label {
  color: var(--muted);
  font-size: 13px;
}

.stat .value {
  margin: 12px 0 8px;
  font-size: 30px;
  font-weight: 900;
  color: var(--ink);
}

.stat .trend {
  font-size: 13px;
  color: var(--green);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.dashboard-todo-card,
.dashboard-focus-card {
  min-height: 220px;
}

.dashboard-todo-list {
  display: grid;
  gap: 10px;
}

.dashboard-todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.dashboard-todo-item strong,
.dashboard-todo-item span {
  display: block;
}

.dashboard-todo-item strong {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-todo-item div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.focus-grid div {
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfe;
}

.focus-grid strong,
.focus-grid span {
  display: block;
}

.focus-grid strong {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.focus-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-stats {
  margin-top: 16px;
}

.dashboard-reminders .notice {
  background: #fbfdff;
}

.compact-empty {
  padding: 24px 12px;
}

.mobile-bottom-nav {
  display: none;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}

.card .desc {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.module-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.module-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 21px;
  margin-bottom: 14px;
}

.module-card .actions {
  margin-top: auto;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.tabs button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fuel-workbench,
.fuel-summary-card,
.vehicle-history-panel,
.fuel-record-section {
  margin-bottom: 16px;
}

.fuel-list-shell {
  display: grid;
  gap: 16px;
}

.simple-head,
.anomaly-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.simple-head h3,
.anomaly-head h3 {
  margin: 0;
}

.fuel-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.fuel-hero h3 {
  margin: 0;
  font-size: 20px;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.compact-field {
  margin-bottom: 0;
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
}

.result-head strong,
.result-head span {
  display: block;
}

.result-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.oil-card-stats {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-bottom: 18px;
}

@media (max-width: 1100px) {
  .oil-card-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

.mini-stats div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.mini-stats strong,
.mini-stats span {
  display: block;
}

.mini-stats strong {
  color: var(--ink);
  font-size: 20px;
}

.mini-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.two-column-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 14px 0;
}

.summary-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}

.summary-box h4 {
  margin: 0 0 10px;
}

.summary-box p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}

.vehicle-history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.vehicle-history-item span {
  grid-column: 1;
}

.vehicle-history-item button {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.anomaly-card {
  box-shadow: none;
  background: #fffaf2;
  border-color: #f4d28b;
}

.threshold-control {
  display: grid;
  grid-template-columns: auto 80px auto auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.threshold-control input {
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 8px;
}

.anomaly-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.anomaly-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #f4d28b;
  border-radius: 6px;
  background: #fff;
}

.anomaly-item strong,
.anomaly-item span {
  display: block;
}

.anomaly-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.compact-empty {
  padding: 18px;
}

.simple-table th,
.simple-table td {
  white-space: nowrap;
}

.todo-content-cell {
  width: 260px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simple-table th,
table th {
  min-width: 80px;
  resize: horizontal;
  overflow: auto;
}

.select-col {
  min-width: 42px;
  width: 42px;
  resize: none;
}

.resizable-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 520px;
  overflow: auto;
  resize: horizontal;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-scroll-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
}

.table-top-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f8fbff;
}

.table-top-scroll-inner {
  height: 1px;
}

.table-top-scroll + .resizable-table-wrap {
  border-radius: 0 0 6px 6px;
  overflow-x: auto;
}

.resizable-table-wrap,
.table-scroll-wrap {
  scrollbar-width: auto;
  scrollbar-color: #8ba2b8 #e6edf3;
}

.resizable-table-wrap::-webkit-scrollbar,
.table-scroll-wrap::-webkit-scrollbar {
  display: block;
  height: 13px;
}

.resizable-table-wrap::-webkit-scrollbar-track,
.table-scroll-wrap::-webkit-scrollbar-track {
  background: #e6edf3;
  border-radius: 999px;
}

.resizable-table-wrap::-webkit-scrollbar-thumb,
.table-scroll-wrap::-webkit-scrollbar-thumb {
  min-width: 48px;
  border: 2px solid #e6edf3;
  border-radius: 999px;
  background: #8ba2b8;
}

.resizable-table-wrap table {
  min-width: 1280px;
  table-layout: fixed;
}

.resizable-table-wrap th,
.resizable-table-wrap td {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.monthly-task-table th:nth-child(6),
.monthly-task-table td:nth-child(6) {
  max-width: 260px;
}

.old-contract-shell .settlement-grand-total {
  background: linear-gradient(135deg, #eaf2ff 0%, #f4f8ff 100%);
  border-color: #9fc0f4;
}

.old-contract-shell,
.old-contract-shell > *,
.old-contract-vehicle-summary,
.old-contract-source-panel {
  min-width: 0;
  max-width: 100%;
}

.old-contract-total-stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.old-contract-total-stats .file-settlement-total {
  background: linear-gradient(135deg, #effaf5 0%, #f7fcfa 100%);
  border-color: #9fd7bd;
}

.old-contract-vehicle-summary {
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid #dce7f7;
  border-radius: 16px;
  background: #f8fbff;
}

.old-contract-vehicle-summary .table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.old-contract-vehicle-summary table {
  width: 1380px !important;
  min-width: 1380px !important;
  table-layout: fixed;
}

.old-contract-vehicle-summary th:nth-child(1) { width: 112px; }
.old-contract-vehicle-summary th:nth-child(2) { width: 92px; }
.old-contract-vehicle-summary th:nth-child(3) { width: 136px; }
.old-contract-vehicle-summary th:nth-child(4) { width: 112px; }
.old-contract-vehicle-summary th:nth-child(5) { width: 138px; }
.old-contract-vehicle-summary th:nth-child(6) { width: 440px; }
.old-contract-vehicle-summary th:nth-child(7) { width: 138px; }
.old-contract-vehicle-summary th:nth-child(8) { width: 112px; }
.old-contract-vehicle-summary th:nth-child(9) { width: 80px; }

.old-contract-vehicle-summary th,
.old-contract-vehicle-summary td {
  white-space: nowrap;
}

.comparison-difference {
  color: #a85b00;
  font-variant-numeric: tabular-nums;
}

.old-contract-vehicle-summary tfoot td {
  background: #edf4ff;
  border-top: 2px solid #9fc0f4;
}

.old-contract-rate-editor {
  max-height: 58vh;
}

.old-contract-rate-editor input {
  min-width: 108px;
}

.old-contract-rate-editor .field-note {
  display: block;
  margin-top: 4px;
  color: #2563eb;
  font-weight: 500;
}

.old-contract-detail-table th,
.old-contract-detail-table td {
  white-space: nowrap;
}

.old-contract-vehicle-summary .calculation-source,
.old-contract-detail-table .calculation-source {
  min-width: 440px;
  white-space: normal;
  line-height: 1.55;
  color: #40526b;
}

.old-contract-shell .resizable-table-wrap {
  min-width: 0;
  max-width: 100%;
  resize: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.old-contract-source-panel {
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid #cbdcf5;
  border-radius: 16px;
  background: #f5f9ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.old-contract-source-panel.missing-source {
  border-style: dashed;
}

.old-contract-source-panel.is-matched {
  border-color: #9bd9ba;
  background: #f2fbf6;
}

.old-contract-source-panel.has-warning {
  border-color: #efb55f;
  background: #fff8eb;
}

.old-contract-source-panel > div:first-child,
.source-file-main {
  display: grid;
  gap: 5px;
}

.old-contract-source-panel span {
  color: var(--muted);
  font-size: 13px;
}

.source-file-actions {
  display: flex;
  gap: 10px;
}

.settlement-warning-list {
  width: 100%;
  display: grid;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid rgba(180, 119, 24, 0.2);
  color: #9a5b00;
  font-size: 13px;
}

.comparison-status {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.comparison-status.matched {
  color: #08794b;
  background: #e5f7ee;
}

.comparison-status.warning {
  color: #a85b00;
  background: #fff0d8;
}

.attendance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
}

.attendance-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 8px;
}

.attendance-week-list {
  display: grid;
  gap: 10px;
}

.attendance-week-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.week-select {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
}

.week-calendar {
  grid-template-columns: repeat(7, minmax(72px, 1fr));
}

.day-cell {
  position: relative;
  min-height: 64px;
  padding: 10px 10px 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.day-cell strong,
.day-cell span,
.day-cell small,
.attendance-summary strong,
.attendance-summary span {
  display: block;
}

.day-cell small {
  margin-top: 3px;
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.day-status-select {
  width: 100%;
  margin-top: 6px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.day-cell.attended {
  border-color: #8fd3a4;
  background: #effaf2;
  color: #176b33;
}

.day-cell.absent {
  border-color: #f0aaa5;
  background: #fff1f0;
  color: #9f231b;
}

.day-cell.pending {
  border-color: #f2d178;
  background: #fff8df;
  color: #765500;
}

.office-batch-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}

.office-batch-panel strong,
.office-batch-panel span {
  display: block;
}

.office-batch-panel span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.office-batch-panel select {
  width: 100%;
}

.office-batch-rows {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.office-batch-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.office-batch-row span {
  color: var(--muted);
  font-size: 12px;
}

.sub-tabs {
  width: fit-content;
  margin: 10px 0 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4fb;
}

.sub-tabs button {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  background: transparent;
}

.sub-tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(15, 42, 68, 0.12);
}

.table-input {
  width: 100%;
  min-width: 86px;
  height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.compact-number-input {
  max-width: 112px;
}

.day-tag {
  position: absolute;
  bottom: 6px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #17324d;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

button.day-tag:not(.active) {
  background: #c8d2df;
  color: #31445a;
}

.day-tag.lodge {
  left: 6px;
  background: #1f6f43;
}

.day-tag.meal {
  right: 6px;
  background: #8a5a00;
}

button.day-tag.lodge:not(.active),
button.day-tag.meal:not(.active),
button.day-tag.remote:not(.active) {
  background: #c8d2df;
  color: #31445a;
}

.day-tag.lodge.remote-active {
  background: #2563eb;
}

.attendance-summary {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow-y: auto;
}

.attendance-summary h3 {
  margin: 0 0 4px;
}

.attendance-summary div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.attendance-summary div:last-child {
  border-bottom: 0;
}

.pending-attendance-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.pending-attendance-panel h3 {
  margin: 0 0 10px;
}

.file-note {
  color: var(--muted);
  font-size: 12px;
}

.form-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.route-field {
  grid-column: 1 / -1;
}

.route-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.route-point-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.route-point-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.route-point-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-point-item div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.trip-query-point-list > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.trip-query-point-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-point-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 150px;
}

.trip-location-band {
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.trip-point-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 118px));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  align-items: stretch;
}

.trip-point {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 118px;
  min-width: 118px;
  padding: 6px 8px;
  border: 1px solid #c9d8e8;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(15, 42, 71, 0.08);
  font-size: 12px;
}

.trip-point span {
  display: inline-block;
  width: 5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-point.active {
  border-color: #1d70b8;
  background: #eaf4ff;
}

.town-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  margin-bottom: 14px;
}

.town-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 74px;
  padding: 10px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.town-card.active {
  border-color: #1d70b8;
  background: #eaf4ff;
}

.checkbox-multi-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #f8fbff;
}

.multi-search-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.multi-search-row input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.checkbox-multi-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d8e4f1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.checkbox-multi-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.town-card strong,
.town-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.town-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.trip-multi-select-field input {
  margin-bottom: 8px;
}

.trip-multi-select-field select {
  width: 100%;
  min-height: 190px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.trip-location-check-list {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  min-height: 190px;
}

.trip-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.trip-auto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.trip-history-query {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.trip-history-result {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.trip-history-result.empty {
  color: var(--muted);
  background: #fbfdff;
}

.trip-history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.trip-history-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf4ff;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-history-tag.missing {
  background: #fde8e5;
  color: var(--red);
}

.trip-history-tag small {
  color: inherit;
  opacity: 0.72;
}

.trip-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.trip-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.trip-panel h3 {
  margin: 0 0 12px;
}

.trip-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 4px 0;
  color: var(--text);
}

.trip-generated-table {
  table-layout: fixed;
  min-width: 760px;
}

.resizable-table-wrap .trip-generated-table {
  min-width: 760px;
}

.resizable-table-wrap .trip-generated-table th,
.resizable-table-wrap .trip-generated-table td {
  max-width: none;
}

.trip-generated-table .trip-date-col {
  width: 92px;
}

.trip-generated-table .trip-start-col {
  width: 130px;
}

.trip-generated-table .trip-end-col {
  width: auto;
}

.trip-generated-table .trip-distance-col {
  width: 120px;
}

.trip-generated-table th,
.trip-generated-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-generated-table th:nth-child(1),
.trip-generated-table th:nth-child(2),
.trip-generated-table td:nth-child(1),
.trip-generated-table td:nth-child(2) {
  min-width: auto;
  max-width: none;
  resize: none;
}

.trip-generated-table th:nth-child(1),
.trip-generated-table td:nth-child(1) {
  width: 92px;
}

.trip-generated-table th:nth-child(2),
.trip-generated-table td:nth-child(2) {
  width: 130px;
}

.trip-map-preview {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.trip-map-preview .result-head span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-zoom-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.trip-map-scroll {
  width: 100%;
  height: 420px;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f8fb;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.trip-map-scroll.dragging {
  cursor: grabbing;
}

.trip-map-image {
  display: block;
  height: auto;
  min-width: 1024px;
  min-height: 600px;
  object-fit: cover;
  background: #f5f8fb;
  pointer-events: none;
}

.trip-map-canvas {
  position: relative;
}

.trip-map-marker {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -100%);
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px 999px 999px 2px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #1d70b8;
  box-shadow: 0 4px 12px rgba(15, 42, 71, 0.28);
  font-size: 12px;
  font-weight: 800;
  pointer-events: auto;
}

.trip-map-marker.day-end {
  background: #d94841;
  border-radius: 6px 6px 6px 1px;
}

.trip-progress-panel {
  margin: 12px 0;
}

.map-parser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.6fr);
  gap: 16px;
  align-items: stretch;
}

.map-drop-zone {
  min-height: 240px;
  border: 1px dashed #9db7d4;
  border-radius: 8px;
  background: #f6f9fd;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-drop-zone.dragover {
  border-color: var(--primary);
  background: #edf6ff;
}

.map-drop-zone textarea {
  flex: 1;
  min-height: 150px;
  resize: vertical;
}

.map-parser-debug {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.map-parser-debug pre {
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.capture-candidates {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.capture-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.capture-candidate span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-order {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
}

.vehicle-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.vehicle-select-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.vehicle-select-card:hover,
.vehicle-select-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.vehicle-select-card strong,
.vehicle-select-card span,
.vehicle-select-card em {
  display: block;
}

.vehicle-select-card strong {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 17px;
}

.vehicle-select-card span {
  color: var(--muted);
  font-size: 13px;
}

.vehicle-select-card em {
  margin-top: 10px;
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 800;
}

.fuel-record-list {
  display: grid;
  gap: 14px;
}

.fuel-record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.fuel-record-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.fuel-record-title strong,
.fuel-record-title span {
  display: block;
}

.fuel-record-title strong {
  color: var(--ink);
  font-size: 18px;
}

.fuel-record-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.fuel-primary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.fuel-primary-grid div,
.fuel-detail-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbfcfe;
}

.fuel-primary-grid span,
.fuel-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.fuel-primary-grid strong,
.fuel-detail-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
}

.fuel-primary-grid strong {
  font-size: 17px;
}

.fuel-detail-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
}

.search {
  min-width: min(320px, 100%);
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.card > table,
.card .toolbar + table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 800;
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f7;
  color: var(--ink);
}

.status.ok {
  background: #e7f5ef;
  color: var(--green);
}

.status.warn {
  background: #fff5db;
  color: var(--amber);
}

.status.danger {
  background: #fde8e5;
  color: var(--red);
}

.status.info {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.notice-list,
.timeline {
  display: grid;
  gap: 10px;
}

.notice,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fbfcfe;
}

.notice strong,
.timeline-item strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.notice span,
.timeline-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.permission-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.permission-card {
  min-height: 132px;
}

.permission-editor {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfdff;
}

.permission-editor-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.permission-editor-head h3 {
  margin: 0 0 4px;
}

.permission-table {
  max-height: 420px;
  overflow: auto;
}

.permission-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, 72px);
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.permission-table-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef5fc;
  font-weight: 700;
}

.permission-check {
  display: flex;
  justify-content: center;
  align-items: center;
}

.permission-check input {
  width: 18px;
  height: 18px;
}

.permission-na {
  text-align: center;
  color: var(--muted);
}

.role-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.empty-state {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 25, 38, 0.38);
  z-index: 2000;
}

.modal {
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions .primary-btn {
  width: auto;
}

.primary-key-link {
  max-width: 150px;
  padding: 0;
  overflow: hidden;
  color: var(--primary);
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.record-detail-modal {
  width: min(860px, 100%);
}

.detail-mode-note {
  margin: -4px 0 14px;
  padding: 10px 12px;
  color: #315a82;
  background: #eef6ff;
  border: 1px solid #cfe5ff;
  border-radius: 7px;
}

.detail-modified-at {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.detail-modified-at span,
.modified-at-cell {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.formula-preview {
  margin-top: 14px;
  padding: 14px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.formula-preview > strong {
  display: block;
  margin-bottom: 10px;
}

.record-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.record-detail-row {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.record-detail-row > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.record-detail-row > strong {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 500;
}

.fuel-credential-field {
  margin-top: 14px;
}

.image-paste-zone {
  padding: 14px;
  border: 1px dashed #8bb8e8;
  border-radius: 10px;
  background: #f7fbff;
  outline: none;
}

.image-paste-zone:focus-within,
.image-paste-zone:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.credential-compression-status {
  margin: 8px 0 0;
  color: #24679f;
  font-size: 12px;
}

.credential-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.credential-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.credential-existing {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.credential-existing > label {
  color: var(--muted);
  font-size: 12px;
}

.credential-thumb {
  display: grid;
  gap: 5px;
  width: 132px;
  padding: 7px;
  color: var(--text);
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.credential-placeholder {
  display: grid;
  width: 116px;
  height: 82px;
  place-items: center;
  border-radius: 6px;
  color: #44739d;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(48, 209, 88, 0.08)),
    #eef5fb;
  font-size: 13px;
}

.credential-thumb img {
  width: 116px;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
}

.image-viewer-backdrop {
  padding: 20px;
  background: rgba(5, 12, 22, 0.9);
}

.image-viewer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1200px, 100%);
  height: min(90vh, 900px);
  overflow: hidden;
  background: #111923;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.image-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  color: #fff;
  background: #1a2633;
}

.image-viewer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-viewer-tools button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.image-viewer-stage {
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.75);
}

.image-viewer-image {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center;
  transition: transform 120ms ease;
  cursor: zoom-in;
}

.credential-thumb span {
  font-size: 12px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  border-radius: 8px;
  color: #fff;
  background: #1e344d;
  box-shadow: var(--shadow);
  z-index: 30;
}

.mobile-menu {
  display: none;
}

@media (max-width: 1080px) {
  .stats-grid,
  .module-grid,
  .two-col,
  .permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fuel-primary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fuel-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    background: #eef3f8;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .login-brand {
    min-height: auto;
    padding: 28px 22px 24px;
    border-radius: 0 0 18px 18px;
  }

  .login-brand h1 {
    margin-top: 28px;
    font-size: 32px;
    line-height: 1.15;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 82vw);
    z-index: 80;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: 14px 0 32px rgba(12, 28, 46, 0.22);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 58px;
    padding: 8px 12px;
    align-items: center;
    gap: 10px;
    border-bottom: 0;
    box-shadow: 0 6px 18px rgba(15, 35, 56, 0.08);
  }

  .crumb {
    display: none;
  }

  .page-title {
    font-size: 20px;
    line-height: 1.2;
  }

  .content {
    padding: 12px 10px 96px;
  }

  .dashboard-hero,
  .dashboard-lower,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-todo-card,
  .dashboard-focus-card {
    min-height: auto;
  }

  .dashboard-todo-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-todo-item strong {
    white-space: normal;
  }

  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-secondary-bar {
    position: sticky;
    top: 58px;
    z-index: 35;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    scrollbar-width: none;
  }

  .mobile-secondary-bar::-webkit-scrollbar {
    display: none;
  }

  .mobile-secondary-bar button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    white-space: nowrap;
  }

  .mobile-secondary-bar button.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 22px rgba(15, 35, 56, 0.12);
  }

  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 18px;
  }

  .mobile-bottom-nav button em {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-style: normal;
  }

  .mobile-bottom-nav button.active {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 800;
  }

  button[data-action*="import"],
  input[id$="ImportInput"] {
    display: none !important;
  }

  .top-actions {
    gap: 6px;
  }

  .user-badge div:not(.avatar) {
    display: none;
  }

  .fuel-hero {
    display: grid;
  }

  .simple-head,
  .anomaly-head {
    display: grid;
  }

  .trip-builder-layout,
  .attendance-layout {
    grid-template-columns: 1fr;
  }

  .office-batch-panel {
    grid-template-columns: 1fr;
  }

  .trip-auto-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trip-history-query {
    grid-template-columns: 1fr;
  }

  .nav-flyout {
    display: none !important;
  }
}

@media (max-width: 620px) {
  .stats-grid,
  .module-grid,
  .two-col,
  .permission-grid,
  .form-grid,
  .filter-panel,
  .mini-stats,
  .vehicle-selector-grid,
  .fuel-primary-grid,
  .fuel-detail-grid {
    grid-template-columns: 1fr;
  }

  .threshold-control {
    grid-template-columns: 1fr 80px auto;
  }

  .threshold-control label {
    grid-column: 1 / -1;
  }

  .anomaly-item {
    display: grid;
  }

  .login-panel-wrap {
    padding: 18px;
  }

  .login-panel {
    padding: 22px;
  }

  .login-meta {
    display: none;
  }

  .card {
    padding: 12px;
    border-radius: 8px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right,
  .search {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ghost-btn,
  .primary-btn,
  .mini-btn {
    width: 100% !important;
    min-height: 40px;
    justify-content: center;
  }

  .trip-auto-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: none;
  }

  .filter-panel {
    padding: 10px;
    gap: 10px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
  }

  table,
  .simple-table,
  .resizable-table-wrap table {
    display: block;
    width: 100%;
    overflow: visible;
    white-space: normal;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(20, 41, 62, 0.05);
  }

  td {
    display: grid;
    grid-template-columns: minmax(72px, 0.38fr) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  td.select-col {
    display: flex;
    justify-content: flex-start;
  }

  td.select-col::before {
    content: "";
    display: none;
  }

  td .mini-btn,
  td .ghost-btn,
  td .primary-btn {
    width: auto !important;
    margin: 2px 4px 2px 0;
  }

  .trip-map-scroll {
    height: 330px;
  }

  .trip-map-image {
    min-width: 760px;
    min-height: 445px;
  }

  .permission-table {
    max-height: 60vh;
  }

  .permission-table-row {
    grid-template-columns: minmax(120px, 1fr) repeat(4, 42px);
    gap: 4px;
    padding: 10px 8px;
  }

  .permission-table-row strong {
    font-size: 13px;
  }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    border-radius: 10px;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .user-badge {
    padding: 4px;
  }

  .top-actions .icon-btn {
    display: none;
  }
}

/* Final UI refresh overrides kept at the end so they win over legacy page rules. */
body {
  background:
    radial-gradient(circle at 20% -10%, rgba(0, 113, 227, 0.1), transparent 28%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 42%, #f1f3f6 100%);
}

.sidebar {
  background: rgba(16, 24, 39, 0.94);
  backdrop-filter: blur(24px);
  box-shadow: 14px 0 36px rgba(15, 23, 42, 0.12);
}

.nav a {
  border-radius: 14px;
  transition: transform 160ms ease, background 160ms ease;
}

.nav a:hover {
  transform: translateX(3px);
}

.nav a.active {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.95), rgba(91, 156, 255, 0.72));
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.28);
}

.topbar {
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: blur(22px);
}

.card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.08);
}

.dashboard-intro {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 28px;
  padding: 36px;
  margin-bottom: 18px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 11, 18, 0.9), rgba(32, 44, 66, 0.74)),
    radial-gradient(circle at 86% 18%, rgba(0, 113, 227, 0.55), transparent 34%);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2);
}

.dashboard-intro h2 {
  max-width: 840px;
  margin: 10px 0 12px;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.08;
}

.dashboard-intro p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  color: #d6e9ff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.dashboard-orbit {
  width: 210px;
  height: 210px;
  justify-self: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  animation: slowFloat 5s ease-in-out infinite;
}

.dashboard-orbit span {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.dashboard-orbit span:nth-child(1) { left: 16px; top: 28px; }
.dashboard-orbit span:nth-child(2) { right: 18px; top: 78px; animation: pulseTile 1.8s ease-in-out infinite; }
.dashboard-orbit span:nth-child(3) { left: 72px; bottom: 24px; }

@keyframes slowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulseTile {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.08); opacity: 1; }
}

.stat .value {
  color: #111827;
  font-size: clamp(28px, 2.8vw, 42px);
}

.tabs {
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.tabs button {
  border-radius: 14px;
}

.tabs button.active {
  background: #1d1d1f;
  color: #fff;
}

@media (max-width: 820px) {
  body,
  .app-shell {
    background: #ededed;
  }

  .topbar {
    min-height: 54px;
    padding: 6px 12px;
    background: rgba(247, 247, 247, 0.96);
    box-shadow: none;
  }

  .page-title {
    font-size: 18px;
  }

  .top-actions .icon-btn,
  .top-actions .ghost-btn,
  .user-badge div:not(.avatar) {
    display: none;
  }

  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #07c160;
    color: #fff;
  }

  .content {
    padding: 12px 10px 86px;
  }

  .dashboard-intro {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 24px 20px;
    border-radius: 18px;
    margin-bottom: 12px;
  }

  .dashboard-intro h2 {
    font-size: 28px;
  }

  .dashboard-orbit {
    display: none;
  }

  .card {
    border-radius: 16px;
    box-shadow: none;
    background: #fff;
  }

  .mobile-secondary-bar {
    top: 54px;
    background: #ededed;
    border-bottom: 0;
  }

  .mobile-secondary-bar button {
    border: 0;
    background: #fff;
    color: #333;
  }

  .mobile-secondary-bar button.active {
    background: #07c160;
    color: #fff;
  }

  .mobile-bottom-nav {
    background: rgba(247, 247, 247, 0.98);
  }

.mobile-bottom-nav button.active {
    background: transparent;
    color: #07c160;
  }
}

/* Usability correction after visual refresh */
.app-shell {
  min-height: 100vh;
}

.sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: visible;
  z-index: 120;
}

.nav {
  overflow: visible;
  padding-right: 10px;
}

.nav-item-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 18px;
  height: 100%;
}

.nav-flyout {
  z-index: 500;
  width: 238px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  opacity: 1;
  backdrop-filter: none;
}

.nav-item-wrap:nth-last-child(-n + 2) > .nav-flyout {
  top: auto;
  bottom: 0;
}

.nav-flyout-title {
  color: #cbd5e1;
}

.nav-flyout button {
  color: #e5e7eb;
}

.nav-flyout button:hover,
.nav-flyout button.active {
  color: #fff;
}

.tertiary-flyout {
  left: calc(100% + 2px);
  background: #0b1220;
}

.flyout-group.has-tertiary::after {
  width: 18px;
}

.dashboard-intro {
  min-height: 210px;
  padding: 30px 34px;
  grid-template-columns: minmax(0, 1fr) 190px;
}

.dashboard-intro h2 {
  max-width: 780px;
  font-size: clamp(30px, 3.2vw, 48px);
}

.dashboard-orbit {
  width: 168px;
  height: 168px;
}

.dashboard-orbit span {
  width: 48px;
  height: 48px;
}

.dashboard-todo-item {
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.dashboard-todo-item:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 113, 227, 0.24);
  background: #fff;
}

@media (max-width: 820px) {
  .sidebar {
    display: flex;
    overflow-y: auto;
    z-index: 100;
  }

  .dashboard-intro {
    padding: 18px 18px 20px;
  }

  .dashboard-intro h2 {
    font-size: 25px;
    line-height: 1.12;
  }

  .dashboard-intro p {
    line-height: 1.65;
  }

  .mobile-secondary-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .mobile-secondary-bar button {
    flex: 0 0 auto;
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-bottom-nav {
    height: auto;
  }

  .attendance-layout {
    grid-template-columns: 1fr;
  }

  .attendance-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .week-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .attendance-week-row {
    grid-template-columns: 1fr;
  }

  .day-cell {
    min-height: 86px;
    padding: 8px 8px 28px;
    border-radius: 8px;
  }

  .day-cell strong {
    font-size: 18px;
  }

  .day-cell span {
    font-size: 13px;
  }

  .day-cell small {
    font-size: 10px;
  }
}

/* Executive dashboard visualization */
.fuel-price-config {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid rgba(0, 113, 227, 0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.055), rgba(48, 209, 88, 0.035));
}

.fuel-price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.fuel-price-grid .field {
  margin: 0;
}

.fuel-price-grid .field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.driver-fuel-summary {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid rgba(48, 209, 88, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.055), rgba(0, 113, 227, 0.035));
}

.driver-fuel-summary .table-scroll {
  margin-top: 14px;
  overflow-x: auto;
}

.driver-fuel-summary-count {
  padding: 7px 12px;
  border-radius: 999px;
  color: #167d3f;
  background: rgba(48, 209, 88, 0.12);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.fuel-weighted-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.fuel-weighted-summary > div {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.fuel-weighted-summary span,
.fuel-weighted-summary small {
  color: var(--muted);
}

.fuel-weighted-summary strong {
  color: var(--text);
  font-size: 22px;
}

@media (max-width: 700px) {
  .fuel-weighted-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .fuel-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-command {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  gap: 28px;
  padding: 38px;
  margin-bottom: 18px;
  border-radius: 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5, 8, 14, 0.96), rgba(21, 38, 64, 0.84)),
    radial-gradient(circle at 78% 20%, rgba(0, 113, 227, 0.55), transparent 32%),
    radial-gradient(circle at 20% 90%, rgba(52, 199, 89, 0.22), transparent 30%);
  box-shadow: 0 30px 90px rgba(8, 12, 22, 0.26);
}

.dashboard-command::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.16) 42%, transparent 58%);
  transform: translateX(-120%);
  animation: commandSweep 5.2s ease-in-out infinite;
}

.dashboard-command > * {
  position: relative;
  z-index: 1;
}

.dashboard-command h2 {
  margin: 12px 0 12px;
  font-size: clamp(38px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.dashboard-command p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.8;
}

.command-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.command-actions .ghost-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hero-live-panel {
  display: grid;
  gap: 12px;
  align-self: stretch;
}

.hero-live-panel div {
  min-height: 76px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.hero-live-panel span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.hero-live-panel strong {
  color: #fff;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1;
}

.business-flow {
  width: 100%;
  max-width: 620px;
  aspect-ratio: 620 / 360;
  position: relative;
  justify-self: end;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(59, 203, 255, 0.16), transparent 28%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 0 70px rgba(0, 113, 227, .08), 0 20px 50px rgba(0,0,0,.18);
  overflow: hidden;
}

.business-flow::before {
  content: "";
  position: absolute;
  inset: 10% 22%;
  border: 1px solid rgba(96, 211, 255, .2);
  border-radius: 50%;
  animation: flowOrbit 8s linear infinite;
}

.business-flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.business-flow-lines path {
  fill: none;
  stroke: url(#flowLine);
  stroke-width: 1.3;
  stroke-dasharray: 5 8;
  opacity: .48;
  animation: flowDash 12s linear infinite;
}

.flow-packet {
  fill: #83e8ff;
  filter: url(#flowGlow);
}

.flow-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 126px;
  height: 126px;
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #38d9ff, #1164d7 45%, #111d5e 75%);
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: 0 0 0 10px rgba(50, 190, 255, .08), 0 0 54px rgba(36, 184, 255, .52), inset 0 0 20px rgba(255,255,255,.24);
  animation: flowCore 3.2s ease-in-out infinite;
  z-index: 2;
}

.flow-core span { font-size: 12px; color: rgba(255,255,255,.68); letter-spacing: .28em; text-indent: .28em; }
.flow-core strong { margin: 3px 0; font-size: 21px; color: #fff; }
.flow-core small { color: #9fe9ff; font-size: 10px; }

.flow-node {
  position: absolute;
  width: 132px;
  min-height: 68px;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 10px 12px;
  color: #fff;
  text-align: left;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(10, 25, 52, .78);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.1);
  cursor: pointer;
  z-index: 3;
  transition: transform .24s ease, border-color .24s ease, background .24s ease;
}

.flow-node:hover { transform: translateY(-4px) scale(1.03); border-color: #75e3ff; background: rgba(17, 61, 105, .9); }
.flow-node i { grid-row: 1 / 3; font-style: normal; font-size: 21px; }
.flow-node span { color: rgba(255,255,255,.66); font-size: 11px; font-weight: 800; }
.flow-node strong { color: #fff; font-size: 14px; white-space: nowrap; }
.flow-node.vehicles { left: 3%; top: 9%; }
.flow-node.payroll { left: 50%; top: 3%; transform: translateX(-50%); }
.flow-node.payroll:hover { transform: translateX(-50%) translateY(-4px) scale(1.03); }
.flow-node.power { right: 3%; top: 9%; }
.flow-node.construction { right: 3%; bottom: 9%; }
.flow-node.tasks { left: 50%; bottom: 3%; transform: translateX(-50%); }
.flow-node.tasks:hover { transform: translateX(-50%) translateY(-4px) scale(1.03); }
.flow-node.todos { left: 3%; bottom: 9%; }

.flow-status {
  position: absolute;
  right: 14px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.5);
  font-size: 9px;
  letter-spacing: .12em;
}
.flow-status i { width: 6px; height: 6px; border-radius: 50%; background: #38e98b; box-shadow: 0 0 10px #38e98b; animation: livePulse 1.4s ease-in-out infinite; }

@keyframes flowDash { to { stroke-dashoffset: -100; } }
@keyframes flowOrbit { to { transform: rotate(360deg); } }
@keyframes flowCore { 50% { transform: translate(-50%, -50%) scale(1.055); box-shadow: 0 0 0 16px rgba(50,190,255,.035), 0 0 72px rgba(36,184,255,.68), inset 0 0 20px rgba(255,255,255,.3); } }
@keyframes livePulse { 50% { opacity: .35; transform: scale(.7); } }

.dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-kpi {
  min-height: 150px;
  position: relative;
  overflow: hidden;
}

.dashboard-kpi .kpi-glow {
  position: absolute;
  right: -28px;
  top: -28px;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  opacity: 0.45;
  filter: blur(2px);
  animation: kpiGlow 2.8s ease-in-out infinite;
}

.dashboard-kpi.blue .kpi-glow { background: #0071e3; }
.dashboard-kpi.green .kpi-glow { background: #30d158; }
.dashboard-kpi.purple .kpi-glow { background: #bf5af2; }
.dashboard-kpi.amber .kpi-glow { background: #ff9f0a; }

.dashboard-kpi span,
.dashboard-kpi strong,
.dashboard-kpi small {
  position: relative;
  z-index: 1;
  display: block;
}

.dashboard-kpi span {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-kpi strong {
  margin: 16px 0 10px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
}

.dashboard-kpi small {
  color: var(--muted);
}

.dashboard-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.dashboard-todo-card,
.dashboard-reminder-card {
  min-height: 260px;
}

.trend-chart {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  padding: 18px 4px 0;
}

.trend-month {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  animation: riseIn 520ms ease both;
  animation-delay: var(--delay);
}

.trend-bars {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
  padding: 0 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.06), rgba(0, 0, 0, 0.02));
}

.trend-bars span {
  width: 18px;
  min-height: 8px;
  border-radius: 999px 999px 4px 4px;
  animation: barGrow 900ms cubic-bezier(.2,.8,.2,1) both;
  transform-origin: bottom;
}

.trend-bars .mileage {
  background: linear-gradient(180deg, #0071e3, #5ac8fa);
  box-shadow: 0 0 22px rgba(0, 113, 227, 0.28);
}

.trend-bars .tasks {
  background: linear-gradient(180deg, #30d158, #a8ffbf);
  box-shadow: 0 0 22px rgba(48, 209, 88, 0.22);
}

.trend-month em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  text-align: center;
}

.chart-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
}

.chart-legend span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.chart-legend .mileage { background: #0071e3; }
.chart-legend .tasks { background: #30d158; }

.action-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.action-pulse {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 6px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  background: #f7f9fc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  text-align: center;
  color: var(--text);
  animation: actionIn 520ms ease both;
  animation-delay: var(--delay);
}

.action-pulse::before {
  content: "";
  position: absolute;
  inset: -40%;
  opacity: 0.2;
  animation: orbRotate 6s linear infinite;
  background: conic-gradient(from 90deg, transparent, #0071e3, transparent);
}

.action-pulse:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.28);
  box-shadow: 0 14px 34px rgba(0, 113, 227, 0.12);
}

.action-pulse strong,
.action-pulse span,
.action-pulse small {
  position: relative;
  z-index: 1;
}

.action-pulse strong {
  font-size: 34px;
}

.action-pulse span {
  color: var(--muted);
  font-weight: 800;
}

.action-pulse small {
  color: var(--muted);
}

.dashboard-vehicle-rank {
  min-height: 300px;
}

.vehicle-rank-bars {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
  animation: actionIn 520ms ease both;
  animation-delay: var(--delay);
}

.rank-row span,
.rank-row strong {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row span {
  font-weight: 800;
}

.rank-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.rank-row i {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0071e3, #5ac8fa);
  animation: rankBarGrow 900ms cubic-bezier(.2,.8,.2,1) both;
}

.rank-row strong {
  color: var(--muted);
  text-align: right;
}

@keyframes commandSweep {
  0%, 45% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}

@keyframes orbRotate {
  to { transform: rotate(360deg); }
}

@keyframes orbBreath {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes kpiGlow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.14); opacity: 0.55; }
}

@keyframes barGrow {
  from { transform: scaleY(0.05); opacity: 0.3; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes actionIn {
  from { transform: translateY(8px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes rankBarGrow {
  from { width: 0; }
  to { width: var(--width); }
}

@media (max-width: 1080px) {
  .dashboard-command {
    grid-template-columns: 1fr;
  }

  .business-flow {
    justify-self: center;
  }

  .dashboard-kpi-strip,
  .dashboard-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .dashboard-command {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 22px 18px;
    border-radius: 20px;
    gap: 18px;
  }

  .dashboard-command h2 {
    font-size: 34px;
  }

  .hero-live-panel {
    grid-template-columns: 1fr;
  }

  .business-flow {
    min-height: 390px;
    aspect-ratio: auto;
  }

  .flow-node { width: 116px; padding: 8px; }
  .flow-node.vehicles, .flow-node.todos { left: 2%; }
  .flow-node.power, .flow-node.construction { right: 2%; }

  .business-flow-lines { display: none; }

  .dashboard-kpi-strip,
  .dashboard-control-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi {
    min-height: 118px;
  }

  .trend-chart {
    height: 190px;
    gap: 8px;
  }

  .trend-bars span {
    width: 14px;
  }

  .action-board,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-row strong {
    text-align: left;
  }
}

/* Final cascade: executive botanical identity */
:root {
  --bg: #f3f5ef;
  --panel: #ffffff;
  --line: #dfe5d9;
  --line-strong: #c8d3c1;
  --text: #17251c;
  --muted: #68746a;
  --primary: #196b45;
  --primary-dark: #10452d;
  --primary-soft: #e4f1e8;
  --green: #238654;
  --amber: #a76b16;
  --red: #bd4f45;
  --ink: #10291d;
  --shadow: 0 18px 44px rgba(27, 53, 38, 0.08);
}

body {
  background:
    radial-gradient(circle at 86% -10%, rgba(178, 205, 156, 0.33), transparent 27%),
    radial-gradient(circle at 4% 36%, rgba(238, 217, 164, 0.17), transparent 23%),
    linear-gradient(145deg, #f9faf6 0%, #f2f5ee 48%, #eef2ea 100%);
}

.app-shell { grid-template-columns: 280px minmax(0, 1fr); }
.sidebar {
  background: radial-gradient(circle at 16% 10%, rgba(120, 172, 122, 0.22), transparent 26%), linear-gradient(165deg, #153526 0%, #10281c 48%, #0b2117 100%);
  box-shadow: 18px 0 48px rgba(16, 41, 29, 0.13);
}
.side-head { padding: 28px 22px 20px; border-bottom: 1px solid rgba(235, 247, 229, 0.1); }
.side-title { font-weight: 800; letter-spacing: .04em; }
.side-title .brand-mark, .brand-mark { border-radius: 14px; background: linear-gradient(145deg, #d7bc75, #9a7132); box-shadow: 0 10px 24px rgba(2, 12, 7, 0.28), inset 0 1px 0 rgba(255,255,255,.45); }
.nav { padding: 18px 14px; gap: 7px; }
.nav button, .nav a { min-height: 48px; padding: 0 14px; border-radius: 12px; color: rgba(239, 248, 237, .72); }
.nav button:hover, .nav a:hover { background: rgba(226, 242, 222, .1); color: #fff; transform: translateX(3px); }
.nav button.active, .nav a.active { color: #183224; background: linear-gradient(100deg, #dceacb, #b8d7a5); box-shadow: 0 12px 28px rgba(5, 25, 14, .28); }
.topbar { min-height: 82px; padding: 0 38px; background: rgba(249, 251, 246, .82); border-bottom-color: rgba(31, 65, 43, .1); }
.page-title { font-family: Georgia, "Songti SC", serif; font-size: 29px; font-weight: 700; letter-spacing: .035em; }
.content { max-width: 1800px; padding: 32px 38px 54px; }
.card { border: 1px solid rgba(32, 75, 48, .11); border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.card:hover { border-color: rgba(39, 111, 69, .22); box-shadow: 0 22px 52px rgba(27,53,38,.11); }
.dashboard-command, .dashboard-intro { border: 1px solid rgba(235,244,220,.2); background: linear-gradient(122deg, rgba(14,48,31,.98), rgba(25,91,58,.93) 62%, rgba(77,120,71,.82)), radial-gradient(circle at 84% 16%, rgba(229,202,125,.38), transparent 28%); box-shadow: 0 30px 80px rgba(16,53,33,.22); }
.eyebrow { color: #f2e4b4; background: rgba(245,231,183,.12); border: 1px solid rgba(245,231,183,.22); }
.simple-table th { color: #365342; background: #edf3e9; border-bottom-color: #d5e0d0; }
.simple-table tbody tr:hover td { background: #f5f9f2; }
input, select, textarea { border-color: #d4dfcf; background: #fbfcfa; }
input:focus, select:focus, textarea:focus { border-color: #4b9467; box-shadow: 0 0 0 3px rgba(75,148,103,.14); }
.system-version-badge { border-color: rgba(25,107,69,.18); color: #1d6a46; background: #e9f3e8; }
@media (max-width: 1080px) { .app-shell { grid-template-columns: 238px minmax(0, 1fr); } .content { padding: 26px 26px 44px; } .topbar { padding: 0 26px; } }
@media (max-width: 820px) { body { background: #f4f7f1; } .topbar { min-height: 64px; padding: 0 16px; } .page-title { font-size: 22px; } .content { padding: 16px 14px 96px; } .card { border-radius: 16px; } .dashboard-command, .dashboard-intro { border-radius: 20px; } .dashboard-command h2, .dashboard-intro h2 { font-size: 32px; letter-spacing: 0; } }

/* Quiet luxury revision: clarity before decoration */
:root {
  --bg: #f6f7f2;
  --panel: #ffffff;
  --line: #e4e8df;
  --line-strong: #d4dccf;
  --text: #20261f;
  --muted: #70776d;
  --primary: #2f6848;
  --primary-dark: #234f36;
  --primary-soft: #eef5ed;
  --green: #397957;
  --amber: #957037;
  --ink: #1d2c21;
  --shadow: 0 10px 28px rgba(28, 44, 33, .055);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body { background: #f6f7f2; }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  background: #f9faf7;
  color: #596258;
  border-right: 1px solid #e3e7de;
  box-shadow: none;
}
.side-head { padding: 28px 22px 20px; border-bottom: 0; }
.side-title { color: #243429; font-size: 17px; letter-spacing: .015em; }
.side-title .brand-mark, .brand-mark {
  border-radius: 11px;
  background: #315f43;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.local-version-badge { color: #3e6f4f; background: #edf5e9; border-color: #d4e7cc; }
.nav { padding: 12px; gap: 4px; }
.nav button, .nav a {
  min-height: 44px;
  border-radius: 8px;
  color: #667066;
  font-weight: 600;
}
.nav button:hover, .nav a:hover { color: #294d36; background: #f0f4ed; transform: none; }
.nav button.active, .nav a.active {
  color: #28553a;
  background: #e9f2e6;
  box-shadow: inset 3px 0 0 #3c7c53;
}
.side-user { border-top-color: #e7ebe4; color: #647065; }
.topbar {
  min-height: 76px;
  padding: 0 40px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #e9ece6;
  box-shadow: none;
}
.page-title { color: #273126; font-family: "Iowan Old Style", "Songti SC", Georgia, serif; font-size: 27px; font-weight: 600; letter-spacing: .025em; }
.content { max-width: 1740px; padding: 34px 40px 64px; }
.card { border: 1px solid #e5e9e2; border-radius: 14px; background: #fff; box-shadow: var(--shadow); backdrop-filter: none; }
.card:hover { border-color: #dde5d9; box-shadow: 0 14px 32px rgba(28,44,33,.07); }
.dashboard-command, .dashboard-intro {
  min-height: 300px;
  color: #253126;
  border: 1px solid #dfe7db;
  border-radius: 18px;
  background: linear-gradient(118deg, #f8fbf5 0%, #eff6ec 54%, #e7f0e1 100%);
  box-shadow: none;
}
.dashboard-command::before { display: none; }
.dashboard-command h2, .dashboard-intro h2 { color: #203526; font-family: "Iowan Old Style", "Songti SC", Georgia, serif; font-size: clamp(34px, 4vw, 60px); font-weight: 600; letter-spacing: .02em; }
.dashboard-command p, .dashboard-intro p { color: #647066; font-size: 15px; line-height: 1.9; }
.eyebrow { color: #497055; background: #e6f0e3; border: 0; font-size: 12px; }
.command-actions .ghost-btn { color: #315f43; background: transparent; border-color: #c8d8c4; }
.business-flow {
  border: 1px solid rgba(72,111,74,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.45);
  box-shadow: none;
}
.business-flow::before { border-color: rgba(65,107,71,.12); }
.business-flow-lines { opacity: .28; }
.flow-core { background: #3e7550; box-shadow: 0 0 0 8px rgba(67,117,79,.08); }
.flow-node { color: #314137; background: rgba(255,255,255,.88); border-color: rgba(61,104,71,.12); box-shadow: 0 8px 20px rgba(37,64,42,.07); }
.flow-node strong { color: #314137; }
.flow-node span { color: #788277; }
.flow-node:hover { border-color: #a8c5a3; background: #fff; }
.dashboard-kpi { min-height: 132px; border-top: 0; box-shadow: none; }
.dashboard-kpi::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 9px; background: #8aac80; }
.dashboard-kpi .kpi-glow { opacity: .16; filter: none; }
.dashboard-kpi.blue .kpi-glow, .dashboard-kpi.green .kpi-glow, .dashboard-kpi.purple .kpi-glow, .dashboard-kpi.amber .kpi-glow { background: #a7c79b; }
.dashboard-kpi strong { color: #273628; }
.simple-table th { color: #637365; background: #f5f7f3; border-bottom-color: #e1e7dd; font-size: 12px; letter-spacing: 0; text-transform: none; }
.simple-table td { border-bottom-color: #edf0ea; }
.simple-table tbody tr:hover td { background: #f8faf6; }
button.primary, .primary-btn, .action-btn.primary, .btn-primary { background: #356f4b; border-color: #356f4b; box-shadow: none; }
button.primary:hover, .primary-btn:hover, .action-btn.primary:hover, .btn-primary:hover { background: #295c3c; }
input, select, textarea { border-color: #dfe5dc; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: #94b391; box-shadow: 0 0 0 3px rgba(108,153,105,.11); }
.system-version-badge { color: #55765c; background: #f0f6ee; border-color: #dcebd7; }
@media (max-width: 1080px) { .app-shell { grid-template-columns: 224px minmax(0, 1fr); } .content { padding: 26px; } .topbar { padding: 0 26px; } }
@media (max-width: 820px) { .topbar { min-height: 64px; padding: 0 16px; } .content { padding: 16px 14px 94px; } .dashboard-command, .dashboard-intro { padding: 24px 20px; min-height: auto; } .dashboard-command h2, .dashboard-intro h2 { font-size: 34px; } .business-flow { min-height: 330px; } }

@media (min-width: 821px) {
  .dashboard-command h2,
  .dashboard-intro h2 {
    max-width: none;
    font-size: clamp(38px, 3.35vw, 50px);
    line-height: 1.12;
    white-space: nowrap;
  }
}

.dashboard-command .eyebrow,
.dashboard-intro .eyebrow { font-size: 0; }
.dashboard-command .eyebrow::after,
.dashboard-intro .eyebrow::after { content: "经营总览"; font-size: 12px; }

/* Helios direction: deep forest, sandstone, quiet editorial composition */
:root {
  --bg: #ede9e2;
  --panel: #fbfaf7;
  --line: #ddd8cf;
  --line-strong: #cfc8bc;
  --text: #202722;
  --muted: #72766e;
  --primary: #3c8272;
  --primary-dark: #21463c;
  --primary-soft: #e1eee7;
  --green: #3c8272;
  --amber: #bd805b;
  --ink: #20372f;
  --shadow: 0 18px 42px rgba(31, 49, 41, .08);
}

body { background: #ede9e2; }
.app-shell { grid-template-columns: 252px minmax(0, 1fr); }
.sidebar {
  color: rgba(240,244,235,.74);
  background: linear-gradient(180deg, #243f36 0%, #1d342c 55%, #172c25 100%);
  border: 0;
  box-shadow: none;
}
.side-head { padding: 30px 22px 24px; border-bottom: 1px solid rgba(231,240,226,.12); }
.side-title { color: #f6f1e8; font-size: 17px; letter-spacing: .02em; }
.side-title .brand-mark, .brand-mark { background: #e4e2d8; color: #244036; border-radius: 50%; box-shadow: none; }
.local-version-badge { color: #d6e4da; background: rgba(218,238,222,.11); border-color: rgba(218,238,222,.22); }
.nav { padding: 18px 14px; gap: 2px; }
.nav button, .nav a { color: rgba(239,244,235,.72); border-radius: 8px; min-height: 46px; font-weight: 500; }
.nav button:hover, .nav a:hover { background: rgba(238,244,232,.09); color: #fff; transform: none; }
.nav button.active, .nav a.active { color: #f8f5ed; background: rgba(238,244,232,.13); box-shadow: inset 2px 0 0 #a3c6b6; }
.side-user { color: rgba(235,241,231,.63); border-top-color: rgba(231,240,226,.12); }
.topbar { min-height: 78px; padding: 0 42px; background: #f8f6f1; border-bottom: 1px solid #dfd9cf; box-shadow: none; }
.page-title { color: #26372e; font-family: "Iowan Old Style", "Songti SC", Georgia, serif; font-size: 28px; font-weight: 500; }
.content { max-width: 1760px; padding: 34px 42px 70px; }
.card { background: #fbfaf7; border: 1px solid rgba(103,103,91,.15); border-radius: 18px; box-shadow: var(--shadow); }
.card:hover { background: #fffefa; border-color: rgba(59,100,84,.23); box-shadow: 0 20px 44px rgba(31,49,41,.1); }

.dashboard-command,
.dashboard-intro {
  min-height: 380px;
  color: #f5f0e7;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(25,48,40,.98) 0%, rgba(31,61,50,.93) 48%, rgba(51,102,85,.67) 100%),
    radial-gradient(circle at 84% 44%, rgba(222,183,122,.45), transparent 23%),
    linear-gradient(135deg, #1e3c32, #315f50);
  box-shadow: none;
}
.dashboard-command::after,
.dashboard-intro::after { content: ""; position: absolute; right: -10%; top: -50%; width: 72%; aspect-ratio: 1; border: 1px solid rgba(241,235,220,.16); border-radius: 50%; box-shadow: 0 0 0 64px rgba(241,235,220,.035), 0 0 0 128px rgba(241,235,220,.025); }
.dashboard-command::before { display: block; background: linear-gradient(105deg, transparent 0%, rgba(245,237,216,.08) 42%, transparent 56%); }
.dashboard-command h2, .dashboard-intro h2 { color: #f7f1e7; font-family: "Iowan Old Style", "Songti SC", Georgia, serif; font-weight: 500; letter-spacing: -.01em; }
.dashboard-command p, .dashboard-intro p { color: rgba(244,239,226,.74); max-width: 540px; }
.dashboard-command .eyebrow, .dashboard-intro .eyebrow { color: #e9d1a8; background: rgba(239,226,193,.12); border: 1px solid rgba(239,226,193,.22); }
.dashboard-command .eyebrow::after, .dashboard-intro .eyebrow::after { content: "业务运营"; }
.command-actions .ghost-btn { color: #f4ecdc; border-color: rgba(244,236,220,.32); background: rgba(244,236,220,.07); }
.business-flow { border: 1px solid rgba(244,237,220,.2); border-radius: 18px; background: rgba(16,38,31,.24); box-shadow: inset 0 0 70px rgba(6,20,14,.18); }
.business-flow::before { border-color: rgba(242,232,206,.22); }
.business-flow-lines { opacity: .55; }
.flow-core { background: #3d8270; border-color: rgba(246,239,223,.72); box-shadow: 0 0 0 12px rgba(223,185,121,.1), 0 0 46px rgba(199,148,86,.28); }
.flow-node { color: #f3ede1; background: rgba(29,57,47,.82); border-color: rgba(244,238,224,.18); box-shadow: 0 10px 24px rgba(10,26,19,.2); }
.flow-node strong { color: #fff8ec; }
.flow-node span { color: rgba(240,234,220,.62); }
.flow-node:hover { background: rgba(53,94,78,.93); border-color: #d5b883; }

.dashboard-kpi { min-height: 142px; background: #fbfaf7; border-top: 0; box-shadow: none; }
.dashboard-kpi::before { width: 30px; height: 3px; background: #bb845f; }
.dashboard-kpi .kpi-glow { background: #d8bc8e !important; opacity: .18; filter: none; }
.dashboard-kpi strong { color: #25382e; font-family: "Iowan Old Style", Georgia, serif; font-weight: 500; }
.simple-table th { color: #59655b; background: #f1eee8; border-bottom-color: #ddd8cf; }
.simple-table td { border-bottom-color: #ebe7df; }
.simple-table tbody tr:hover td { background: #f7f6f1; }
button.primary, .primary-btn, .action-btn.primary, .btn-primary { background: #3c8272; border-color: #3c8272; box-shadow: none; }
button.primary:hover, .primary-btn:hover, .action-btn.primary:hover, .btn-primary:hover { background: #316c5f; }
input, select, textarea { border-color: #ded9d0; background: #fffdfa; }
input:focus, select:focus, textarea:focus { border-color: #7eaa98; box-shadow: 0 0 0 3px rgba(78,135,116,.12); }
.system-version-badge { color: #d5e4d8; background: rgba(215,235,219,.1); border-color: rgba(215,235,219,.2); }
@media (max-width: 1080px) { .app-shell { grid-template-columns: 228px minmax(0,1fr); } .content { padding: 28px; } .topbar { padding: 0 28px; } }
@media (max-width: 820px) { body { background: #ede9e2; } .topbar { min-height: 64px; padding: 0 16px; } .content { padding: 16px 14px 94px; } .dashboard-command, .dashboard-intro { min-height: auto; padding: 26px 20px; border-radius: 18px; } .dashboard-command h2, .dashboard-intro h2 { font-size: 34px; white-space: normal; } .business-flow { min-height: 340px; } }

/* Application workspace rebuild — structural UI layer only, all data and events remain unchanged. */
.application-workspace { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); background: #f1efea; }
.app-rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #1d3a30; }
.app-brand { gap: 12px; }
.app-brand .brand-mark { width: 36px; height: 36px; font-size: 16px; }
.side-sub { margin: 16px 0 0 48px; color: rgba(237, 244, 235, .48); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.workspace-nav { flex: 1; padding-top: 22px; }
.workspace-nav::before { content: "业务模块"; display: block; padding: 0 12px 10px; color: rgba(237, 244, 235, .42); font-size: 11px; letter-spacing: .12em; }
.workspace-nav button, .workspace-nav a { position: relative; padding-left: 16px; }
.workspace-nav button.active::before, .workspace-nav a.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: #c0d8aa; }
.rail-user { padding: 18px 22px 24px; }
.workspace-main { min-width: 0; background: #f1efea; }
.workspace-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 80px; padding: 0 42px; }
.workspace-topbar .top-left { min-width: 0; }
.workspace-topbar .crumb { display: flex; align-items: center; gap: 8px; color: #7d8179; font-size: 12px; letter-spacing: .04em; }
.workspace-topbar .crumb i { color: #b1b3ad; font-style: normal; }
.workspace-topbar .page-title { margin-top: 4px; }
.workspace-content { max-width: none; padding: 0 42px 72px; }
.page-context { min-height: 88px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #dcd8d0; }
.page-context > div { display: flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.page-context p { margin: 0; color: #747a71; font-size: 13px; }
.page-kicker { color: #2d6656; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.page-context-rule { height: 1px; flex: 1; max-width: 110px; background: #a8c1ad; }
.page-stage { padding-top: 28px; }

/* Shared module composition: tabs establish context; panels become calm editorial surfaces. */
.page-stage > .tabs { display: inline-flex; align-items: center; max-width: 100%; gap: 0; margin: 0 0 22px; padding: 4px; overflow-x: auto; border: 1px solid #d9d5cc; border-radius: 999px; background: #e7e4dd; scrollbar-width: thin; }
.page-stage > .tabs button { min-height: 34px; padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; color: #626960; font-size: 13px; white-space: nowrap; }
.page-stage > .tabs button.active { color: #173a2e; background: #fbfaf7; box-shadow: 0 2px 8px rgba(34, 48, 38, .11); }
.page-stage .card { border-radius: 14px; box-shadow: 0 8px 22px rgba(32, 47, 38, .045); }
.page-stage .card:hover { transform: none; box-shadow: 0 10px 26px rgba(32, 47, 38, .075); }
.page-stage .toolbar, .page-stage .simple-head, .page-stage .anomaly-head, .page-stage .fuel-hero { position: relative; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid #e4e1da; }
.page-stage .toolbar::before, .page-stage .simple-head::before, .page-stage .anomaly-head::before, .page-stage .fuel-hero::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 42px; height: 2px; background: #4d967e; }
.page-stage .filter-panel { padding: 18px; border-color: #ddd9d0; border-radius: 12px; background: #f6f5f0; }
.page-stage .table-scroll-wrap { border: 1px solid #e0ddd6; border-radius: 12px; background: #fffdfa; }
.page-stage .simple-table th { background: #f0eee8; color: #536257; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.page-stage .simple-table td { background: #fffdfa; }
.page-stage .simple-table tbody tr:hover td { background: #f2f7f1; }
.page-stage .field label { color: #657168; font-size: 12px; }
.page-stage .field input, .page-stage .field select, .page-stage .field textarea { border-radius: 8px; background: #fffefa; }

/* Dashboard is intentionally a different composition rather than a generic card grid. */
.dashboard-command.command-deck { min-height: 440px; display: grid; grid-template-columns: minmax(330px, .9fr) minmax(510px, 1.1fr); gap: 20px; padding: 42px 44px; isolation: isolate; }
.command-deck-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.dashboard-command .eyebrow { display: inline-block; margin-bottom: 20px; padding: 7px 10px; font-size: 10px; letter-spacing: .12em; }
.dashboard-command .eyebrow::after { content: none; }
.command-title-line { display: flex; align-items: center; gap: 10px; color: #b9cfb3; font-size: 12px; letter-spacing: .12em; }
.command-title-line i { opacity: .55; font-style: normal; }
.command-title-line small { color: rgba(238, 235, 220, .6); font-size: 11px; }
.dashboard-command h2 { max-width: 470px; margin: 14px 0 16px; font-size: clamp(38px, 4vw, 60px); line-height: .99; white-space: normal; }
.dashboard-command h2 em { display: block; color: #cadbab; font-style: normal; }
.dashboard-command p { max-width: 420px; margin-bottom: 26px; }
.command-deck-network { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.network-caption { display: flex; align-items: center; justify-content: space-between; margin: 0 8px 8px; color: #dce5d3; }
.network-caption span { color: #becca8; font-size: 10px; letter-spacing: .13em; }
.network-caption strong { font-size: 13px; font-weight: 500; }
.command-deck .business-flow { min-height: 325px; height: 325px; }
.dashboard-metric-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.dashboard-metric-rail .dashboard-kpi { min-height: 132px; padding: 22px; border-radius: 12px; }
.dashboard-metric-rail .dashboard-kpi span { font-size: 12px; }
.dashboard-metric-rail .dashboard-kpi strong { margin: 10px 0 5px; font-size: 30px; }
.dashboard-control-grid { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 14px; margin-top: 14px; }
.dashboard-control-grid .card { padding: 24px; border-radius: 14px; }
@media (max-width: 1180px) { .application-workspace { grid-template-columns: 230px minmax(0, 1fr); } .workspace-topbar, .workspace-content { padding-left: 28px; padding-right: 28px; } .dashboard-command.command-deck { grid-template-columns: 1fr; min-height: auto; } .command-deck .business-flow { max-width: 650px; width: 100%; } }
@media (max-width: 820px) { .application-workspace { display: block; } .app-rail { display: none; } .workspace-topbar { min-height: 66px; padding: 0 16px; } .workspace-content { padding: 0 14px 92px; } .page-context { min-height: 62px; } .page-context p, .page-context-rule { display: none; } .page-stage { padding-top: 18px; } .page-stage > .tabs { display: flex; width: 100%; border-radius: 11px; } .dashboard-command.command-deck { padding: 30px 22px; border-radius: 16px; } .dashboard-command h2 { font-size: 40px; } .command-deck .business-flow { min-height: 320px; height: 320px; } .dashboard-metric-rail { grid-template-columns: repeat(2, 1fr); } .dashboard-control-grid { grid-template-columns: 1fr; } }

/* Blue primary palette: keeps the editorial layout, changes the system's action hierarchy. */
:root { --primary: #2674c9; --primary-dark: #163d69; --primary-soft: #e8f1fb; --green: #2674c9; --ink: #173653; }
.app-rail { background: linear-gradient(180deg, #102b4a 0%, #10243d 100%); }
.workspace-nav button.active::before, .workspace-nav a.active::before { background: #8ec7ff; }
.page-kicker { color: #2674c9; }
.page-context-rule { background: #a7c9ee; }
.page-stage .toolbar::before, .page-stage .simple-head::before, .page-stage .anomaly-head::before, .page-stage .fuel-hero::before { background: #2674c9; }
.page-stage .simple-table tbody tr:hover td { background: #f0f6fe; }
.page-stage > .tabs button.active { color: #163d69; }
.dashboard-command.command-deck { background: linear-gradient(108deg, #102d4b 0%, #174f82 54%, #296fae 100%); }
.dashboard-command h2 em { color: #a9d7ff; }
.command-title-line { color: #b7daf7; }
.network-caption span { color: #a9d7ff; }
.flow-core { background: #2674c9; box-shadow: 0 0 0 12px rgba(142,199,255,.12), 0 0 46px rgba(71,151,232,.28); }
.flow-node:hover { background: rgba(33, 100, 165, .93); border-color: #a9d7ff; }
.dashboard-kpi::before { background: #2674c9; }
button.primary, .primary-btn, .action-btn.primary, .btn-primary { background: #2674c9; border-color: #2674c9; }
button.primary:hover, .primary-btn:hover, .action-btn.primary:hover, .btn-primary:hover { background: #1d5d9f; }
input:focus, select:focus, textarea:focus { border-color: #6eaae2; box-shadow: 0 0 0 3px rgba(38,116,201,.13); }
html.system-saving button,
html.system-saving [data-action] {
  cursor: progress !important;
  pointer-events: none !important;
}

html.system-saving::after {
  content: "正在安全保存，请勿重复操作…";
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  padding: 12px 18px;
  border-radius: 10px;
  color: #fff;
  background: rgba(15, 42, 67, 0.94);
  box-shadow: 0 10px 30px rgba(15, 42, 67, 0.25);
  font-size: 14px;
}

/* Native App usability layer. Desktop web keeps its existing layout and actions. */
html.native-app-runtime {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.native-app-runtime body,
.native-app {
  font-size: 16px;
  line-height: 1.55;
}

html.native-app-runtime button,
html.native-app-runtime input,
html.native-app-runtime select,
html.native-app-runtime textarea {
  font: inherit;
}

html.native-app-runtime button {
  height: auto;
  overflow: visible;
  white-space: normal;
  line-height: 1.25;
  word-break: keep-all;
  touch-action: manipulation;
}

html.native-app-runtime :is(.primary-btn, .ghost-btn, .mini-btn, .icon-btn, .action-btn, .btn-primary) {
  min-height: 44px;
}

html.native-app-runtime .toast {
  z-index: 10000;
}

@media (max-width: 820px) {
  .native-app.application-workspace {
    min-height: 100dvh;
    background: #f2f5f8;
  }

  .native-app .app-rail {
    display: flex;
    width: min(304px, 86vw);
    height: 100dvh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: 16px 0 36px rgba(8, 28, 48, .24);
  }

  .native-app .app-rail.open {
    transform: translateX(0);
  }

  .native-app .workspace-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 60px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    gap: 10px;
  }

  .native-app .workspace-topbar .top-left {
    overflow: hidden;
  }

  .native-app .workspace-topbar .crumb,
  .native-app .top-actions > .icon-btn,
  .native-app .top-actions > .ghost-btn {
    display: none;
  }

  .native-app .workspace-topbar .page-title {
    margin: 0;
    overflow: hidden;
    font-size: 20px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .native-app .mobile-menu {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 22px;
  }

  .native-app .user-badge {
    min-width: 42px;
  }

  .native-app .avatar {
    width: 38px;
    height: 38px;
  }

  .native-app .workspace-content {
    padding: 0 12px calc(92px + env(safe-area-inset-bottom));
  }

  .native-app .page-context {
    min-height: 50px;
    padding: 10px 2px 0;
  }

  .native-app .page-kicker {
    font-size: 10px;
    letter-spacing: .08em;
  }

  .native-app .page-stage {
    padding-top: 10px;
  }

  .native-app .card {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .native-app .toolbar,
  .native-app .toolbar-right,
  .native-app .filter-panel,
  .native-app .filter-actions,
  .native-app .table-controls {
    width: 100%;
    min-width: 0;
  }

  .native-app .toolbar,
  .native-app .toolbar-right,
  .native-app .table-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .native-app .toolbar h3,
  .native-app .simple-head h3 {
    font-size: 18px;
    line-height: 1.35;
  }

  .native-app .desc,
  .native-app .toolbar p {
    font-size: 14px;
    line-height: 1.55;
  }

  .native-app .toolbar-right > button,
  .native-app .filter-actions > button,
  .native-app .table-controls button,
  .native-app .modal-actions button {
    width: 100% !important;
    max-width: none;
    padding: 11px 14px;
  }

  .native-app .pager-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .native-app .pager-actions > span {
    grid-column: 1 / -1;
    white-space: nowrap;
  }

  .native-app .filter-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .native-app .field label {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.35;
  }

  .native-app input,
  .native-app select,
  .native-app textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.4;
  }

  .native-app .simple-table tbody tr {
    padding: 8px 12px;
    border-radius: 12px;
  }

  .native-app .simple-table td {
    grid-template-columns: minmax(86px, 34%) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .native-app .simple-table td::before {
    font-size: 13px;
    line-height: 1.45;
  }

  .native-app .mobile-bottom-nav {
    min-height: 68px;
    padding-top: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .native-app .mobile-bottom-nav button {
    min-width: 0;
    min-height: 54px;
    padding: 4px 1px;
    gap: 1px;
    font-size: 20px;
  }

  .native-app .mobile-bottom-nav button em {
    max-width: none;
    overflow: visible;
    font-size: 11px;
    line-height: 1.15;
    text-overflow: clip;
    white-space: nowrap;
  }

  .native-app .todo-workspace {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .native-app .todo-filter-panel {
    order: -1;
    margin: 0;
    border-color: #cfdced;
    background: #f3f7fc;
  }

  html.native-app-runtime .modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }

  html.native-app-runtime .modal-body {
    padding: 16px 14px;
  }

  html.native-app-runtime .modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

.power-rate-dropzone { display: grid; gap: 8px; padding: 22px; border: 2px dashed #a9bfd7; border-radius: 14px; background: #f7fbff; text-align: center; cursor: pointer; transition: .18s ease; }
.power-rate-dropzone:hover, .power-rate-dropzone.is-dragging { border-color: #2b7bc9; background: #edf6ff; transform: translateY(-1px); }
.power-rate-dropzone.has-files { border-style: solid; border-color: #7cae91; background: #f2faf5; }
.power-rate-dropzone input[type="file"] { width: 100%; }
.power-rate-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.power-rate-warnings { display: grid; gap: 5px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #e7c878; border-radius: 10px; background: #fff9e8; color: #72551b; }
.power-rate-table input, .power-rate-table select { min-width: 130px; }
.power-rate-table th:first-child, .power-rate-table td:first-child { min-width: 220px; }
.power-rate-empty { margin-top: 0; }

/* Final placement overrides for the fixed desktop navigation and mobile task cards. */
@media (min-width: 821px) {
  .application-workspace .app-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: 272px;
    height: 100dvh;
    overflow-y: auto;
    z-index: 60;
  }
  .application-workspace .workspace-main { grid-column: 2 / 3; }
}
@media (min-width: 821px) and (max-width: 1180px) {
  .application-workspace .app-rail { width: 230px; }
}
@media (max-width: 820px) {
  .native-app .resizable-table-wrap:has(.monthly-task-table) { width: 100%; min-width: 0; overflow: visible; resize: none; border: 0; }
  .native-app .monthly-task-table,
  .native-app .monthly-task-table tbody,
  .native-app .monthly-task-table tr,
  .native-app .monthly-task-table td { width: 100%; min-width: 0 !important; max-width: 100%; overflow: visible; text-overflow: clip; }
  .native-app .monthly-task-table { min-width: 0 !important; }
  .native-app .monthly-task-table td:empty { display: none; }
}

/* Native App mobile design system v2: phone-first navigation, cards and keyboard safety. */
html.native-app-runtime {
  --native-viewport-height: 100dvh;
  --native-keyboard-height: 0px;
  height: 100%;
  overflow-x: hidden;
  scroll-padding-top: 78px;
  scroll-padding-bottom: calc(110px + var(--native-keyboard-height));
  background: #f2f5f8;
}

html.native-app-runtime body {
  min-height: var(--native-viewport-height);
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

@media (max-width: 820px) {
  .native-app.application-workspace,
  .native-app .workspace-main {
    width: 100%;
    min-width: 0;
    min-height: var(--native-viewport-height);
    background: #f2f5f8;
  }

  .native-app .workspace-topbar {
    position: sticky;
    top: 0;
    z-index: 65;
    min-height: calc(58px + env(safe-area-inset-top));
    padding: calc(7px + env(safe-area-inset-top)) 12px 7px;
    border-bottom: 1px solid rgba(207, 217, 229, .85);
    background: rgba(250, 252, 255, .96);
    backdrop-filter: blur(18px);
    box-shadow: 0 3px 14px rgba(21, 44, 70, .06);
  }

  .native-app .workspace-topbar .page-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.02em;
  }

  .native-app .page-context {
    display: none;
  }

  .native-app .workspace-content {
    width: 100%;
    max-width: 100%;
    padding: 12px 10px calc(88px + env(safe-area-inset-bottom));
  }

  .native-app .page-stage {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 0;
  }

  .native-app .page-stage > :is(.tabs, .sub-tabs) {
    display: none !important;
  }

  .native-app .mobile-rule-panel {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d9e3ed;
    border-radius: 12px;
    background: #f6f9fc;
  }

  .native-app .mobile-rule-panel summary {
    min-height: 46px;
    padding: 12px 13px;
    color: #31516f;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
  }

  .native-app .mobile-rule-panel p {
    margin: 0;
    padding: 0 13px 13px;
  }

  .native-app .mobile-secondary-bar {
    position: sticky;
    top: calc(58px + env(safe-area-inset-top));
    z-index: 55;
    gap: 7px;
    padding: 8px 10px 9px;
    scroll-padding-inline: 10px;
    border-bottom: 1px solid #dce4ed;
    background: rgba(242, 245, 248, .96);
    backdrop-filter: blur(16px);
  }

  .native-app .mobile-secondary-bar button {
    max-width: none;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid #d5dee8;
    border-radius: 12px;
    color: #41556b;
    background: #fff;
    box-shadow: 0 2px 7px rgba(23, 50, 77, .04);
    font-size: 13px;
    font-weight: 700;
    text-overflow: clip;
  }

  .native-app .mobile-secondary-bar button.active {
    border-color: #1f6fbe;
    color: #fff;
    background: #1f6fbe;
    box-shadow: 0 5px 14px rgba(31, 111, 190, .22);
  }

  .native-app :is(.card, .fuel-list-shell, .power-ledger-shell) {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 15px 13px;
    overflow: visible;
    border: 1px solid #dce4ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(25, 48, 72, .055);
  }

  .native-app :is(.toolbar, .simple-head, .anomaly-head, .power-page-head) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  .native-app :is(.toolbar h2, .toolbar h3, .simple-head h3, .power-page-head h2) {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
  }

  .native-app :is(.desc, .toolbar p, .simple-head p, .power-page-head p, .rule-panel p) {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.6;
  }

  .native-app :is(.toolbar-right, .filter-actions, .table-controls) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .native-app :is(.toolbar-right, .filter-actions, .table-controls) > :only-child {
    grid-column: 1 / -1;
  }

  .native-app :is(.toolbar-right, .filter-actions, .table-controls) > button,
  .native-app .modal-actions > button {
    width: 100% !important;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 15px;
    line-height: 1.25;
  }

  .native-app :is(.filter-panel, .power-audit-filter, .power-search, .power-inline-form) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    gap: 11px;
    margin: 12px 0;
    padding: 13px;
    border: 1px solid #d9e3ed;
    border-radius: 14px;
    background: #f6f9fc;
  }

  .native-app .field,
  .native-app .compact-field,
  .native-app .power-inline-form label {
    width: 100%;
    min-width: 0;
  }

  .native-app .field label,
  .native-app .power-inline-form label > span {
    display: block;
    margin: 0 0 6px;
    color: #42566c;
    font-size: 13px;
    font-weight: 750;
  }

  .native-app input:not([type="checkbox"]):not([type="radio"]),
  .native-app select,
  .native-app textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    border-radius: 11px;
    font-size: 16px;
    line-height: 1.4;
    scroll-margin-top: 100px;
    scroll-margin-bottom: calc(120px + var(--native-keyboard-height));
  }

  .native-app textarea {
    min-height: 110px;
    resize: vertical;
  }

  .native-app input:focus,
  .native-app select:focus,
  .native-app textarea:focus {
    border-color: #2477c7;
    box-shadow: 0 0 0 3px rgba(36, 119, 199, .14);
  }

  .native-app .table-top-scroll {
    display: none !important;
  }

  .native-app :is(.resizable-table-wrap, .table-scroll-wrap, .mobile-card-table-wrap) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    resize: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .native-app table.mobile-card-table,
  .native-app table.mobile-card-table :is(tbody, tr, td) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .native-app table.mobile-card-table {
    display: block;
    table-layout: auto !important;
    overflow: visible !important;
    white-space: normal;
  }

  .native-app table.mobile-card-table > thead {
    display: none !important;
  }

  .native-app table.mobile-card-table > tbody {
    display: grid;
    gap: 12px;
  }

  .native-app table.mobile-card-table > tbody > tr.mobile-card-row {
    display: grid;
    gap: 0;
    padding: 12px 13px;
    overflow: hidden;
    border: 1px solid #dce5ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(20, 47, 73, .055);
  }

  .native-app table.mobile-card-table > tbody > tr.mobile-card-row > td {
    display: grid;
    grid-template-columns: minmax(82px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 36px;
    padding: 8px 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid #edf1f5 !important;
    color: #1e3042;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-overflow: clip !important;
  }

  .native-app table.mobile-card-table > tbody > tr.mobile-card-row > td:last-child {
    border-bottom: 0 !important;
  }

  .native-app table.mobile-card-table > tbody > tr.mobile-card-row > td::before {
    content: attr(data-label);
    color: #6b7d8f;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
  }

  .native-app table.mobile-card-table td[data-label=""]::before {
    display: none;
  }

  .native-app table.mobile-card-table td[colspan] {
    display: block !important;
    text-align: center;
  }

  .native-app table.mobile-card-table td[colspan]::before {
    display: none;
  }

  .native-app table.mobile-card-table td.mobile-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding-top: 10px !important;
  }

  .native-app table.mobile-card-table td.mobile-card-actions::before {
    flex: 0 0 100%;
  }

  .native-app table.mobile-card-table td:empty {
    display: none !important;
  }

  .native-app .mobile-secondary-bar button.mobile-secondary-parent.active {
    border-color: #b9d3ec;
    background: #eaf3fc;
    box-shadow: none;
    color: #176bb8;
  }

  .native-app table.mobile-card-table td.mobile-card-actions > button,
  .native-app table.mobile-card-table td :is(.mini-btn, .ghost-btn, .primary-btn) {
    width: auto !important;
    min-width: 88px;
    min-height: 42px;
    margin: 0;
    padding: 8px 11px;
    white-space: normal;
  }

  .native-app table.mobile-card-table td :is(input, select, textarea) {
    min-width: 0 !important;
  }

  .native-app .attendance-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .native-app .attendance-calendar,
  .native-app .week-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .native-app .attendance-week-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .native-app .week-select {
    display: flex;
    min-height: 42px;
    justify-content: flex-start;
    padding: 9px 11px;
    border-radius: 10px;
  }

  .native-app .day-cell {
    min-width: 0;
    min-height: 126px;
    padding: 10px 9px 34px;
    overflow: hidden;
    border-radius: 12px;
  }

  .native-app .day-cell strong {
    font-size: 20px;
    line-height: 1.1;
  }

  .native-app .day-cell span {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.35;
  }

  .native-app .day-cell small {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .native-app .day-status-select {
    min-height: 40px;
    padding: 7px;
    font-size: 13px;
  }

  .native-app .attendance-summary {
    order: -1;
    width: 100%;
    max-height: 260px;
    padding: 12px;
    border-radius: 12px;
  }

  .native-app .attendance-summary div {
    align-items: flex-start;
    font-size: 13px;
  }

  .native-app :is(.stats-grid, .module-grid, .mini-stats, .fuel-primary-grid, .fuel-detail-grid, .power-summary-grid, .power-info-grid, .power-command-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .native-app :is(.stat, .summary-card, .metric-card) {
    min-width: 0;
    padding: 13px 11px;
    border-radius: 13px;
  }

  .native-app .mobile-bottom-nav {
    min-height: calc(69px + env(safe-area-inset-bottom));
    padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(205, 216, 227, .9);
    background: rgba(251, 252, 254, .97);
    backdrop-filter: blur(18px);
    box-shadow: 0 -5px 18px rgba(25, 48, 72, .09);
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .native-app .mobile-bottom-nav button {
    min-height: 58px;
    padding: 5px 1px;
    border-radius: 12px;
    color: #6d7d8d;
    font-size: 21px;
  }

  .native-app .mobile-bottom-nav button em {
    max-width: 100%;
    overflow: hidden;
    font-size: 10.5px;
    font-weight: 650;
    text-overflow: ellipsis;
  }

  .native-app .mobile-bottom-nav button.active {
    color: #176bb8;
    background: #eaf3fc;
  }

  html.native-app-runtime .modal-backdrop {
    align-items: end;
    justify-items: stretch;
    padding: 0;
    background: rgba(10, 24, 39, .48);
  }

  html.native-app-runtime .modal {
    width: 100vw;
    max-width: 100vw;
    max-height: min(92dvh, var(--native-viewport-height));
    margin: 0;
    padding: 0 14px calc(12px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 48px rgba(8, 27, 47, .24);
    scroll-padding-top: 72px;
    scroll-padding-bottom: calc(92px + var(--native-keyboard-height));
  }

  html.native-app-runtime .modal-head {
    position: sticky;
    top: 0;
    z-index: 4;
    min-height: 62px;
    margin: 0 -14px 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8ef;
    background: rgba(255, 255, 255, .98);
  }

  html.native-app-runtime .modal-head h3 {
    font-size: 19px;
    line-height: 1.3;
  }

  html.native-app-runtime .modal-actions {
    position: sticky;
    bottom: calc(-12px - env(safe-area-inset-bottom));
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 16px -14px 0;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #e2e8ef;
    background: rgba(255, 255, 255, .98);
  }

  html.native-app-runtime .form-grid,
  html.native-app-runtime .record-detail-grid,
  html.native-app-runtime .power-dialog-form {
    grid-template-columns: minmax(0, 1fr);
  }

  html.native-app-runtime.native-keyboard-open .mobile-bottom-nav {
    pointer-events: none;
    opacity: 0;
    transform: translateY(110%);
  }

  html.native-app-runtime.native-keyboard-open .modal {
    max-height: var(--native-viewport-height);
    border-radius: 14px 14px 0 0;
  }

  html.native-app-runtime.native-keyboard-open .modal-actions {
    padding-bottom: 10px;
  }

  html.native-app-runtime .toast {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-width: none;
    border-radius: 12px;
    text-align: center;
  }

  html.native-app-runtime.native-keyboard-open .toast,
  html.native-app-runtime.native-input-focused .toast {
    bottom: 12px;
  }

  html.native-app-runtime.system-saving::after {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 10px;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .native-app :is(.stats-grid, .module-grid, .mini-stats, .fuel-primary-grid, .fuel-detail-grid, .power-summary-grid, .power-info-grid, .power-command-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  .native-app .workspace-content {
    padding-right: 8px;
    padding-left: 8px;
  }

  .native-app table.mobile-card-table > tbody > tr.mobile-card-row > td {
    grid-template-columns: minmax(76px, 32%) minmax(0, 1fr);
  }
}

@media (max-width: 820px) and (orientation: landscape) {
  .native-app .attendance-calendar,
  .native-app .week-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html.native-app-runtime .modal {
    max-height: var(--native-viewport-height);
  }
}

/* 2026-08-27 dashboard modules, menu hierarchy and native keyboard correction. */
.dashboard-overview-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; padding:25px 28px; overflow:hidden; border:1px solid #dce7f1; border-radius:22px; background:linear-gradient(130deg,#0e355b 0%,#155f91 52%,#31a7a0 100%); color:#fff; box-shadow:0 18px 42px rgba(15,53,87,.14); }
.dashboard-overview-head span { font-size:11px; font-weight:800; letter-spacing:.16em; opacity:.72; }
.dashboard-overview-head h2 { margin:7px 0 4px; font-size:31px; }
.dashboard-overview-head p { margin:0; opacity:.82; }
.dashboard-privacy { flex:0 0 auto; padding:9px 13px; border:1px solid rgba(255,255,255,.25); border-radius:999px; background:rgba(255,255,255,.12); font-size:12px; font-weight:750; }
.dashboard-privacy.masked { background:rgba(19,35,52,.32); }
.dashboard-business-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.dashboard-business-card { position:relative; min-width:0; overflow:hidden; padding:22px; border:1px solid #e1e8ef; border-radius:20px; box-shadow:0 12px 30px rgba(18,43,66,.06); }
.dashboard-business-card::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:var(--dashboard-accent,#2879c5); }
.dashboard-todo { --dashboard-accent:#e39a31; grid-column:1/-1; background:linear-gradient(135deg,#fffdf8,#fff); }
.dashboard-salary { --dashboard-accent:#8a66d7; }
.dashboard-vehicle { --dashboard-accent:#238fc2; }
.dashboard-power { --dashboard-accent:#28a17a; grid-column:1/-1; }
.dashboard-module-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:17px; }
.dashboard-module-head span { color:#173b5c; font-size:20px; font-weight:800; }
.dashboard-module-head p { margin:4px 0 0; color:#708090; font-size:13px; }
.dashboard-module-head button { flex:0 0 auto; padding:8px 11px; border:0; border-radius:10px; color:#276898; background:#eef6fc; font-weight:750; cursor:pointer; }
.dashboard-number-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:15px; }
.dashboard-number-pair.triple { grid-template-columns:repeat(3,minmax(0,1fr)); }
.dashboard-number-pair>div { min-width:0; padding:15px; border:1px solid #e4eaf0; border-radius:15px; background:rgba(247,250,252,.9); }
.dashboard-number-pair strong,.dashboard-number-pair span { display:block; }
.dashboard-number-pair strong { overflow-wrap:anywhere; color:#163e61; font-size:24px; line-height:1.2; }
.dashboard-number-pair span { margin-top:6px; color:#778696; font-size:12px; }
.dashboard-month-list,.dashboard-settlement-list { display:grid; gap:0; }
.dashboard-month-list>div,.dashboard-settlement-list>div { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:45px; padding:10px 4px; border-top:1px solid #edf0f3; }
.dashboard-month-list>div:first-child,.dashboard-settlement-list>div:first-child { border-top:0; }
.dashboard-month-list span,.dashboard-settlement-list span { color:#667789; }
.dashboard-month-list strong,.dashboard-settlement-list strong { color:#193e5e; text-align:right; }
.dashboard-power-projects { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.dashboard-power-project { min-width:0; padding:15px; border:1px solid #dfeae6; border-radius:15px; background:#f7fbf9; }
.dashboard-power-project>strong { display:block; margin-bottom:11px; color:#184b3b; font-size:15px; }
.dashboard-power-project>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.dashboard-power-project span { color:#76877f; font-size:11px; }
.dashboard-power-project b { display:block; margin-top:3px; overflow-wrap:anywhere; color:#235746; font-size:13px; }
.dashboard-platform-total { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; margin-top:13px; }
.dashboard-platform-total span { padding:14px; border-radius:14px; color:#5f776e; background:#edf7f3; }
.dashboard-platform-total strong { display:block; margin-top:5px; color:#174c3a; font-size:21px; }
.dashboard-loading { padding:28px; border-radius:14px; color:#526d62; background:#f2f8f5; text-align:center; }
.power-desktop-tabs { margin-bottom:16px; }
.page-stage-payroll>.tabs+.sub-tabs,.page-stage-payroll>.tabs+.sub-tabs~.sub-tabs { margin:-4px 0 18px 18px; padding:5px 7px 5px 34px; border:1px solid #bdd1df; border-left:4px solid #5f91b4; border-radius:9px; background:#edf5fa; box-shadow:none; }
.page-stage-payroll>.tabs+.sub-tabs::before { content:"三级"; align-self:center; margin-left:-27px; color:#6a8ba1; font-size:10px; font-weight:800; letter-spacing:.08em; }
.page-stage-payroll .sub-tabs button { min-height:32px; padding:6px 11px; border-radius:7px; color:#527086; font-size:13px; }
.page-stage-payroll .sub-tabs button.active { color:#164f79; background:#fff; box-shadow:0 2px 6px rgba(39,77,104,.12); }

.mobile-secondary-bar button.menu-level-3 { border-style:dashed; color:#526d7d; background:#f2f6f8; font-size:13px; }
.mobile-secondary-bar button.menu-level-3>span { margin-right:5px; opacity:.55; }
.mobile-secondary-bar button.menu-level-3.active { border-color:#86a9bf; color:#164b70; background:#deedf6; box-shadow:none; }
.flyout-tertiary { position:relative; padding-left:25px !important; font-size:13px !important; }
.flyout-tertiary::before { content:""; position:absolute; left:12px; width:5px; height:5px; border-radius:50%; background:#7fa8c8; }

@media (min-width:821px) {
  .application-workspace .app-rail { overflow:visible; z-index:600; }
  .application-workspace .workspace-main { position:relative; z-index:1; }
  .application-workspace .workspace-nav,.application-workspace .nav-item-wrap { overflow:visible; }
  .application-workspace .nav-item-wrap>.nav-flyout { max-height:none; overflow:visible; z-index:900; }
  .application-workspace .tertiary-flyout { max-height:none; overflow:visible; z-index:910; }
}

@media (max-width:820px) {
  .power-desktop-tabs { display:none; }
  .dashboard-overview-head { align-items:flex-start; flex-direction:column; padding:19px; border-radius:17px; }
  .dashboard-overview-head h2 { font-size:25px; }
  .dashboard-business-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .dashboard-business-card,.dashboard-todo,.dashboard-power { grid-column:1; padding:16px 14px; border-radius:16px; }
  .dashboard-module-head span { font-size:18px; }
  .dashboard-module-head button { font-size:12px; }
  .dashboard-number-pair.triple { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-number-pair.triple>div:last-child { grid-column:1/-1; }
  .dashboard-number-pair strong { font-size:20px; }
  .dashboard-power-projects { grid-template-columns:minmax(0,1fr); }
  .dashboard-month-list>div,.dashboard-settlement-list>div { align-items:flex-start; flex-direction:column; gap:4px; }
  .dashboard-month-list strong,.dashboard-settlement-list strong { text-align:left; }
  .dashboard-platform-total { grid-template-columns:minmax(0,1fr); }
}

@media (max-width:820px) {
  html.native-app-runtime.native-keyboard-open .modal-backdrop,
  html.native-app-runtime.native-keyboard-open .power-dialog-backdrop { inset:0; height:var(--native-viewport-height); min-height:var(--native-viewport-height); align-items:start; place-items:start stretch; padding:0; overflow:hidden; }
  html.native-app-runtime .power-dialog-backdrop { padding:0; align-items:end; }
  html.native-app-runtime .power-dialog { width:100vw; max-width:100vw; max-height:min(92dvh,var(--native-viewport-height)); margin:0; overflow-y:auto; border-radius:20px 20px 0 0; scroll-padding-top:70px; scroll-padding-bottom:90px; }
  html.native-app-runtime.native-keyboard-open .modal,
  html.native-app-runtime.native-keyboard-open .power-dialog { width:100vw; height:var(--native-viewport-height); max-height:var(--native-viewport-height); margin:0; border-radius:0; overflow-y:auto; scroll-padding-bottom:120px; }
  html.native-app-runtime.native-keyboard-open :is(.modal,.power-dialog) input:focus,
  html.native-app-runtime.native-keyboard-open :is(.modal,.power-dialog) textarea:focus,
  html.native-app-runtime.native-keyboard-open :is(.modal,.power-dialog) select:focus { scroll-margin-top:90px; scroll-margin-bottom:130px; }
  html.native-app-runtime .power-dialog-head { position:sticky; top:0; z-index:5; padding:12px 14px; background:#fff; }
  html.native-app-runtime .power-dialog-form { padding:14px; }
  html.native-app-runtime .power-dialog-footer { position:sticky; bottom:0; z-index:4; margin:8px -14px -14px; padding:10px 14px calc(10px + env(safe-area-inset-bottom)); background:#fff; }
}
