:root {
  color-scheme: light;
  --ink: #18231f;
  --muted: #69756f;
  --line: #dde5e1;
  --soft: #f4f7f5;
  --panel: #ffffff;
  --green: #5f8d78;
  --green-dark: #2f5549;
  --green-soft: #edf6f1;
  --amber: #bc7510;
  --amber-soft: #fff2d8;
  --red: #b84848;
  --red-soft: #fbe9e7;
  --blue: #3b6f92;
  --blue-soft: #e7f1f8;
  --shadow: 0 12px 30px rgba(25, 47, 38, 0.07);
  --dialog-title-size: 21px;
  --dialog-section-title-size: 16px;
  --dialog-label-size: 12px;
  --dialog-body-size: 14px;
  --dialog-input-size: 15px;
  --dialog-button-size: 16px;
  --dialog-title-weight: 800;
  --dialog-label-weight: 700;
  --dialog-body-weight: 500;
  --module-search-width: 320px;
  --module-search-min-width: 220px;
  font-family: Inter, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body { height: 100%; margin: 0; overflow: hidden; color: var(--ink); background: #f1f5f2; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { --topbar-height: 64px; --page-bg: #f1f5f2; position: relative; height: 100vh; min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #65dda6; box-shadow: 0 0 0 4px rgba(101,221,166,.12); }

main { grid-column: 1; grid-row: 2; min-width: 0; height: calc(100vh - var(--topbar-height)); overflow: auto; padding: 28px 30px 50px; overscroll-behavior: contain; scrollbar-color: rgba(102, 116, 108, .45) transparent; scrollbar-width: thin; scrollbar-gutter: stable; transition: height .24s cubic-bezier(.2, .72, .2, 1); }
main::-webkit-scrollbar { width: 10px; height: 10px; }
main::-webkit-scrollbar-track { background: transparent; }
main::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(102, 116, 108, .38);
  background-clip: content-box;
}
main::-webkit-scrollbar-thumb:hover { background: rgba(102, 116, 108, .55); background-clip: content-box; }
main > section { transform-origin: 50% 18px; }
main.view-switching-out > section:not([hidden]) { opacity: 0; transform: translateY(5px); transition: opacity .09s ease, transform .09s ease; }
main.view-switching-in > section:not([hidden]) { animation: viewFadeIn .18s cubic-bezier(.2, .7, .2, 1) both; }

.app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page) {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(102, 116, 108, .45) transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}
.app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page)::-webkit-scrollbar { width: 10px; height: 10px; }
.app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page)::-webkit-scrollbar-track { background: transparent; }
.app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page)::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(102, 116, 108, .38);
  background-clip: content-box;
}
.app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page)::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 116, 108, .55);
  background-clip: content-box;
}
.app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page) main {
  height: auto;
  min-height: calc(100vh - var(--topbar-height));
  overflow: visible;
  scrollbar-gutter: auto;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .topbar,
  .top-module-tab,
  .top-module-nav::before { transition: none; }
  main.view-switching-out > section:not([hidden]),
  main.view-switching-in > section:not([hidden]) { animation: none; opacity: 1; transform: none; transition: none; }
}
.topbar, .schedule-heading, .section-heading, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { position: sticky; top: 0; z-index: 120; grid-column: 1 / -1; grid-row: 1; min-height: 64px; margin: 0; padding: 10px 24px; border-bottom: 1px solid rgba(221, 229, 225, .9); background: rgba(241, 245, 242, .96); backdrop-filter: blur(10px); transition: box-shadow .18s ease; }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 0 auto; }
.topbar-context { display: none; }
.top-module-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: min(58vw, 560px);
  height: 40px;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid #dbe5e0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 5px 14px rgba(25, 47, 38, .04);
  scrollbar-width: none;
}
.top-module-nav::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: var(--top-module-active-width, 82px);
  height: 32px;
  border-radius: 11px;
  background: var(--green);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transform: translateX(var(--top-module-active-x, 0px));
  transition: transform .28s cubic-bezier(.2, .72, .2, 1), width .28s cubic-bezier(.2, .72, .2, 1);
  pointer-events: none;
}
.top-module-nav::-webkit-scrollbar { display: none; }
.top-module-tab {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 82px;
  height: 32px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: #6e7d76;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  background: transparent;
  transition: color .18s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.top-module-tab:hover,
.top-module-tab:focus-visible {
  color: var(--green-dark);
  background: rgba(244, 250, 246, .9);
  outline: none;
}
.top-module-tab.active {
  color: white;
  background: transparent;
  box-shadow: none;
}
.top-module-tab:active { transform: scale(.98); }
h1, h2, p { margin: 0; }
h1 { margin-top: 4px; font-size: 28px; letter-spacing: -.03em; }
h2 { margin-top: 4px; font-size: 19px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.top-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.office-scope { --office-scope-width: clamp(150px, 11vw, 220px); position: relative; display: block; width: var(--office-scope-width); }
.office-scope select { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.office-scope-button { display: inline-flex; align-items: center; gap: 9px; width: 100%; height: 40px; padding: 0 14px; border: 1px solid #dbe5e0; border-radius: 14px; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1; background: rgba(255, 255, 255, .76); box-shadow: 0 5px 14px rgba(25, 47, 38, .04); transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.office-scope-button:hover, .office-scope-button:focus-visible, .office-scope.is-open .office-scope-button { border-color: #c7d8d0; background: #f4faf6; box-shadow: 0 8px 20px rgba(35, 58, 49, .08); }
.office-scope-button:disabled { cursor: default; opacity: .62; box-shadow: none; }
.office-scope-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #6f987f; box-shadow: 0 0 0 3px rgba(111, 152, 127, .12); }
.office-scope-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-scope-arrow { flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid #6e7d76; border-bottom: 2px solid #6e7d76; transform: translateY(-2px) rotate(45deg); transition: transform .16s ease; }
.office-scope.is-open .office-scope-arrow { transform: translateY(2px) rotate(225deg); }
.office-scope-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 130; display: grid; gap: 4px; box-sizing: border-box; width: 100%; max-height: min(320px, calc(100vh - 120px)); padding: 10px; border: 1px solid #dbe5e0; border-radius: 16px; background: white; box-shadow: 0 18px 38px rgba(35, 58, 49, .14); overflow: auto; }
.office-scope-option { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 8px 10px; border: 0; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; background: transparent; }
.office-scope-option:hover { background: #f4faf6; }
.office-scope-option.is-active { background: #edf6f1; }
.office-scope-option-dot { width: 8px; height: 8px; border: 1.5px solid #b9c6c0; border-radius: 50%; }
.office-scope-option.is-active .office-scope-option-dot { border-color: #6f987f; background: #6f987f; }
.office-scope-option span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-scope-option em { color: #6f987f; font-size: 12px; font-style: normal; font-weight: 500; }
.language-switcher { display: grid; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.language-switcher select { min-width: 88px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-weight: 700; background: white; }
.current-user { text-align: right; }
.current-user span, .current-user small { display: block; }
.current-user span { font-size: 13px; font-weight: 800; }
.current-user small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.avatar { position: relative; display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 0; border-radius: 50%; color: white; font-weight: 700; background: var(--green); }
.avatar-image { width: 100%; height: 100%; object-fit: cover; }
.avatar.has-photo .avatar-initial { display: none; }
.user-menu { position: relative; }
.user-menu-button { display: flex; align-items: center; justify-content: center; gap: 0; padding: 2px; border: 1px solid transparent; border-radius: 999px; color: var(--ink); background: transparent; }
.user-menu-button .current-user { display: none; }
.user-menu-button:hover, .user-menu-button[aria-expanded="true"] { border-color: var(--line); background: white; }
.avatar-camera-button { position: absolute; right: -2px; bottom: -1px; z-index: 2; display: grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 2px solid white; border-radius: 50%; color: var(--ink); background: white; box-shadow: 0 3px 8px rgba(21, 43, 34, .18); transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.avatar-camera-button:hover, .avatar-camera-button:focus-visible { border-color: #f7faf8; background: #f7faf8; transform: translateY(-1px); box-shadow: 0 5px 12px rgba(21, 43, 34, .24); }
.avatar-camera-button svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.user-menu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 130; display: grid; min-width: 190px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.user-menu-panel button { width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; color: var(--ink); font-weight: 800; text-align: left; background: transparent; }
.user-menu-panel button:hover { background: var(--soft); }
.user-menu-panel .danger-link { color: var(--red); }
.settings-summary { display: grid; gap: 16px; }
.settings-section { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.settings-section-heading h3 { margin: 3px 0 0; font-size: 16px; }
.settings-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.settings-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 86px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-align: left; background: #fbfdfc; }
.settings-card:hover { border-color: #cbdad3; background: #f4faf6; }
.settings-card.is-disabled { cursor: default; }
.settings-card.is-disabled:hover { border-color: var(--line); background: #fbfdfc; }
.settings-card strong, .settings-card small { display: block; }
.settings-card small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.settings-card em { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: var(--green-dark); font-size: 11px; font-style: normal; font-weight: 900; background: var(--green-soft); }
.driver-entry-page-head { margin-top: 0; }
.driver-entry-panel { margin-bottom: 16px; overflow: hidden; }
.driver-entry-body { display: grid; gap: 14px; padding: 18px; }
.driver-entry-url-field { margin: 0; }
.driver-entry-url-field input { min-height: 48px; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 13px; }
.driver-entry-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.driver-entry-actions .button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding-inline: 18px; text-decoration: none; }
.driver-entry-help { display: grid; gap: 8px; padding: 18px; }
.driver-entry-help h2 { margin: 3px 0 0; font-size: 20px; }
.driver-entry-help p { margin: 0; color: var(--muted); line-height: 1.8; font-weight: 700; }
.finance-control-panel { margin-bottom: 16px; }
.finance-status-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.finance-status-pills span { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid #d7e5de; border-radius: 999px; color: var(--green-dark); font-size: 12px; font-weight: 800; background: #fbfdfc; }
.finance-settings-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.finance-settings-page-head h2 { margin: 4px 0 0; font-size: 28px; }
.finance-settings-page-head .button { min-height: 44px; padding-inline: 22px; border-radius: 11px; }
.finance-settings-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.finance-settings-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 8px 22px rgba(35, 58, 49, .06); }
.finance-settings-summary span { color: var(--muted); font-weight: 800; }
.finance-settings-summary strong { font-size: 18px; font-weight: 900; white-space: nowrap; }
.finance-settings-form { display: grid; gap: 16px; margin-bottom: 16px; }
.finance-settings-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 16px; align-items: start; }
.finance-settings-panel { overflow: hidden; margin: 0; }
.finance-settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.finance-settings-card-head h2 { margin: 3px 0 0; font-size: 20px; }
.finance-settings-card-head small { color: var(--muted); font-weight: 800; }
.finance-settings-unified { margin-bottom: 16px; }
.finance-settings-unified .finance-settings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 16px 18px; margin: 0; }
.finance-settings-unified .finance-settings-grid .field:nth-last-child(-n+2) { grid-column: span 1; }
.finance-settings-form .field.compact { margin: 0; }
.finance-settings-form .field select,
.finance-settings-form .field input:not([type="checkbox"]),
.finance-settings-form .field textarea { min-height: 46px; }
.finance-rules-stack { display: grid; gap: 14px; padding: 18px; }
.finance-rules-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 0 18px 18px; }
.finance-rule-card { display: grid; gap: 7px; min-height: 74px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; }
.finance-rule-card span { color: var(--muted); font-size: 12px; font-weight: 800; }
.finance-rule-card select { width: 100%; min-height: 30px; padding: 0; border: 0; color: var(--ink); background: transparent; font-weight: 900; }
.finance-rule-card select:focus { outline: 2px solid #76aa99; outline-offset: 3px; }
.finance-rule-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.finance-rule-switch input { appearance: none; position: relative; flex: 0 0 42px; width: 42px; height: 24px; margin: 0; border: 0; border-radius: 999px; background: #c8d8d0; cursor: pointer; transition: background .16s ease; }
.finance-rule-switch input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 999px; background: white; box-shadow: 0 2px 6px rgba(35, 58, 49, .18); transition: transform .16s ease; }
.finance-rule-switch input:checked { background: var(--green); }
.finance-rule-switch input:checked::after { transform: translateX(18px); }
.finance-toggle-field { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; }
.finance-toggle-field span { margin: 0; }
.finance-toggle-field input { appearance: none; position: relative; width: 42px; height: 24px; margin: 0; border: 0; border-radius: 999px; background: #c8d8d0; cursor: pointer; transition: background .16s ease; }
.finance-settings-form .finance-toggle-field input { flex: 0 0 42px; width: 42px; min-height: 0; padding: 0; }
.finance-toggle-field input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 999px; background: white; box-shadow: 0 2px 6px rgba(35, 58, 49, .18); transition: transform .16s ease; }
.finance-toggle-field input:checked { background: var(--green); }
.finance-toggle-field input:checked::after { transform: translateX(18px); }
.finance-master-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 16px; align-items: start; }
.finance-master-panel { overflow: hidden; }
.finance-master-pill { flex: 0 0 auto; min-height: 30px; padding: 5px 10px; border: 1px solid #d7e5de; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; font-weight: 900; }
.finance-master-list { display: grid; padding: 8px 18px 14px; }
.finance-master-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); }
.finance-master-row strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.finance-master-row small { justify-self: end; color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.finance-master-code { color: var(--muted); font-size: 12px; font-weight: 900; }
.finance-master-more-row { min-height: 34px; display: grid; place-items: center; color: var(--muted); font-size: 12px; font-weight: 800; background: #fbfdfc; }
.finance-master-panel .vehicle-table-wrap { max-height: none; overflow: visible; }
.finance-master-panel .vehicle-table { min-width: 0; table-layout: fixed; border-collapse: collapse; }
.finance-master-panel .vehicle-table th,
.finance-master-panel .vehicle-table td { height: 48px; padding: 0 16px; white-space: normal; }
.finance-master-panel .vehicle-table th:first-child { min-width: 0; width: 92px; }
.finance-master-panel .vehicle-table th:nth-child(3),
.finance-master-panel .vehicle-table th:nth-child(4) { width: 96px; }
.finance-master-panel .finance-tax-table th:nth-child(2),
.finance-master-panel .finance-tax-table th:nth-child(3) { width: 78px; }
.finance-master-more-row td { color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; background: #fbfdfc; }
.finance-master-more-row:hover td { background: #fbfdfc; }
.finance-section-tabs {
  --finance-tab-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  align-items: center;
  gap: 4px;
  width: fit-content;
  height: 46px;
  margin-bottom: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: white;
  flex-wrap: nowrap;
  align-self: center;
}
.finance-section-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(35, 58, 49, .08);
  transform: translateX(calc(var(--finance-tab-index) * (100% + 4px)));
  transition: transform .24s ease, background-color .2s ease, box-shadow .2s ease;
}
.finance-section-tabs .subpage-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 700; line-height: 1; white-space: nowrap; background: transparent; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .18s ease; }
.finance-section-tabs .subpage-tab:hover:not(.active) { color: var(--green-dark); background: #f3f8f5; }
.finance-section-tabs .subpage-tab.active,
.finance-section-tabs .subpage-tab.active:hover { color: white; background: transparent; box-shadow: none; }
.finance-section-tabs .subpage-tab:disabled { cursor: default; opacity: .52; }
.finance-record-toolbar { align-items: center; min-height: 72px; gap: 20px; padding: 0 24px; }
.finance-toolbar-controls { width: auto; margin-left: auto; }
.finance-toolbar-controls .vehicle-search { flex: 0 1 var(--module-search-width); min-width: var(--module-search-min-width); }
.finance-record-toolbar .filter-select { min-height: 42px; min-width: 132px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font-weight: 800; }
.finance-tab-panel[hidden],
.finance-summary-toolbar[hidden],
.finance-record-toolbar[hidden] { display: none !important; }
.finance-native-select { display: none !important; }
.finance-select { position: relative; min-width: 132px; }
.finance-select-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font-size: 14px; font-weight: 700; line-height: 1; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(35, 58, 49, .02); }
.finance-select-button::after { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .8; }
.finance-select.is-open .finance-select-button { outline: 2px solid #76aa99; border-color: transparent; }
.finance-select-list { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; left: 0; display: none; max-height: 260px; padding: 6px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 18px 34px rgba(35, 58, 49, .14); }
.finance-select.is-open .finance-select-list { display: grid; gap: 2px; }
.finance-select-option { min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; white-space: nowrap; }
.finance-select-option:hover,
.finance-select-option:focus-visible { background: #eef6f1; outline: none; }
.finance-select-option.active { color: var(--green-dark); background: var(--green-soft); }
.dialog-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; }
.dialog-promoted-save { order: 20; }
.dialog-heading-actions .icon-button,
.modal-header-actions .icon-button,
.vehicle-action-buttons .icon-button { order: 30; }
.dialog-actions.is-promoted-empty { display: none !important; }
.finance-dialog-section { display: grid; gap: 12px; }
.finance-record-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.finance-record-grid .field.compact { margin: 0; }
.finance-record-grid .field input,
.finance-record-grid .field select,
.finance-record-grid .field textarea { min-height: 46px; }
.finance-record-date-field,
.finance-record-direction-field,
.finance-record-account-field,
.finance-record-tax-field,
.finance-record-amount-field,
.finance-record-tax-preview-field,
.finance-record-counterparty-field,
.finance-record-payment-field,
.finance-record-document-field {
  grid-column: span 4;
}
.finance-record-description-field,
.finance-record-notes-field { grid-column: span 2; }
.finance-record-grid .finance-record-description-field,
.finance-record-grid .finance-record-notes-field {
  grid-column: 1 / -1;
}
.finance-tax-hint {
  margin: -2px 0 0;
  color: #7b8a82;
  font-size: 11px;
  font-weight: 700;
}
.finance-record-table { min-width: 900px; }
.finance-record-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.finance-record-table td:nth-child(7),
.finance-record-table td:nth-child(8),
.finance-record-table th:nth-child(7),
.finance-record-table th:nth-child(8) { text-align: right; font-variant-numeric: tabular-nums; }
.finance-record-row { cursor: pointer; }
.finance-record-row:focus-within td,
.finance-record-row:hover td { background: #f5faf7; }

.vehicle-table tbody tr:is(
  [data-driver-detail],
  [data-office-staff-detail],
  [data-vehicle-id],
  [data-rollcall-detail],
  [data-daily-report-detail],
  [data-finance-detail],
  [data-accident-id],
  [data-education-id]
) {
  cursor: pointer;
}

.vehicle-table tbody tr:is(
  [data-driver-detail],
  [data-office-staff-detail],
  [data-vehicle-id],
  [data-rollcall-detail],
  [data-daily-report-detail],
  [data-finance-detail],
  [data-accident-id],
  [data-education-id]
):hover td {
  background: #f5faf7;
}
.finance-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.finance-detail-grid > div { display: grid; gap: 6px; min-height: 74px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.finance-detail-grid > div:nth-child(3n) { border-right: 0; }
.finance-detail-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.finance-detail-grid span { color: var(--muted); font-size: 11px; font-weight: 800; }
.finance-detail-grid strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 800; }
.finance-ledger-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 16px; align-items: start; }
.finance-section-heading { margin-bottom: 12px; }
.finance-account-table td strong,
.finance-tax-table td strong { display: block; font-size: 14px; }
.finance-tax-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.finance-summary-toolbar { align-items: center; min-height: 86px; gap: 18px; padding: 14px 24px; }
.finance-summary-period-controls { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; margin-left: 0; }
.finance-summary-mode-tabs,
.finance-chart-mode-tabs { position: relative; display: inline-grid; gap: 4px; align-items: center; min-height: 46px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: white; }
.finance-summary-mode-tabs { --finance-summary-mode-index: 0; grid-template-columns: repeat(2, minmax(58px, 1fr)); }
.finance-chart-mode-tabs { --finance-chart-mode-index: 0; grid-template-columns: repeat(3, minmax(58px, 1fr)); }
.finance-summary-mode-tabs::before,
.finance-chart-mode-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(35, 58, 49, .08);
  transition: transform .24s ease, background-color .2s ease, box-shadow .2s ease;
}
.finance-summary-mode-tabs::before {
  width: calc((100% - 12px) / 2);
  transform: translateX(calc(var(--finance-summary-mode-index) * (100% + 4px)));
}
.finance-chart-mode-tabs::before {
  width: calc((100% - 16px) / 3);
  transform: translateX(calc(var(--finance-chart-mode-index) * (100% + 4px)));
}
.finance-summary-mode-tabs button,
.finance-chart-mode-tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-width: 58px; min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 15px; font-weight: 700; cursor: pointer; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .18s ease; }
.finance-summary-mode-tabs button.active,
.finance-chart-mode-tabs button.active { color: white; background: transparent; box-shadow: none; }
.finance-period-step,
.finance-period-label,
.finance-summary-filter-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font-weight: 800; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(35, 58, 49, .02); }
.finance-period-step { width: 48px; font-size: 20px; font-weight: 700; }
.finance-period-label { min-width: 210px; padding: 0 22px; font-size: 16px; font-weight: 700; }
.finance-summary-filter-button {
  position: relative;
  width: 46px;
  min-height: 46px;
  margin-left: auto;
  padding: 0;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(35, 58, 49, .08), inset 0 0 0 1px rgba(35, 58, 49, .02);
}
.finance-summary-filter-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.finance-summary-filter-button.has-filter { color: var(--green); border-color: #9db7ab; background: #eef7f2; }
.finance-summary-filter-button.has-filter::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border: 2px solid #eef7f2; border-radius: 999px; background: var(--green); }
.finance-summary-list { overflow: hidden; }
.finance-summary-shell { display: grid; gap: 16px; padding: 0; overflow: hidden; }
.finance-summary-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: white; }
.finance-summary-total { display: grid; align-content: center; gap: 5px; min-height: 68px; padding: 12px 22px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: white; }
.finance-summary-total:last-child { border-right: 0; }
.finance-summary-total span { color: var(--green-dark); font-size: 13px; font-weight: 700; }
.finance-summary-total strong { font-size: 23px; font-weight: 800; line-height: 1.08; font-variant-numeric: tabular-nums; }
.finance-summary-chart-card { overflow: hidden; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: white; box-shadow: none; }
.finance-summary-chart-card .finance-summary-breakdown-head { min-height: 68px; }
.finance-chart-area { position: relative; min-height: 252px; padding: 20px 24px 14px; background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%); }
.finance-chart-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(16px, 1fr)); align-items: end; gap: 10px; height: 210px; padding: 18px 4px 0; border-bottom: 1px solid var(--line); background-image: linear-gradient(to top, transparent 49px, rgba(223, 232, 227, .8) 50px, transparent 51px); background-size: 100% 52px; }
.finance-chart-bar-slot { display: flex; align-items: flex-end; justify-content: center; min-width: 0; height: 100%; }
.finance-chart-bar { display: block; width: min(24px, 72%); min-height: 4px; border-radius: 7px 7px 0 0; background: var(--green); box-shadow: 0 8px 18px rgba(35, 58, 49, .08); }
.finance-chart-bar.negative { background: #b55c58; }
.finance-chart-axis { display: flex; justify-content: space-between; gap: 8px; min-height: 34px; padding: 0 28px 12px; color: var(--muted); font-size: 11px; font-weight: 800; background: #fbfdfc; }
.finance-chart-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 15px; font-weight: 700; background: rgba(255, 255, 255, .62); }
.finance-chart-empty[hidden] { display: none !important; }
.finance-summary-breakdown-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fbfdfc; }
.finance-summary-breakdown-head h2 { margin: 3px 0 0; font-size: 19px; font-weight: 700; }
.finance-summary-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.finance-summary-filter-grid .field.compact { margin: 0; }
.finance-summary-filter-grid .field input,
.finance-summary-filter-grid .field select { min-height: 48px; }
.finance-summary-filter-grid .field:nth-child(5) { grid-column: 1 / -1; }
.finance-summary-filter-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 4px; color: var(--muted); font-size: 13px; font-weight: 800; }
.button { padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; }
.button.ghost { color: var(--ink); border-color: var(--line); background: white; }
.button.primary { color: white; background: var(--green); }
.button.danger { color: white; background: var(--red); }
.button:disabled { cursor: not-allowed; opacity: .65; }
input.auto-managed-field[readonly] { background: #f6faf7; color: #53645d; cursor: not-allowed; }
.link-button { padding: 0; border: 0; color: var(--green); font-weight: 800; text-align: left; background: transparent; }
.link-button:hover { text-decoration: underline; }
.danger-link { color: var(--red); }
.action-cell { display: flex; gap: 10px; align-items: center; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; transition: width .18s ease, margin .18s ease, opacity .16s ease, transform .18s ease, background .15s ease, border-color .15s ease; }
.panel { border: 1px solid #e3e9e5; border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); }

.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; }
.dashboard-date { max-width: 180px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.metric-card { min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.metric-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.metric-card strong { display: block; margin-top: 12px; color: var(--green-dark); font-size: 30px; line-height: 1; }
.dashboard-reminders { padding: 20px; }
.reminder-list { display: grid; gap: 10px; margin-top: 16px; }
.reminder-item { display: grid; grid-template-columns: 92px minmax(120px, 1fr) minmax(120px, 1fr) 110px minmax(100px, .8fr); gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.reminder-item.warning { border-color: #efd59b; background: #fffaf0; }
.reminder-item.danger { border-color: #efb3ae; background: #fff7f6; }
.reminder-level { width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.reminder-item.warning .reminder-level { color: var(--amber); background: var(--amber-soft); }
.reminder-item.danger .reminder-level { color: var(--red); background: var(--red-soft); }
.reminder-item strong { overflow-wrap: anywhere; }
.reminder-item small { color: var(--muted); }
.legend-dot.warning { background: var(--amber); }
.legend-dot.danger { background: var(--red); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 14px 18px; }
.month-switcher { display: flex; align-items: end; gap: 10px; }
.month-switcher label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
input[type="month"] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
.toolbar-help { color: var(--muted); font-size: 13px; }
.toolbar-help span { margin-right: 7px; padding: 3px 7px; border-radius: 20px; color: var(--green); font-size: 11px; font-weight: 800; background: var(--green-soft); }

.status-section { margin: 28px 0; }
.date-tabs { max-width: min(630px, 55vw); display: flex; gap: 6px; padding-bottom: 3px; overflow-x: auto; }
.date-tab { flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; }
.date-tab.weekend { color: var(--red); background: #fff8f7; }
.date-tab.active { color: white; border-color: var(--green); background: var(--green); }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.status-card { min-height: 118px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.status-card.drag-over { border-color: #76aa99; background: #f2faf6; box-shadow: inset 0 0 0 2px rgba(23, 107, 81, .1); }
.status-card.selectable { cursor: pointer; }
.status-card-header { display: flex; align-items: center; justify-content: space-between; }
.status-card h3 { margin: 0; font-size: 14px; }
.status-card .count { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 9px; font-weight: 800; }
.status-card.waiting .count { color: var(--green); background: var(--green-soft); }
.status-card.maintenance .count { color: var(--red); background: var(--red-soft); }
.status-card.reserve .count { color: var(--blue); background: var(--blue-soft); }
.vehicle-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.vehicle-chip { padding: 5px 8px; border: 0; border-radius: 7px; color: var(--ink); font-size: 12px; font-weight: 700; background: var(--soft); cursor: grab; }
.vehicle-chip:active { cursor: grabbing; }
.vehicle-chip.dragging { opacity: .5; }
.empty-note { margin-top: 17px; color: var(--muted); font-size: 12px; }

.schedule-panel { overflow: hidden; }
.schedule-heading { padding: 20px 20px 16px; }
.dispatch-schedule-heading { align-items: center; }
.dispatch-month-switcher { align-items: center; }
.dispatch-month-control { position: relative; }
.dispatch-month-control input[type="month"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.dispatch-month-button { display: inline-flex; align-items: center; justify-content: center; min-width: 160px; height: 36px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 15px; font-weight: 600; background: white; box-shadow: 0 6px 14px rgba(25, 47, 38, .03); transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.dispatch-month-button:hover, .dispatch-month-button:focus-visible, .dispatch-month-control.is-open .dispatch-month-button { border-color: #c7d8d0; background: #f4faf6; box-shadow: 0 8px 20px rgba(35, 58, 49, .08); }
.dispatch-month-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 65; display: grid; grid-template-columns: 1.15fr .85fr; gap: 8px; width: 280px; padding: 14px; overflow: hidden; border: 1px solid #dbe5e0; border-radius: 16px; background: white; box-shadow: 0 18px 38px rgba(35, 58, 49, .14); }
.dispatch-month-panel[hidden] { display: none; }
.dispatch-month-panel-head { display: none; }
.dispatch-month-panel-nav, .dispatch-month-year-toggle, .dispatch-month-panel-action, .dispatch-month-cell, .dispatch-year-cell { border: 1px solid var(--line); color: var(--ink); font-weight: 600; background: white; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.dispatch-month-panel-nav { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-size: 18px; }
.dispatch-month-year-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border-radius: 12px; font-size: 14px; }
.dispatch-month-caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .16s ease; }
.dispatch-month-year-toggle[aria-expanded="true"] .dispatch-month-caret { transform: translateY(2px) rotate(225deg); }
.dispatch-year-grid { order: 1; }
.dispatch-month-grid { order: 2; }
.dispatch-month-grid, .dispatch-year-grid { display: grid; align-content: start; gap: 5px; max-height: 230px; min-width: 0; overflow: auto; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); }
.dispatch-month-grid::-webkit-scrollbar, .dispatch-year-grid::-webkit-scrollbar { display: none; width: 0; height: 0; }
.dispatch-month-wheel-label { position: sticky; top: 0; z-index: 1; margin-bottom: 3px; padding-bottom: 3px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 800; text-align: center; letter-spacing: .08em; }
.dispatch-month-cell, .dispatch-year-cell { position: relative; display: grid; place-items: center; min-height: 30px; border: 0; border-radius: 8px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; background: transparent; }
.dispatch-year-cell { min-height: 30px; }
.dispatch-month-panel-nav:hover, .dispatch-month-year-toggle:hover, .dispatch-month-panel-action:hover, .dispatch-month-cell:hover, .dispatch-year-cell:hover { border-color: #c7d8d0; background: #f4faf6; }
.dispatch-month-cell.is-selected, .dispatch-year-cell.is-selected { color: white; border-color: var(--green); background: var(--green); box-shadow: 0 6px 14px rgba(111, 145, 127, .18); }
.dispatch-month-cell.is-current:not(.is-selected)::after { content: "今月"; position: absolute; right: 6px; bottom: 3px; color: currentColor; font-size: 9px; opacity: .72; }
.dispatch-month-panel-foot { order: 3; grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.dispatch-month-panel-action { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12px; }
.dispatch-month-cell.is-current:not(.is-selected)::after { content: ""; position: absolute; top: 6px; right: 18%; width: 5px; height: 5px; border-radius: 999px; background: var(--green); opacity: .72; }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.assigned { background: var(--green); }
.legend-dot.rest { background: var(--amber); }
.legend-dot.empty { border: 1px solid #aeb8b3; background: white; }
.table-wrap { max-height: 540px; overflow: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
th, td { height: 44px; min-width: 49px; padding: 0; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
thead th { position: sticky; top: 0; z-index: 3; height: 49px; color: var(--muted); font-size: 11px; font-weight: 800; background: #f7f9f8; }
th.staff, td.staff { position: sticky; left: 0; z-index: 2; min-width: 112px; padding: 0 14px; text-align: left; font-weight: 700; background: white; box-shadow: 4px 0 10px rgba(31, 48, 41, .04); }
thead th.staff { z-index: 4; background: #f7f9f8; }
th.summary, td.summary { position: sticky; right: 0; z-index: 2; min-width: 72px; font-weight: 800; background: #f8faf9; box-shadow: -4px 0 10px rgba(31, 48, 41, .05); }
thead th.summary { z-index: 4; }
.day-head.weekend { color: var(--red); background: #fff1ef; }
.cell-button { width: 100%; height: 100%; padding: 0; border: 0; color: #8a938f; background: transparent; }
.cell-button:hover { outline: 2px solid #76aa99; outline-offset: -2px; background: var(--green-soft); }
.cell-button.drop-over { outline: 2px solid var(--green); outline-offset: -2px; background: #eaf7f0; }
.cell-button.drop-blocked { outline-color: var(--red); background: var(--red-soft); }
.cell-button:disabled { cursor: not-allowed; opacity: .82; }
.cell-button:disabled:hover { outline: 0; }
.cell-button.assigned { display: grid; align-content: center; gap: 2px; color: var(--green-dark); font-weight: 800; background: #eff8f4; }
.cell-button.shared-vehicle,
.cell-button.multi-vehicle { box-shadow: inset 0 0 0 2px rgba(111, 142, 126, .32); }
.assignment-cell-line { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.12; }
.assignment-cell-more { font-size: 10px; font-weight: 700; color: var(--green); }
.cell-button.rest { color: var(--amber); font-weight: 800; background: var(--amber-soft); }
.cell-button.absent { color: var(--red); font-weight: 800; background: var(--red-soft); }
.cell-button.conflict { color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 2px #e09a95; }
tfoot td, tfoot th { position: sticky; bottom: 0; z-index: 2; height: 42px; font-weight: 800; background: #eef4f0; }
tfoot th.staff { z-index: 4; background: #e6efe9; }
tfoot td.summary { z-index: 4; background: #e6efe9; }

.vehicle-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; }
.office-toolbar { flex-wrap: wrap; margin-bottom: 0; border-radius: 15px; box-shadow: var(--shadow); }
.office-form-panel { margin-top: 0; border-top: 0; border-radius: 0 0 15px 15px; box-shadow: var(--shadow); }
.ledger-count { margin: 0; font-size: 24px; }
.ledger-count small {
  margin-left: 1px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.vehicle-toolbar-controls { display: flex; align-items: flex-end; gap: 12px; }
.subpage-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 8px; }
.vehicle-section-tabs,
.employee-section-tabs,
.operation-section-tabs { align-items: center; flex-wrap: wrap; margin-bottom: 0; border-bottom: 0; border-radius: 15px 15px 0 0; box-shadow: none; }
.vehicle-section-tabs,
.employee-section-tabs { width: fit-content; }
.operation-control-panel { overflow: visible; }
.module-control-panel { overflow: visible; margin-bottom: 18px; }
.operation-section-tabs,
.vehicle-section-tabs,
.employee-section-tabs {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: white;
}
.operation-section-tabs {
  --operation-tab-index: 0;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
}
.vehicle-section-tabs {
  --vehicle-tab-index: 0;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
}
.employee-section-tabs {
  --employee-tab-index: 0;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
}
.operation-section-tabs::before,
.vehicle-section-tabs::before,
.employee-section-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(35, 58, 49, .08);
  transition: transform .24s ease, background-color .2s ease, box-shadow .2s ease;
}
.operation-section-tabs::before {
  width: calc((100% - 16px) / 3);
  transform: translateX(calc(var(--operation-tab-index) * (100% + 4px)));
}
.vehicle-section-tabs::before,
.employee-section-tabs::before {
  width: calc((100% - 12px) / 2);
}
.vehicle-section-tabs::before {
  transform: translateX(calc(var(--vehicle-tab-index) * (100% + 4px)));
}
.employee-section-tabs::before {
  transform: translateX(calc(var(--employee-tab-index) * (100% + 4px)));
}

.floating-actions {
  position: fixed;
  right: clamp(22px, 3vw, 36px);
  bottom: 36px;
  z-index: 55;
  display: grid;
  gap: 12px;
  justify-items: end;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease;
}
.floating-actions.is-scroll-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px);
}
.floating-action-button {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--green);
  background: white;
  box-shadow: 0 16px 32px rgba(35, 58, 49, .16);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.floating-action-button:hover,
.floating-action-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(35, 58, 49, .2);
}
.floating-action-button:focus-visible {
  outline: 3px solid rgba(95, 141, 120, .22);
  outline-offset: 3px;
}
.floating-action-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.floating-action-add {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(47, 85, 73, .12);
  color: white;
  background: var(--green);
}
.floating-action-add:hover,
.floating-action-add:focus-visible {
  background: var(--green-dark);
}
.floating-action-export {
  width: 48px;
  height: 48px;
  border: 1px solid #cfded6;
  color: var(--green-dark);
  background: rgba(255, 255, 255, .94);
}
.floating-action-export:hover,
.floating-action-export:focus-visible {
  border-color: #b7cdc3;
  color: var(--green-dark);
  background: #f8fcfa;
}
.floating-action-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  min-width: max-content;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  background: white;
  box-shadow: 0 10px 22px rgba(35, 58, 49, .12);
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition: opacity .16s ease, transform .16s ease;
}
.floating-action-button:hover .floating-action-tooltip,
.floating-action-button:focus-visible .floating-action-tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}
.operation-section-tabs .subpage-tab,
.vehicle-section-tabs .subpage-tab,
.employee-section-tabs .subpage-tab {
  position: relative;
  z-index: 1;
  min-width: 72px;
  padding: 8px 17px;
  border-radius: 999px;
  font-weight: 700;
  transition: color .18s ease, transform .18s ease;
}
.operation-section-tabs .subpage-tab:hover,
.vehicle-section-tabs .subpage-tab:hover,
.employee-section-tabs .subpage-tab:hover { color: var(--green-dark); background: transparent; transform: translateY(-1px); }
.operation-section-tabs .subpage-tab.active,
.vehicle-section-tabs .subpage-tab.active,
.employee-section-tabs .subpage-tab.active { color: white; background: transparent; box-shadow: none; }
.operation-tab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px 18px; }
.module-tab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 16px 20px 18px; }
.module-tab-toolbar[hidden] { display: none !important; }
.operation-dispatch-toolbar { min-height: 72px; }
.operation-count { display: grid; gap: 3px; min-width: 140px; }
.operation-count h2 { margin-top: 0; font-size: 24px; line-height: 1; }
.operation-toolbar-controls { margin-left: auto; }
.vehicle-section-actions { margin-left: auto; }
.vehicle-section-actions[hidden] { display: none !important; }
.subpage-tab { padding: 10px 16px; border: 0; border-radius: 10px; color: var(--muted); font-weight: 800; background: transparent; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .18s ease; }
.subpage-tab:hover, .subpage-tab.active { color: var(--green-dark); background: #dfeee7; }
.operation-section-tabs .subpage-tab.active,
.vehicle-section-tabs .subpage-tab.active,
.employee-section-tabs .subpage-tab.active {
  color: white;
  background: transparent;
  box-shadow: none;
}
.operation-section-tabs .subpage-tab.active:hover,
.vehicle-section-tabs .subpage-tab.active:hover,
.employee-section-tabs .subpage-tab.active:hover {
  color: white;
  background: transparent;
}
.vehicle-search { min-width: min(380px, 45vw); }
.vehicle-search span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.vehicle-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; }
.vehicle-search input:focus { outline: 2px solid #76aa99; border-color: transparent; }

.operation-control-panel.panel,
.module-control-panel.panel {
  border-radius: 18px;
}
.operation-section-tabs,
.vehicle-section-tabs,
.employee-section-tabs {
  align-items: center;
  height: 46px;
  padding: 4px;
  border-radius: 999px;
  flex-wrap: nowrap;
}
.operation-section-tabs .subpage-tab,
.vehicle-section-tabs .subpage-tab,
.employee-section-tabs .subpage-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .18s ease;
}
.operation-tab-toolbar,
.module-tab-toolbar {
  min-height: 72px;
  gap: 20px;
  padding: 0 24px;
}
.operation-dispatch-toolbar {
  min-height: 72px;
}
.operation-dispatch-toolbar .dispatch-month-switcher {
  align-items: center;
  gap: 10px;
}
.operation-dispatch-toolbar .icon-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
}
.operation-dispatch-toolbar .dispatch-month-button {
  min-width: 178px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
}
.operation-tab-toolbar .legend {
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
}
.operation-tab-toolbar .legend-dot {
  width: 9px;
  height: 9px;
}
.operation-count,
.module-toolbar-metric {
  display: grid;
  gap: 6px;
  min-width: 132px;
}
.operation-count .eyebrow,
.module-toolbar-metric .eyebrow {
  min-height: 15px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}
.operation-count h2,
.module-tab-toolbar .ledger-count {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.operation-count h2 span,
.module-tab-toolbar .ledger-count span {
  font-size: 24px;
}
.module-tab-toolbar .vehicle-toolbar-controls,
.operation-toolbar-controls {
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 260px;
}
.module-tab-toolbar .vehicle-search,
.operation-toolbar-controls .vehicle-search {
  flex: 0 1 var(--module-search-width);
  min-width: var(--module-search-min-width);
}
.module-tab-toolbar .vehicle-search input,
.operation-toolbar-controls .vehicle-search input {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
}
#vehicleLedgerView > .vehicle-toolbar,
#driverView > .vehicle-toolbar,
#officeStaffView > .vehicle-toolbar { margin-top: 0; border-top: 1px solid #e3e9e5; border-radius: 15px; box-shadow: var(--shadow); }
.vehicle-list-panel { margin-top: 18px; overflow: hidden; }
#employeeView,
#vehicleView {
  --module-list-toolbar-height: 66px;
  --module-list-sticky-offset: -28px;
}
#employeeView .employee-list-panel {
  margin-top: 0;
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-radius: 18px;
}
#employeeView .employee-list-toolbar {
  position: sticky;
  top: var(--module-list-sticky-offset);
  z-index: 40;
  height: var(--module-list-toolbar-height);
  max-height: var(--module-list-toolbar-height);
  min-height: 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #fff;
  overflow: hidden;
  transition: height .24s cubic-bezier(.2, .72, .2, 1), max-height .24s cubic-bezier(.2, .72, .2, 1), padding .24s cubic-bezier(.2, .72, .2, 1), border-color .18s ease, opacity .18s ease, transform .24s cubic-bezier(.2, .72, .2, 1);
  will-change: max-height, transform, opacity;
}
#employeeView .employee-list-toolbar .module-toolbar-metric {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 120px;
}
#employeeView .employee-list-toolbar .module-toolbar-metric .eyebrow,
#employeeView .employee-list-toolbar .ledger-count,
#employeeView .employee-list-toolbar .ledger-count span {
  min-height: 0;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}
#employeeView .employee-list-toolbar .vehicle-toolbar-controls {
  gap: 14px;
}
#employeeView .employee-list-toolbar .vehicle-search {
  flex: 0 1 var(--module-search-width);
  min-width: var(--module-search-min-width);
}
#employeeView .employee-list-toolbar .vehicle-search input {
  height: 40px;
}
#employeeView .employee-list-toolbar .employee-section-tabs {
  flex: 0 0 auto;
  height: 40px;
}
#employeeView .employee-list-panel .vehicle-table-wrap {
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto;
  border-radius: 0 0 18px 18px;
}
#employeeView .employee-list-panel .vehicle-table thead th {
  top: calc(var(--module-list-toolbar-height) + var(--module-list-sticky-offset)) !important;
  z-index: 30;
  background: #fff;
  transition: top .24s cubic-bezier(.2, .72, .2, 1);
}
#employeeView .employee-list-panel .vehicle-table tbody td {
  position: relative;
  z-index: 1;
}
#employeeView .employee-list-panel .vehicle-table thead th:first-child,
#employeeView .employee-list-panel .vehicle-table thead th:last-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
#employeeView .employee-list-panel .vehicle-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 18px;
}
#employeeView .employee-list-panel .vehicle-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 18px;
}
#vehicleView .vehicle-unified-toolbar {
  position: sticky;
  top: var(--module-list-sticky-offset);
  z-index: 40;
  height: var(--module-list-toolbar-height);
  max-height: var(--module-list-toolbar-height);
  min-height: 0;
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
  transition: height .24s cubic-bezier(.2, .72, .2, 1), max-height .24s cubic-bezier(.2, .72, .2, 1), padding .24s cubic-bezier(.2, .72, .2, 1), border-color .18s ease, opacity .18s ease, transform .24s cubic-bezier(.2, .72, .2, 1);
  will-change: max-height, transform, opacity;
}
#vehicleView .vehicle-unified-toolbar [hidden] {
  display: none !important;
}
#vehicleView .vehicle-unified-toolbar .module-toolbar-metric,
#vehicleView .vehicle-unified-toolbar .maintenance-metrics {
  align-content: center;
  min-width: 120px;
}
#vehicleView .vehicle-unified-toolbar .module-toolbar-metric {
  display: grid;
  gap: 4px;
}
#vehicleView .vehicle-unified-toolbar .maintenance-metrics {
  gap: 18px;
}
#vehicleView .vehicle-unified-toolbar .module-toolbar-metric .eyebrow,
#vehicleView .vehicle-unified-toolbar .ledger-count,
#vehicleView .vehicle-unified-toolbar .ledger-count span,
#vehicleView .vehicle-unified-toolbar .maintenance-metrics div > span,
#vehicleView .vehicle-unified-toolbar .maintenance-metrics strong,
#vehicleView .vehicle-unified-toolbar .maintenance-metrics strong span {
  min-height: 0;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}
#vehicleView .vehicle-unified-toolbar .vehicle-toolbar-controls {
  gap: 14px;
}
#vehicleView .vehicle-unified-toolbar .vehicle-search {
  flex: 0 1 var(--module-search-width);
  min-width: var(--module-search-min-width);
}
#vehicleView .vehicle-unified-toolbar .vehicle-search input {
  height: 40px;
}
#vehicleView .vehicle-unified-toolbar .vehicle-section-tabs {
  flex: 0 0 auto;
  height: 40px;
}
#vehicleView #vehicleLedgerView,
#vehicleView #maintenanceView {
  display: block;
}
#vehicleView #vehicleLedgerView[hidden],
#vehicleView #maintenanceView[hidden] {
  display: none !important;
}
#vehicleView .vehicle-unified-panel {
  margin-top: 0;
  border-top: 0;
  overflow: visible;
  border-radius: 0 0 18px 18px;
  box-shadow: none;
}
#vehicleView .vehicle-unified-panel .vehicle-table-wrap {
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  border-radius: 0 0 18px 18px;
}
#vehicleView .vehicle-unified-panel .vehicle-table {
  table-layout: fixed;
}
#vehicleView .vehicle-unified-panel .vehicle-table thead th {
  top: calc(var(--module-list-toolbar-height) + var(--module-list-sticky-offset));
  z-index: 30;
  background: #fff;
  transition: top .24s cubic-bezier(.2, .72, .2, 1);
}
#vehicleView .vehicle-unified-panel .vehicle-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 18px;
}
#vehicleView .vehicle-unified-panel .vehicle-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 18px;
}
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(1),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(1) { width: 210px; }
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(2),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(2) { width: 180px; }
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(3),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(3) { width: 120px; }
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(4),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(4),
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(5),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(5),
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(6),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(6),
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(7),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(7) { width: 140px; }
#vehicleView #vehicleLedgerView .vehicle-table th:nth-child(8),
#vehicleView #vehicleLedgerView .vehicle-table td:nth-child(8) { width: 100px; }
#operationView .operation-unified-toolbar,
#safetyView .safety-unified-toolbar,
#financeView .finance-unified-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 66px;
  max-height: 66px;
  min-height: 0;
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}
#operationView .operation-tab-toolbar,
#safetyView .safety-toolbar,
#financeView :is(.finance-record-toolbar, .finance-summary-toolbar) {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 0;
}
#operationView .operation-tab-toolbar[hidden],
#safetyView .safety-toolbar[hidden],
#financeView :is(.finance-record-toolbar, .finance-summary-toolbar)[hidden] {
  display: none !important;
}
#operationView .operation-section-tabs,
#safetyView .safety-section-tabs,
#financeView .finance-section-tabs {
  flex: 0 0 auto;
  height: 40px;
}
#operationView .operation-count,
#safetyView .module-toolbar-metric,
#financeView .module-toolbar-metric {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 120px;
}
#operationView .operation-count .eyebrow,
#operationView .operation-count h2,
#operationView .operation-count h2 span,
#safetyView .module-toolbar-metric .eyebrow,
#safetyView .module-toolbar-metric .ledger-count,
#safetyView .module-toolbar-metric .ledger-count span,
#safetyView .module-toolbar-metric .ledger-count small,
#financeView .module-toolbar-metric .eyebrow,
#financeView .module-toolbar-metric .ledger-count {
  min-height: 0;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}
#operationView .vehicle-search input,
#safetyView .vehicle-search input,
#financeView .vehicle-search input {
  height: 40px;
}
#operationView .operation-list-panel,
#rollCallRecordsView > .vehicle-list-panel,
#dailyReportRecordsView > .vehicle-list-panel,
#safetyView :is(.accident-list-panel, .education-list-panel),
#financeView #financeLedgerPanel {
  margin-top: 0;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  overflow: visible;
}
#operationView .operation-list-panel .table-wrap,
#rollCallRecordsView .vehicle-table-wrap,
#dailyReportRecordsView .vehicle-table-wrap,
#safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table-wrap,
#financeView #financeLedgerPanel .vehicle-table-wrap {
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  border-radius: 0 0 18px 18px;
}
#dispatchView > .operation-list-panel,
#rollCallRecordsView > .vehicle-list-panel,
#dailyReportRecordsView > .vehicle-list-panel { margin-top: 18px; border-radius: 15px; box-shadow: var(--shadow); }
#dispatchView > .operation-list-panel .table-wrap { border-top: 0; border-radius: 15px; }
#operationView #dispatchView > .operation-list-panel,
#rollCallRecordsView > .vehicle-list-panel,
#dailyReportRecordsView > .vehicle-list-panel {
  margin-top: 0;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  overflow: visible;
}
#operationView #dispatchView > .operation-list-panel .table-wrap {
  max-height: none;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior: auto;
  border-radius: 0 0 18px 18px;
}
#operationView #dispatchView > .operation-list-panel {
  overflow: hidden;
  max-width: 100%;
}
#operationView #dispatchView > .operation-list-panel table {
  width: max-content;
  min-width: 100%;
}
#operationView #dispatchView > .operation-list-panel tfoot th:first-child {
  border-bottom-left-radius: 18px;
}
#operationView #dispatchView > .operation-list-panel tfoot td:last-child {
  border-bottom-right-radius: 18px;
}
#rollCallRecordsView > .vehicle-list-panel,
#dailyReportRecordsView > .vehicle-list-panel {
  overflow: hidden;
}
#rollCallRecordsView .vehicle-table tbody tr:last-child td:first-child,
#dailyReportRecordsView .vehicle-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 18px;
}
#rollCallRecordsView .vehicle-table tbody tr:last-child td:last-child,
#dailyReportRecordsView .vehicle-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 18px;
}
#safetyView :is(.accident-list-panel, .education-list-panel) {
  overflow: hidden;
}
#safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table-wrap {
  border-radius: 0 0 18px 18px;
}
#safetyView :is(.accident-list-panel, .education-list-panel) tbody tr:last-child td:first-child {
  border-bottom-left-radius: 18px;
}
#safetyView :is(.accident-list-panel, .education-list-panel) tbody tr:last-child td:last-child {
  border-bottom-right-radius: 18px;
}
#financeView .finance-unified-toolbar {
  align-items: center;
}
#financeView .finance-summary-toolbar {
  align-items: center;
  min-height: 0;
}
#financeView .finance-summary-period-controls {
  align-items: center;
}
#financeView .finance-section-tabs {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}
#vehicleLedgerView > .vehicle-list-panel,
.maintenance-unified-list { margin-top: 18px; }
#vehicleView #vehicleLedgerView > .vehicle-unified-panel,
#vehicleView .maintenance-unified-list { margin-top: 0; }
.vehicle-table-wrap { max-height: max(260px, calc(100vh - var(--topbar-height) - 286px)); overflow: auto; overscroll-behavior: contain; }
.vehicle-table { width: 100%; min-width: 1120px; border-collapse: separate; border-spacing: 0; }
.vehicle-table th, .vehicle-table td { min-width: 0; height: 52px; padding: 0 12px; text-align: left; white-space: nowrap; }
.office-row.editable { cursor: pointer; }
.office-row.editable:hover td { background: #f4faf6; }
.vehicle-table th:first-child { min-width: 190px; }
.vehicle-table th:nth-child(3) { min-width: 120px; }
.vehicle-table tbody tr:hover td { background: #f5faf7; }
.vehicle-registration { padding: 5px 8px; border: 0; border-radius: 7px; color: var(--green); font-weight: 800; background: var(--green-soft); }
.vehicle-status { display: inline-block; padding: 4px 7px; border-radius: 20px; color: var(--green-dark); font-size: 11px; font-weight: 800; background: var(--green-soft); }
.vehicle-status.inactive { color: #8f4b43; background: var(--red-soft); }
.user-table { min-width: 920px; table-layout: fixed; }
.user-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.platform-company-table { min-width: 1120px; table-layout: fixed; }
.platform-company-table th:nth-child(2),
.platform-company-table td:nth-child(2),
.platform-company-table th:nth-child(3),
.platform-company-table td:nth-child(3) { white-space: normal; }
.platform-create-only[hidden] { display: none !important; }
.role-table { min-width: 900px; table-layout: fixed; }
.role-table tbody tr { cursor: pointer; }
.role-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.role-scope-pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; color: var(--green-dark); font-size: 12px; font-weight: 800; background: var(--green-soft); }
.role-permission-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.role-permission-pill { padding: 3px 7px; border-radius: 999px; color: var(--green-dark); font-size: 11px; font-weight: 800; background: var(--green-soft); }
.role-permission-pill.muted { color: var(--muted); background: var(--soft); }
.permission-matrix { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.permission-row { display: grid; grid-template-columns: minmax(160px, 1fr) repeat(var(--permission-action-count, 2), minmax(86px, max-content)); align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.permission-row:first-child { border-top: 0; }
.permission-row strong { font-size: 14px; }
.permission-row label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 800; }
.expiry { display: inline-block; padding: 4px 6px; border-radius: 6px; }
.expiry.due-soon { color: var(--amber); font-weight: 800; background: var(--amber-soft); }
.expiry.expired { color: var(--red); font-weight: 800; background: var(--red-soft); }
.vehicle-empty { padding: 42px; text-align: center; color: var(--muted); }
.maintenance-form { margin-top: 18px; padding: 20px; }
.maintenance-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.maintenance-form .field.compact { margin: 0; }
.maintenance-description { grid-column: span 2; }
.maintenance-notes { grid-column: 1 / -1; }
.employee-wide-field { grid-column: span 2; }
.employee-driver-table { min-width: 940px; table-layout: fixed; }
#employeeView .employee-driver-table th:nth-child(1),
#employeeView .employee-driver-table td:nth-child(1) { width: 150px; min-width: 0; }
#employeeView .employee-driver-table th:nth-child(2),
#employeeView .employee-driver-table td:nth-child(2) { width: 230px; min-width: 0; white-space: normal; }
#employeeView .employee-driver-table th:nth-child(3),
#employeeView .employee-driver-table td:nth-child(3) { width: 180px; min-width: 0; }
#employeeView .employee-driver-table th:nth-child(4),
#employeeView .employee-driver-table td:nth-child(4),
#employeeView .employee-driver-table th:nth-child(5),
#employeeView .employee-driver-table td:nth-child(5) { width: 150px; min-width: 0; }
#employeeView .employee-driver-table th:nth-child(6),
#employeeView .employee-driver-table td:nth-child(6) { width: 180px; min-width: 0; }
#employeeView .employee-driver-table th:nth-child(7),
#employeeView .employee-driver-table td:nth-child(7) { width: 110px; min-width: 0; }
.employee-office-table { min-width: 820px; table-layout: fixed; }
.employee-office-table th:nth-child(1), .employee-office-table td:nth-child(1) { width: 160px; }
.employee-office-table th:nth-child(2), .employee-office-table td:nth-child(2) { width: 210px; white-space: normal; }
.employee-office-table th:nth-child(3), .employee-office-table td:nth-child(3) { width: 90px; }
.employee-office-table th:nth-child(4), .employee-office-table td:nth-child(4) { width: 150px; }
.employee-office-table th:nth-child(5), .employee-office-table td:nth-child(5) { width: 190px; white-space: normal; }
.employee-office-table th:nth-child(6), .employee-office-table td:nth-child(6) { width: 110px; }
.employee-driver-table td small,
.employee-office-table td small { color: var(--muted); white-space: normal; }
.maintenance-notes textarea, .maintenance-description textarea { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); resize: vertical; background: white; }
.maintenance-notes textarea:focus, .maintenance-description textarea:focus { outline: 2px solid #76aa99; border-color: transparent; }
.form-hint { color: var(--muted); font-size: 12px; }
.maintenance-table td small { color: var(--muted); white-space: normal; }
.maintenance-table th:nth-child(4), .maintenance-table td:nth-child(4) { min-width: 260px; white-space: normal; }
.maintenance-status { display: inline-block; padding: 4px 7px; border-radius: 20px; color: var(--blue); font-size: 11px; font-weight: 800; background: var(--blue-soft); }
.maintenance-status.record { color: var(--green-dark); background: var(--green-soft); }
.maintenance-unified-toolbar { align-items: center; justify-content: space-between; }
.maintenance-metrics { display: flex; gap: 30px; align-items: center; min-width: 132px; }
.maintenance-metrics div { display: grid; gap: 6px; min-width: 52px; }
.maintenance-metrics div > span { min-height: 15px; color: var(--green); font-size: 11px; font-weight: 700; line-height: 1.2; }
.maintenance-metrics strong { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1; }
.maintenance-metrics strong span { font-size: 24px; }
.maintenance-unified-search { min-width: min(420px, 42vw); }
.maintenance-unified-table th:nth-child(1), .maintenance-unified-table td:nth-child(1) { min-width: 130px; }
.maintenance-unified-table th:nth-child(2), .maintenance-unified-table td:nth-child(2) { min-width: 190px; }
.maintenance-unified-table th:nth-child(3), .maintenance-unified-table td:nth-child(3) { min-width: 190px; white-space: normal; }
.maintenance-unified-table th:nth-child(4), .maintenance-unified-table td:nth-child(4) { min-width: 220px; white-space: normal; }
.maintenance-unified-table th:nth-child(5), .maintenance-unified-table td:nth-child(5) { min-width: 130px; }
.maintenance-unified-table th:nth-child(6), .maintenance-unified-table td:nth-child(6) { min-width: 180px; white-space: normal; }
.maintenance-unified-table th:nth-child(7), .maintenance-unified-table td:nth-child(7) { min-width: 110px; }
.detail-summary { margin-top: 12px; color: var(--muted); font-size: 13px; }
.maintenance-detail-wrap { max-height: min(58vh, 560px); margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; }
.maintenance-record-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.maintenance-record-edit-items { display: grid; gap: 14px; max-height: min(56vh, 560px); margin-top: 14px; padding-right: 4px; overflow: auto; overscroll-behavior: contain; }
.maintenance-record-edit-item { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.maintenance-record-edit-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.maintenance-record-edit-item h3 { color: var(--green-dark); font-size: 13px; }
.maintenance-record-edit-item-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.maintenance-record-edit-item-grid .field { margin: 0; }
.maintenance-record-edit-item-wide { grid-column: span 2; }
.maintenance-record-edit-item-full { grid-column: 1 / -1; }
.maintenance-record-edit-item textarea { width: 100%; min-height: 72px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); resize: vertical; background: white; }
#maintenanceRecordEditDialog .maintenance-record-edit-toolbar { display: flex; justify-content: flex-start; }
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-add-item {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #fff;
  background: #6f927d;
  box-shadow: 0 10px 22px rgba(35, 58, 49, .08);
  font-size: 0;
  line-height: 0;
}
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-add-item::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-width='2' d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-width='2' d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-add-item:is(:hover, :focus-visible) {
  border-color: transparent;
  background: #628771;
  box-shadow: 0 0 0 4px rgba(118, 170, 153, .12), 0 12px 24px rgba(35, 58, 49, .1);
}
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-edit-item {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
}
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-edit-item-heading {
  margin-bottom: 16px;
}
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-edit-item h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
#maintenanceRecordEditDialog .maintenance-record-edit-item-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
#accidentDetailDialog .maintenance-record-edit-item-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
#maintenanceRecordEditDialog .maintenance-record-item-category,
#accidentDetailDialog .maintenance-record-item-category { grid-column: span 2; }
#maintenanceRecordEditDialog .maintenance-record-item-name,
#accidentDetailDialog .maintenance-record-item-name { grid-column: span 4; }
#maintenanceRecordEditDialog .maintenance-record-item-quantity,
#maintenanceRecordEditDialog .maintenance-record-item-unit-price,
#maintenanceRecordEditDialog .maintenance-record-item-amount {
  grid-column: span 2;
}
#accidentDetailDialog .maintenance-record-item-quantity,
#accidentDetailDialog .maintenance-record-item-unit-price,
#accidentDetailDialog .maintenance-record-item-amount,
#accidentDetailDialog .maintenance-record-item-vendor { grid-column: span 2; }
#maintenanceRecordEditDialog .maintenance-record-item-vendor,
#maintenanceRecordEditDialog .maintenance-record-item-notes,
#accidentDetailDialog .maintenance-record-item-notes { grid-column: 1 / -1; }
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-edit-item .dialog-custom-select,
#maintenancePlanDialog .maintenance-form-grid .dialog-custom-select {
  z-index: 1;
}
:is(#maintenanceRecordEditDialog, #accidentDetailDialog) .maintenance-record-edit-item .dialog-custom-select.is-open,
#maintenancePlanDialog .maintenance-form-grid .dialog-custom-select.is-open {
  z-index: 96;
}
.maintenance-detail-items { display: grid; gap: 12px; max-height: min(58vh, 560px); margin-top: 18px; padding-right: 4px; overflow: auto; overscroll-behavior: contain; }
.maintenance-detail-item { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfc; }
.maintenance-detail-item h3 { margin: 0; color: var(--green-dark); font-size: 15px; }
.maintenance-detail-item .maintenance-detail-list { margin-top: 12px; }
.maintenance-detail-list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; }
.maintenance-detail-list > div { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.maintenance-detail-list dt { color: var(--muted); font-size: 11px; font-weight: 800; }
.maintenance-detail-list dd { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.vehicle-detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.vehicle-detail-actions p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.vehicle-action-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.vehicle-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: white; }
.vehicle-detail-grid > div { min-width: 0; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.vehicle-detail-grid > div:last-child { border-bottom: 0; }
.vehicle-detail-grid .vehicle-detail-wide { grid-column: 1 / -1; border-right: 0; }
.vehicle-detail-grid dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.vehicle-detail-grid dd { margin: 5px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 13px; font-weight: 700; }
.vehicle-detail-grid a { color: var(--green); }
.vehicle-photo-open { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); overflow: hidden; }
.vehicle-photo-open:hover { border-color: #9bb9ad; box-shadow: inset 0 0 0 2px rgba(95, 141, 120, .16); }
.vehicle-photo-open:focus-visible { outline: 3px solid rgba(95, 141, 120, .35); outline-offset: 3px; }
.vehicle-photo-open img { display: block; width: 100%; max-height: 260px; object-fit: contain; background: var(--soft); }
.vehicle-photo-open span { position: absolute; right: 10px; bottom: 10px; padding: 6px 10px; border: 1px solid rgba(210, 224, 217, .92); border-radius: 999px; color: var(--green-dark); font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .9); box-shadow: 0 8px 18px rgba(24, 35, 31, .1); opacity: .96; transform: translateY(0); transition: opacity .15s ease, transform .15s ease, background .15s ease; }
.vehicle-photo-open:hover span,
.vehicle-photo-open:focus-visible span { opacity: 1; background: #fff; transform: translateY(-1px); }
.photo-preview-dialog { width: min(1180px, calc(100vw - 40px)); max-height: min(92vh, 940px); padding: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 32px 90px rgba(12, 32, 24, .32); overflow: hidden; }
.photo-preview-dialog::backdrop { background: rgba(18, 31, 26, .62); backdrop-filter: blur(5px); }
.photo-preview-content { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: min(92vh, 940px); }
.photo-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.photo-preview-header strong { min-width: 0; overflow-wrap: anywhere; color: var(--green-dark); font-size: 15px; }
.photo-preview-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.photo-preview-actions span { min-width: 48px; color: var(--muted); font-size: 12px; font-weight: 900; text-align: right; }
.photo-preview-actions .button { padding: 7px 10px; font-size: 12px; }
.photo-preview-stage { display: grid; place-items: center; min-height: min(72vh, 720px); padding: 18px; overflow: hidden; background: #f4f7f5; touch-action: none; user-select: none; }
.photo-preview-stage img { display: block; max-width: 100%; max-height: calc(92vh - 92px); object-fit: contain; border-radius: 8px; background: #fff; transform-origin: center center; transition: transform .08s ease-out; cursor: zoom-in; }
.photo-preview-stage img.is-zoomed { cursor: grab; transition: none; }
.photo-preview-stage img.is-dragging { cursor: grabbing; }
.driver-detail-header { align-items: flex-start; }
.driver-detail-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; align-items: center; }
.driver-detail-hint { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #e2e9e5; border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; background: white; }
.driver-detail-sections { display: grid; gap: 16px; padding: 0; overflow: visible; }
.driver-detail-section { padding: 16px; border: 1px solid #dce8e1; border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(25, 63, 47, .05); }
.driver-detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #edf2ef; }
.driver-detail-section h3 { margin: 0; color: var(--green-dark); font-size: 16px; }
.driver-detail-section .link-button { padding: 7px 10px; border-radius: 9px; background: white; }
.driver-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: white; }
.driver-detail-grid > div { min-width: 0; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.driver-detail-grid > div:last-child { border-bottom: 0; }
.driver-detail-grid .driver-detail-wide { grid-column: 1 / -1; }
.driver-detail-grid dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.driver-detail-grid dd { margin: 6px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; font-weight: 400; }
.driver-profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.driver-profile-grid { order: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.driver-profile-grid > div { border-right: 1px solid var(--line); }
.driver-profile-grid > div:nth-child(2n) { border-right: 0; }
.driver-profile-grid .driver-detail-wide { grid-column: 1 / -1; border-right: 0; }
.driver-photo-frame { order: 2; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 300px; border: 1px dashed #b8d1c4; border-radius: 16px; overflow: hidden; background: #edf7f1; }
.driver-photo-frame img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.driver-photo-placeholder { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 999px; color: var(--green); font-size: 26px; font-weight: 900; background: white; box-shadow: inset 0 0 0 1px var(--line); }
.driver-photo-editor { align-content: start; }
.driver-photo-preview { display: grid; place-items: center; min-height: 120px; border: 1px dashed #b8d1c4; border-radius: 14px; color: var(--muted); background: #f8fcfa; overflow: hidden; }
.driver-photo-preview img { width: 100%; max-height: 180px; object-fit: contain; background: white; }
.driver-photo-open,
.driver-photo-editor-open,
.rollcall-photo-open { position: relative; display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; overflow: hidden; }
.driver-photo-open { height: 100%; min-height: 300px; }
.driver-photo-open img { display: block; width: 100%; height: 100%; min-height: 300px; object-fit: cover; transition: transform .18s ease; }
.driver-photo-editor-open img,
.rollcall-photo-open img { display: block; width: 100%; max-height: 240px; object-fit: contain; background: white; transition: transform .18s ease; }
.driver-photo-open span,
.driver-photo-editor-open span,
.rollcall-photo-open span { position: absolute; right: 10px; bottom: 10px; padding: 6px 10px; border: 1px solid rgba(210, 224, 217, .92); border-radius: 999px; color: var(--green-dark); font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .9); box-shadow: 0 8px 18px rgba(24, 35, 31, .1); opacity: .96; transform: translateY(0); transition: opacity .15s ease, transform .15s ease, background .15s ease; }
.driver-photo-open:hover img,
.driver-photo-editor-open:hover img,
.rollcall-photo-open:hover img { transform: scale(1.015); }
.driver-photo-open:hover span,
.driver-photo-open:focus-visible span,
.driver-photo-editor-open:hover span,
.driver-photo-editor-open:focus-visible span,
.rollcall-photo-open:hover span,
.rollcall-photo-open:focus-visible span { opacity: 1; background: #fff; transform: translateY(-1px); }
#driverForm .maintenance-form-grid { grid-template-columns: minmax(0, 1fr); max-width: 780px; margin: 16px auto 0; gap: 14px; }
#driverForm[data-driver-section="basics"] .maintenance-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 960px; }
#driverForm[data-driver-section="basics"] .employee-wide-field,
#driverForm[data-driver-section="basics"] .driver-photo-editor { grid-column: 1 / -1; }
#driverForm .employee-wide-field,
#driverForm .maintenance-notes,
#driverForm .driver-photo-editor { grid-column: auto; }
#driverForm .field.compact { width: 100%; margin: 0; }
#driverForm .driver-photo-preview { min-height: 180px; }
#driverDialog .field[hidden],
#driverDialog .driver-advanced-field[hidden] { display: none !important; }
#officeStaffForm .maintenance-form-grid { grid-template-columns: minmax(0, 1fr); max-width: 780px; margin: 16px auto 0; gap: 14px; }
#officeStaffForm[data-office-mode="create"] .maintenance-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 880px; }
#officeStaffForm[data-office-section="basics"] .maintenance-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 960px; }
#officeStaffForm[data-office-section="basics"] .employee-wide-field,
#officeStaffForm[data-office-section="basics"] .driver-photo-editor { grid-column: 1 / -1; }
#officeStaffForm .employee-wide-field,
#officeStaffForm .maintenance-notes,
#officeStaffForm .driver-photo-editor { grid-column: auto; }
#officeStaffForm .field.compact { width: 100%; margin: 0; }
#officeStaffForm .driver-photo-preview { min-height: 180px; }
.driver-file-picker { max-width: 100%; }
.vehicle-edit-field { display: grid; gap: 7px; }
.vehicle-edit-field-full, .vehicle-edit-field-wide { grid-column: 1 / -1; }
.vehicle-edit-field > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.vehicle-edit-field input, .vehicle-edit-field textarea, .vehicle-edit-field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; }
.vehicle-edit-field textarea { resize: vertical; min-height: 78px; }
.vehicle-edit-field input:focus, .vehicle-edit-field textarea:focus, .vehicle-edit-field select:focus { outline: 2px solid #76aa99; border-color: transparent; }
.vehicle-plate-edit-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 1px solid #dce8e1; border-radius: 16px; background: linear-gradient(180deg, #fbfdfc 0%, #f5faf7 100%); }
.vehicle-input-with-suffix { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.vehicle-input-suffix { color: var(--muted); font-size: 12px; font-weight: 900; }
.vehicle-photo-editor { display: grid; gap: 10px; }
.vehicle-file-picker { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; }
.vehicle-file-picker input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.vehicle-file-button { flex: 0 0 auto; padding: 8px 12px; border-radius: 9px; color: white; font-size: 12px; font-weight: 900; background: var(--green); }
.vehicle-file-name { min-width: 0; color: var(--ink); font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#driverDialog .vehicle-file-picker { position: relative; overflow: hidden; }
#driverDialog .vehicle-file-picker input[type="file"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; pointer-events: auto; }
#driverDialog .vehicle-file-button { color: #fff; font-size: 12px; font-weight: 900; }
#driverDialog .vehicle-file-name { pointer-events: none; }
#driverDialog .vehicle-file-button { pointer-events: none; }
#officeStaffDialog .vehicle-file-picker { position: relative; overflow: hidden; }
#officeStaffDialog .vehicle-file-picker input[type="file"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; pointer-events: auto; }
#officeStaffDialog .vehicle-file-button { color: #fff; font-size: 12px; font-weight: 900; pointer-events: none; }
#officeStaffDialog .vehicle-file-name { pointer-events: none; }
#officeStaffDialog .field[hidden],
#officeStaffDialog .office-advanced-field[hidden] { display: none !important; }
.vehicle-photo-preview { display: grid; place-items: center; min-height: 150px; padding: 12px; border: 1px dashed #b8d1c4; border-radius: 14px; color: var(--muted); background: #f8fcfa; overflow: hidden; }
.vehicle-photo-preview img { width: 100%; max-height: 240px; object-fit: contain; background: white; }
.vehicle-photo-preview a { color: var(--green); font-weight: 800; }
.vehicle-photo-clear { justify-self: stretch; min-height: 38px; }

dialog { width: min(430px, calc(100% - 32px)); max-height: min(90vh, 920px); padding: 0; border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 28px 80px rgba(15, 35, 27, .25); }
dialog::backdrop { background: rgba(14, 31, 25, .48); backdrop-filter: blur(2px); }
#assignmentDialog .field,
#assignmentDialog .conflict-message,
#assignmentDialog .assignment-status-panel { margin: 0; }
#assignmentDialog .assignment-editor-section { display: grid; gap: 16px; }
#assignmentDialog .assignment-editor-section[hidden] { display: none !important; }
#assignmentDialog .assignment-segment-list-section { display: grid; gap: 12px; }
#assignmentDialog .assignment-segment-list-section[hidden] { display: none !important; }
#assignmentDialog .assignment-segment-list-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
#assignmentDialog .assignment-segment-list { display: grid; gap: 8px; }
#assignmentDialog .assignment-segment-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; text-align: left; color: var(--ink); }
#assignmentDialog .assignment-segment-row:hover { border-color: rgba(111, 142, 126, .45); background: #f4faf7; }
#assignmentDialog .assignment-segment-row strong { display: block; font-size: 15px; font-weight: 700; }
#assignmentDialog .assignment-segment-row span { color: var(--muted); font-size: 12px; font-weight: 600; }
#assignmentDialog .assignment-segment-row .assignment-segment-edit-label { color: var(--green); font-size: 12px; font-weight: 700; }
#assignmentDialog .button.compact { min-height: 34px; padding: 0 14px; font-size: 13px; }
#assignmentDialog .button.danger { color: var(--red); border-color: #edc3be; background: var(--red-soft); }
#assignmentDialog .assignment-status-field { width: min(360px, 100%); }
#assignmentDialog .assignment-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 580px; margin: 0; }
#assignmentDialog .assignment-time-grid .field { margin: 0; }
#assignmentDialog .assignment-route-field textarea { min-height: 104px; }
#assignmentDialog .assignment-status-panel { min-height: 0; overflow: visible; background: #fff; }
#assignmentDialog .assignment-status-panel[hidden] { display: none !important; }
#assignmentDialog .assignment-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 192px; max-height: none; overflow: visible; }
#assignmentDialog .assignment-status-grid .status-card { display: flex; flex-direction: column; min-height: 192px; max-height: 220px; overflow: hidden; }
#assignmentDialog .vehicle-chips { align-content: flex-start; max-height: 136px; overflow: auto; padding-right: 3px; }
dialog form { padding: 22px; }
dialog .form-hint { display: block; margin-top: 10px; line-height: 1.6; }
.field { display: grid; gap: 8px; margin: 24px 0 12px; }
.field span { color: var(--muted); font-size: 12px; font-weight: 800; }
.field select, .field input, .field textarea { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #76aa99; border-color: transparent; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.conflict-message { padding: 10px; border-radius: 9px; color: var(--red); font-size: 12px; background: var(--red-soft); }
.conflict-message.blocking { font-weight: 800; }
.assignment-status-panel { display: grid; gap: 12px; margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfc; }
.compact-heading { align-items: start; gap: 12px; }
.compact-heading h3 { margin: 4px 0 0; font-size: 17px; }
.assignment-status-panel .date-tabs { max-width: min(420px, 42vw); }
.assignment-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.assignment-status-grid .status-card { min-height: 100px; padding: 14px; }
.assignment-current-vehicle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #dce8e2; border-radius: 10px; background: #f8fbf9; }
.assignment-current-vehicle span { color: var(--muted); font-size: 12px; font-weight: 800; }
.assignment-current-vehicle strong { color: var(--green-dark); font-size: 15px; font-weight: 900; overflow-wrap: anywhere; }
.assignment-drop-zone { padding: 13px 14px; border: 1px dashed #a9bcb4; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; background: white; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.assignment-drop-zone.has-selection { border-color: #8ab6a8; color: var(--green-dark); background: #f0f8f4; }
.assignment-drop-zone.drag-over { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }

#vehicleDetailDialog .vehicle-detail-hint:empty { display: none; }
#vehicleDetailDialog .vehicle-file-picker { position: relative; overflow: hidden; }
#vehicleDetailDialog .vehicle-file-picker input[type="file"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; pointer-events: auto; }
#vehicleDetailDialog .vehicle-file-button { color: #fff; font-size: 12px; font-weight: 900; pointer-events: none; }
#vehicleDetailDialog .vehicle-file-name { pointer-events: none; }

#maintenanceDetailDialog .maintenance-table {
  min-width: 920px;
}

.login-dialog { width: min(450px, calc(100% - 32px)); }
.login-dialog form { padding: 30px 28px 28px; }
.login-dialog .field { margin: 15px 0; }
.login-button { width: 100%; margin-top: 8px; padding: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; padding: 11px 16px; border-radius: 10px; color: white; font-size: 13px; background: #163c31; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.rollcall-flat-form { align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rollcall-form-section { padding: 18px; border: 1px solid #dfe9e4; border-radius: 8px; background: #fff; }
.rollcall-form-section h3 { margin: 0 0 14px; font-size: 16px; color: var(--green); }
.rollcall-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 760px; }
.rollcall-file-row { display: flex; align-items: center; gap: 12px; min-height: 46px; }
.rollcall-file-button { display: inline-flex; align-items: center; min-height: 42px; cursor: pointer; }
.rollcall-native-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rollcall-file-field small { color: var(--muted); font-weight: 600; }
.rollcall-photo-field { margin-bottom: 0; }
.rollcall-file-picker { position: relative; overflow: hidden; }
.rollcall-file-picker .rollcall-native-file { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; pointer-events: auto; }
.rollcall-file-picker .vehicle-file-button { color: #fff !important; background: var(--green); }
.rollcall-file-picker .vehicle-file-button,
.rollcall-file-picker .vehicle-file-name { pointer-events: none; }
.rollcall-photo-preview { width: 100%; max-width: none; min-height: 320px; padding: 12px; border: 1px dashed #b8d1c4; border-radius: 14px; background: #f8fcfa; }
.rollcall-photo-preview img,
.rollcall-detail-photo img { display: block; width: auto; max-width: 100%; max-height: 300px; margin: 0 auto; object-fit: contain; border-radius: 8px; }
.rollcall-check-section { display: grid; gap: 14px; padding: 16px; border: 1px solid #dfe9e4; border-radius: 8px; background: #fff; }
.rollcall-check-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rollcall-check-heading strong { display: block; color: var(--green); font-size: 16px; }
.rollcall-check-heading small { display: block; margin-top: 3px; color: var(--muted); font-weight: 700; }
.rollcall-check-heading span { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: var(--green); background: #e7f2ec; font-weight: 800; }
.rollcall-check-heading span.has-bad { color: var(--red); background: var(--red-soft); }
.rollcall-check-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rollcall-check-group { display: grid; gap: 0; padding: 0; border: 1px solid #e5ede9; border-radius: 8px; background: #fbfdfc; overflow: hidden; }
.rollcall-check-group h4 { margin: 0; padding: 12px 14px; color: var(--green); font-size: 14px; background: #eef6f2; border-bottom: 1px solid #dfe9e4; }
.rollcall-check-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) 104px; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid #eef3f0; font-weight: 800; }
.rollcall-check-item strong { color: var(--ink); font-weight: 900; }
.rollcall-check-item span { color: #4f6259; font-weight: 700; overflow-wrap: anywhere; }
.rollcall-check-item select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.rollcall-check-item select:focus {
  outline: 2px solid rgba(118, 170, 153, .42);
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(118, 170, 153, .08);
}
.rollcall-check-item:first-of-type { border-top: 0; }
.rollcall-check-item.is-bad strong,
.rollcall-check-item.is-bad span { color: var(--red); }
.rollcall-id-button { padding: 0; border: 0; color: var(--green); background: transparent; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.rollcall-photo-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px; color: var(--green); background: #e7f2ec; font-weight: 800; white-space: nowrap; }
.rollcall-photo-badge:hover { background: #dceee6; text-decoration: underline; }
.rollcall-record-table td strong { display: block; font-weight: 800; }
.rollcall-record-table td small { display: block; margin-top: 4px; color: var(--muted); font-weight: 700; }
.rollcall-record-table {
  min-width: 1050px;
  table-layout: fixed;
}
.rollcall-record-table th,
.rollcall-record-table td {
  min-width: 0;
}
.rollcall-record-table .rollcall-col-id { width: 72px; }
.rollcall-record-table .rollcall-col-date { width: 130px; }
.rollcall-record-table .rollcall-col-type { width: 150px; }
.rollcall-record-table .rollcall-col-time { width: 108px; }
.rollcall-record-table .rollcall-col-crew { width: 230px; }
.rollcall-record-table .rollcall-col-method { width: 110px; }
.rollcall-record-table .rollcall-col-executor { width: 150px; }
.rollcall-record-table .rollcall-col-status { width: 100px; }
.rollcall-status { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.rollcall-status.normal { color: var(--green); background: #e7f2ec; }
.rollcall-status.danger { color: var(--red); background: var(--red-soft); }
.rollcall-record-table tr:hover { background: #f3f8f5; }
.rollcall-abnormal { background: #fff5f3; }
.rollcall-abnormal td { border-color: #f0c2bc; }
.danger-text { color: var(--red); font-weight: 800; }
#rollCallDetailDialog .dialog-heading h2 {
  margin-top: 5px;
  font-size: 21px;
  letter-spacing: -.02em;
}
.rollcall-detail-header { align-items: flex-start; }
.rollcall-detail-section { display: grid; gap: 10px; padding: 18px; border: 1px solid #dfe9e4; border-radius: 8px; background: #fff; }
.rollcall-detail-section h3 { margin: 0 0 8px; font-size: 16px; color: var(--green); }
.rollcall-detail-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid #eef3f0; }
.rollcall-detail-row:first-of-type { border-top: 0; }
.rollcall-detail-row span { color: var(--muted); font-weight: 800; }
.rollcall-detail-row strong { color: var(--ink); font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
.rollcall-detail-checks { display: grid; gap: 8px; }
.rollcall-detail-check-row { display: grid; grid-template-columns: 110px 150px minmax(0, 1fr) 80px; gap: 12px; padding: 10px 0; border-top: 1px solid #eef3f0; }
.rollcall-detail-check-row:first-child { border-top: 0; }
.rollcall-detail-check-row em { color: #4f6259; font-style: normal; font-weight: 700; overflow-wrap: anywhere; }
.rollcall-detail-check-row b { color: var(--green); }
.rollcall-detail-check-row .bad { color: var(--red); }
@media (max-width: 760px) {
  .rollcall-check-item { grid-template-columns: minmax(0, 1fr) 92px; }
  .rollcall-check-item span { grid-column: 1; }
  .rollcall-check-item select { grid-column: 2; grid-row: 1 / span 2; }
  .rollcall-detail-check-row { grid-template-columns: minmax(0, 1fr) 78px; }
  .rollcall-detail-check-row span,
  .rollcall-detail-check-row strong,
  .rollcall-detail-check-row em { grid-column: 1; }
  .rollcall-detail-check-row b { grid-column: 2; grid-row: 1 / span 3; }
}
.rollcall-ledger { overflow: auto; padding: 22px; color: #17221d; background: #fff; }
.rollcall-ledger-head { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(160px, auto) minmax(360px, auto); gap: 28px; align-items: start; padding: 18px 0 20px; border-top: 3px double #1f2a24; border-bottom: 3px double #1f2a24; }
.rollcall-ledger-head p { margin: 0; color: #44554d; font-size: 13px; font-weight: 800; }
.rollcall-ledger-head h2 { margin: 8px 0 6px; font-size: 28px; line-height: 1.1; letter-spacing: 0; text-align: left; }
.rollcall-ledger-head strong { font-size: 15px; }
#rollCallLedgerDateText { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid #1f2a24; font-size: 18px; background: #f8faf8; }
.rollcall-stamp-grid { display: grid; grid-template-columns: repeat(4, minmax(76px, 1fr)); border: 1px solid #1f2a24; background: #fff; }
.rollcall-stamp-grid div { display: grid; grid-template-rows: 30px 72px; min-width: 76px; border-left: 1px solid #1f2a24; }
.rollcall-stamp-grid div:first-child { border-left: 0; }
.rollcall-stamp-grid span { display: grid; place-items: center; padding: 2px; border-bottom: 1px solid #1f2a24; font-size: 12px; font-weight: 800; background: #f3f6f4; }
.rollcall-stamp-grid b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 72px; padding: 6px 4px; background: #fff; font-size: 12px; font-style: normal; line-height: 1.25; white-space: pre-line; }
.rollcall-ledger-wrap { overflow: auto; margin-top: 18px; }
.rollcall-ledger-table { width: 100%; min-width: 1640px; border-collapse: collapse; background: #fff; }
.rollcall-ledger-table th,
.rollcall-ledger-table td { border: 1px solid #1f2a24; padding: 8px 7px; text-align: center; vertical-align: middle; }
.rollcall-ledger-table th { border: 1px solid #1f2a24; padding: 8px 7px; text-align: center; vertical-align: middle; background: #eef4f1; font-weight: 900; }
.rollcall-ledger-table tbody tr:nth-child(even) td { background: #fbfcfb; }

.daily-report-link { padding: 0; border: 0; color: var(--green); background: transparent; font: inherit; font-weight: 900; text-decoration: underline; cursor: pointer; }
.daily-report-table {
  min-width: 980px;
  table-layout: fixed;
}
.daily-report-table th,
.daily-report-table td {
  min-width: 0;
}
.daily-report-table .daily-report-col-date { width: 112px; }
.daily-report-table .daily-report-col-driver { width: 246px; }
.daily-report-table .daily-report-col-vehicle { width: 190px; }
.daily-report-table .daily-report-col-departure { width: 116px; }
.daily-report-table .daily-report-col-return { width: 116px; }
.daily-report-table .daily-report-col-distance { width: 120px; }
.daily-report-table .daily-report-col-status { width: 90px; }
.daily-report-status { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-weight: 900; white-space: nowrap; }
.daily-report-status.normal { color: var(--green); background: #e7f2ec; }
.daily-report-status.pending { color: #8a5a00; background: #fff4d6; }
.daily-report-status.danger { color: var(--red); background: var(--red-soft); }
.daily-report-status.muted { color: var(--muted); background: #edf2f0; }
.daily-report-detail-body {
  width: min(100%, 1120px);
  margin-inline: auto;
  display: grid;
  gap: 22px;
}
.daily-report-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.daily-report-section h3 { margin: 0; color: var(--green-dark); font-size: 17px; font-weight: 900; }
.daily-report-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.daily-report-form-group {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(220, 229, 224, .92);
  border-radius: 10px;
  background: rgba(255, 255, 255, .68);
}
.daily-report-form-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
}
.daily-report-form-group-heading h4 {
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}
.daily-report-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 16px;
  min-width: 0;
}
.daily-report-field-short { grid-column: span 1; }
.daily-report-field-medium { grid-column: span 2; }
.daily-report-field-third { grid-column: span 2; }
.daily-report-field-half { grid-column: span 3; }
.daily-report-field-full { grid-column: 1 / -1; }
.daily-report-trip { display: grid; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid #dfe9e4; border-radius: 8px; background: #f8fbf9; }
.daily-report-trip-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.daily-report-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.daily-report-check-group { display: grid; gap: 8px; padding: 12px; border: 1px solid #e4ece8; border-radius: 8px; background: #fbfdfc; }
.daily-report-check-group h4 { margin: 0; color: var(--green-dark); font-size: 14px; }
.daily-report-check { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 10px; align-items: center; padding-top: 8px; border-top: 1px solid #edf3f0; font-size: 13px; font-weight: 800; }
.daily-report-check:first-of-type { border-top: 0; }
.daily-report-stamps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.daily-report-stamps div { min-height: 86px; padding: 12px; border: 1px solid #dfe9e4; border-radius: 8px; background: linear-gradient(135deg, #fff, #f7fbf8); }
.daily-report-stamps span { display: block; color: var(--muted); font-weight: 900; }
.daily-report-stamps strong { display: block; margin-top: 10px; font-size: 20px; }
.daily-report-stamps small { color: var(--muted); }
.daily-report-actions { gap: 10px; }

/* Unified dialog typography */
dialog {
  font-size: var(--dialog-body-size);
  line-height: 1.55;
}

dialog .dialog-heading h2 {
  margin-top: 5px;
  color: #111a16;
  font-size: var(--dialog-title-size);
  font-weight: var(--dialog-title-weight);
  line-height: 1.25;
  letter-spacing: 0;
}

dialog .eyebrow {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .16em;
}

dialog :is(.form-hint, .vehicle-detail-hint, .driver-detail-hint, .detail-summary) {
  color: var(--muted);
  font-size: var(--dialog-body-size);
  font-weight: 400;
  line-height: 1.65;
}

dialog :is(.field span, .vehicle-edit-field > span, .maintenance-detail-list dt, .vehicle-detail-grid dt, .driver-detail-grid dt, .rollcall-detail-row span, .daily-report-stamps span) {
  color: var(--muted);
  font-size: var(--dialog-label-size);
  font-weight: var(--dialog-label-weight);
  line-height: 1.35;
  letter-spacing: 0;
}

dialog :is(.field input, .field select, .field textarea, .vehicle-edit-field input, .vehicle-edit-field select, .vehicle-edit-field textarea) {
  color: var(--ink);
  font-size: var(--dialog-input-size);
  font-weight: 400;
  line-height: 1.45;
}

dialog :is(.field input::placeholder, .field textarea::placeholder, .vehicle-edit-field input::placeholder, .vehicle-edit-field textarea::placeholder) {
  color: #8a9690;
  font-weight: 400;
}

dialog :is(.vehicle-detail-grid dd, .driver-detail-grid dd, .maintenance-detail-list dd, .rollcall-detail-row strong, .rollcall-detail-check-row em, .daily-report-stamps strong, .assignment-current-vehicle strong) {
  color: var(--ink);
  font-size: var(--dialog-body-size);
  font-weight: var(--dialog-body-weight);
  line-height: 1.55;
  letter-spacing: 0;
}

dialog :is(.driver-detail-section h3, .rollcall-detail-section h3, .rollcall-form-section h3, .daily-report-section h3, .maintenance-detail-item h3, .settings-section-heading h3) {
  color: var(--green-dark);
  font-size: var(--dialog-section-title-size);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

dialog :is(.button, .link-button) {
  font-size: var(--dialog-button-size);
  font-weight: 800;
  letter-spacing: 0;
}

dialog .button.modal-action-button,
dialog .button.detail-action-button,
dialog .button.save-action-button {
  font-size: var(--dialog-button-size);
}

dialog .icon-button {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.confirm-dialog {
  width: min(520px, calc(100% - 40px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}
.confirm-dialog::backdrop {
  background: rgba(20, 32, 27, .48);
  backdrop-filter: blur(3px);
}
.confirm-dialog-card {
  overflow: hidden;
  border: 1px solid rgba(221, 229, 225, .95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(12, 32, 24, .28);
}
.confirm-dialog .dialog-heading {
  margin: 0;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
}
.confirm-dialog-body {
  display: grid;
  gap: 10px;
  padding: 22px 24px 24px;
}
.confirm-dialog-body p {
  margin: 0;
  color: var(--muted);
  font-size: var(--dialog-body-size);
  font-weight: 600;
  line-height: 1.7;
}
.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
}
.confirm-dialog .confirm-discard-button {
  min-width: 132px;
}

.profile-photo-dialog {
  width: min(760px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
}

.profile-photo-dialog::backdrop {
  background: rgba(20, 32, 27, .48);
  backdrop-filter: blur(3px);
}

.profile-photo-card {
  overflow: hidden;
  border: 1px solid rgba(221, 229, 225, .95);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(12, 32, 24, .28);
}

.profile-photo-dialog .dialog-heading {
  margin: 0;
  padding: 30px 34px 10px;
  border-bottom: 0;
  background: #fff;
}

.profile-photo-dialog .dialog-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.12;
  letter-spacing: 0;
}

.profile-photo-dialog .dialog-heading .icon-button {
  align-self: start;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 400;
}

.profile-photo-body {
  display: grid;
  gap: 22px;
  justify-items: center;
  padding: 22px 34px 34px;
  background: #fff;
}

.profile-photo-preview {
  --profile-photo-crop-ratio: .72;
  position: relative;
  display: grid;
  place-items: center;
  width: min(440px, calc(100vw - 92px));
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  color: white;
  font-size: 46px;
  font-weight: 600;
  background: #f1f4f2;
  box-shadow: 0 18px 34px rgba(35, 58, 49, .12);
  touch-action: none;
  user-select: none;
}

.profile-photo-preview::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  box-shadow:
    0 0 0 999px rgba(255, 255, 255, .58),
    0 16px 34px rgba(35, 58, 49, .12);
  pointer-events: none;
}

.profile-photo-preview img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  max-height: none;
  object-fit: initial;
  transform-origin: center;
  cursor: grab;
  transition: width .18s ease, height .18s ease, transform .08s ease-out;
  will-change: width, height, transform;
}

.profile-photo-preview.is-dragging img {
  cursor: grabbing;
  transition: none;
}

.profile-photo-preview:has(img:not([hidden])) span {
  display: none;
}

.profile-photo-adjust {
  display: grid;
  width: min(430px, calc(100vw - 118px));
  margin-top: 2px;
}

.profile-photo-adjust[hidden] {
  display: none;
}

.profile-photo-adjust label {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  color: #8b9390;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.profile-photo-adjust input[type="range"] {
  width: 100%;
  accent-color: #d7ddd9;
}

.profile-photo-footer {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding-top: 4px;
}

.profile-photo-footer .button {
  min-width: 104px;
  min-height: 52px;
  border-radius: 18px;
  font-size: 16px;
}

.profile-photo-file-input {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

dialog :is(.rollcall-check-heading small, .rollcall-file-field small, .daily-report-stamps small, .assignment-segment-row span, .conflict-message) {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.daily-report-print-pages { display: grid; gap: 18px; }

.safety-section-tabs {
  --safety-tab-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: 4px;
  align-items: center;
  height: 46px;
  margin-bottom: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.safety-section-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(35, 58, 49, .08);
  transform: translateX(calc(var(--safety-tab-index) * (100% + 4px)));
  transition: transform .24s ease;
}
.safety-section-tabs .subpage-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .18s ease;
}
.safety-section-tabs .subpage-tab:hover { color: var(--green-dark); background: transparent; }
.safety-section-tabs .subpage-tab.active,
.safety-section-tabs .subpage-tab.active:hover { color: #fff; background: transparent; box-shadow: none; }
.safety-section-tabs .subpage-tab:disabled { cursor: default; opacity: .68; }

.safety-toolbar .module-toolbar-metric,
.module-toolbar-metric {
  display: grid;
  gap: 4px;
  min-width: 118px;
}
.safety-toolbar .vehicle-toolbar-controls { margin-left: auto; }
.accident-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.accident-summary-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dfe9e4;
  border-radius: 999px;
  color: var(--green-dark);
  background: #fff;
}
.accident-summary-pills small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.accident-summary-pills strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}
.accident-table { min-width: 960px; }
.accident-table td {
  min-width: 116px;
  padding: 0 14px;
  text-align: left;
}
.accident-table td:nth-child(5),
.accident-table td:nth-child(6),
.accident-table td:nth-child(7) { text-align: center; }
.accident-table tr { cursor: pointer; }
.accident-table tr:hover td { background: #f6faf8; }
.accident-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.accident-status.open { color: #8a5a00; background: #fff4d6; }
.accident-status.progress { color: #285fba; background: #eaf2ff; }
.accident-status.complete { color: var(--green); background: #edf6f1; }
.accident-status.late { color: var(--red); background: #fff1ef; }
.accident-status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #285fba;
  font-size: 12px;
  font-weight: 800;
  background: #e7f2ec;
  cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease, transform .16s ease;
}
.accident-status-toggle.complete { background: #edf6f1; }
.accident-status-toggle:hover,
.accident-status-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(115, 149, 129, .14);
  transform: translateY(-1px);
}
.accident-status-toggle:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}
.accident-status-select {
  width: 92px;
  min-height: 30px;
  padding: 0 26px 0 12px;
  border: 0;
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  background-color: #eaf2ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23285fba' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  appearance: none;
  cursor: pointer;
}
.accident-status-select.complete {
  color: var(--green-dark);
  background-color: #edf6f1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2343554b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.accident-status-select:hover,
.accident-status-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(115, 149, 129, .14);
}
.accident-status-select:disabled {
  cursor: wait;
  opacity: .68;
}

.education-type-tabs {
  --education-tab-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 4px;
  align-items: center;
  height: 40px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.education-type-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 999px;
  background: var(--green);
  transform: translateX(calc(var(--education-tab-index) * (100% + 4px)));
  transition: transform .24s ease;
}
.education-type-tabs .subpage-tab {
  position: relative;
  z-index: 1;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .18s ease;
}
.education-type-tabs .subpage-tab:hover { color: var(--green-dark); background: transparent; }
.education-type-tabs .subpage-tab.active,
.education-type-tabs .subpage-tab.active:hover { color: #fff; background: transparent; box-shadow: none; }

.operation-section-tabs,
.vehicle-section-tabs,
.employee-section-tabs,
.finance-section-tabs,
.safety-section-tabs,
.education-type-tabs {
  gap: 2px;
  height: 40px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 5px 14px rgba(25, 47, 38, .04);
}
.operation-section-tabs,
.vehicle-section-tabs,
.employee-section-tabs,
.finance-section-tabs,
.safety-section-tabs {
  min-width: 0;
}
.operation-section-tabs {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
}
.vehicle-section-tabs,
.employee-section-tabs,
.finance-section-tabs,
.safety-section-tabs,
.education-type-tabs {
  grid-template-columns: repeat(2, minmax(76px, 1fr));
}
.operation-section-tabs::before,
.vehicle-section-tabs::before,
.employee-section-tabs::before,
.finance-section-tabs::before,
.safety-section-tabs::before,
.education-type-tabs::before {
  top: 3px;
  bottom: 3px;
  left: 3px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: transform .28s cubic-bezier(.2, .72, .2, 1), background-color .2s ease, box-shadow .2s ease;
}
.operation-section-tabs::before {
  width: calc((100% - 10px) / 3);
  transform: translateX(calc(var(--operation-tab-index) * (100% + 2px)));
}
.vehicle-section-tabs::before {
  width: calc((100% - 8px) / 2);
  transform: translateX(calc(var(--vehicle-tab-index) * (100% + 2px)));
}
.employee-section-tabs::before {
  width: calc((100% - 8px) / 2);
  transform: translateX(calc(var(--employee-tab-index) * (100% + 2px)));
}
.finance-section-tabs::before {
  width: calc((100% - 8px) / 2);
  transform: translateX(calc(var(--finance-tab-index) * (100% + 2px)));
}
.safety-section-tabs::before {
  width: calc((100% - 8px) / 2);
  transform: translateX(calc(var(--safety-tab-index) * (100% + 2px)));
}
.education-type-tabs::before {
  width: calc((100% - 8px) / 2);
  transform: translateX(calc(var(--education-tab-index) * (100% + 2px)));
}
.operation-section-tabs .subpage-tab,
.vehicle-section-tabs .subpage-tab,
.employee-section-tabs .subpage-tab,
.finance-section-tabs .subpage-tab,
.safety-section-tabs .subpage-tab,
.education-type-tabs .subpage-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  padding: 0 16px;
  border-radius: 11px;
  color: #6e7d76;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  background: transparent;
  box-shadow: none;
  transition: color .18s ease, background-color .2s ease, transform .18s ease;
}
.operation-section-tabs .subpage-tab:hover:not(.active),
.vehicle-section-tabs .subpage-tab:hover:not(.active),
.employee-section-tabs .subpage-tab:hover:not(.active),
.finance-section-tabs .subpage-tab:hover:not(.active),
.safety-section-tabs .subpage-tab:hover:not(.active),
.education-type-tabs .subpage-tab:hover:not(.active) {
  color: var(--green-dark);
  background: rgba(244, 250, 246, .9);
  transform: none;
}
.operation-section-tabs .subpage-tab.active,
.operation-section-tabs .subpage-tab.active:hover,
.vehicle-section-tabs .subpage-tab.active,
.vehicle-section-tabs .subpage-tab.active:hover,
.employee-section-tabs .subpage-tab.active,
.employee-section-tabs .subpage-tab.active:hover,
.finance-section-tabs .subpage-tab.active,
.finance-section-tabs .subpage-tab.active:hover,
.safety-section-tabs .subpage-tab.active,
.safety-section-tabs .subpage-tab.active:hover,
.education-type-tabs .subpage-tab.active,
.education-type-tabs .subpage-tab.active:hover {
  color: #fff;
  background: transparent;
  box-shadow: none;
  transform: none;
}

/* Unified raised capsule controls */
.top-module-nav,
.operation-section-tabs,
.vehicle-section-tabs,
.employee-section-tabs,
.finance-section-tabs,
.safety-section-tabs,
.education-type-tabs,
.finance-summary-mode-tabs,
.finance-chart-mode-tabs {
  --capsule-active-bg: var(--panel);
  --capsule-track-bg: #f1f5f2;
  --capsule-hover-bg: rgba(255, 255, 255, .62);
  gap: 1px;
  height: 36px;
  min-height: 36px;
  padding: 2px;
  border: 1px solid #dce4e0;
  border-radius: 9px;
  overflow: visible;
  background: var(--capsule-track-bg);
  box-shadow: none;
}

.top-module-nav {
  --capsule-active-bg: #f1f5f2;
  --capsule-track-bg: var(--panel);
  --capsule-hover-bg: #f1f5f2;
  padding-right: 3px;
  scrollbar-width: none;
}

.office-scope-button {
  width: 100%;
  height: 36px;
  padding: 0 10px 0 12px;
  gap: 8px;
  border-color: #dce4e0;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  background: var(--panel);
  box-shadow: none;
}

.office-scope-label {
  flex: 1 1 auto;
  min-width: 0;
}

.office-scope-arrow {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right-width: 1.5px;
  border-bottom-width: 1.5px;
  transform: translateY(-1px) rotate(45deg);
}

.office-scope.is-open .office-scope-arrow {
  transform: translateY(1px) rotate(225deg);
}

.office-scope-button:hover,
.office-scope-button:focus-visible,
.office-scope.is-open .office-scope-button {
  border-color: #cbd9d2;
  background: #eef4f0;
  box-shadow: none;
}

.top-module-nav::before,
.operation-section-tabs::before,
.vehicle-section-tabs::before,
.employee-section-tabs::before,
.finance-section-tabs::before,
.safety-section-tabs::before,
.education-type-tabs::before,
.finance-summary-mode-tabs::before,
.finance-chart-mode-tabs::before {
  top: 2px;
  bottom: 2px;
  border-radius: 7px;
  background: var(--capsule-active-bg);
  box-shadow: none;
  transition:
    transform .32s cubic-bezier(.18, .72, .18, 1),
    width .32s cubic-bezier(.18, .72, .18, 1),
    background-color .18s ease;
}

.top-module-nav::before {
  left: 0;
  height: 30px;
}

.operation-section-tabs::before,
.vehicle-section-tabs::before,
.employee-section-tabs::before,
.finance-section-tabs::before,
.safety-section-tabs::before,
.education-type-tabs::before,
.finance-summary-mode-tabs::before,
.finance-chart-mode-tabs::before {
  left: 2px;
}

.operation-section-tabs::before,
.finance-chart-mode-tabs::before {
  width: calc((100% - 6px) / 3);
  transform: translateX(calc(var(--operation-tab-index, var(--finance-chart-mode-index, 0)) * (100% + 1px)));
}

.vehicle-section-tabs::before {
  width: calc((100% - 5px) / 2);
  transform: translateX(calc(var(--vehicle-tab-index) * (100% + 1px)));
}

.employee-section-tabs::before {
  width: calc((100% - 5px) / 2);
  transform: translateX(calc(var(--employee-tab-index) * (100% + 1px)));
}

#employeeView .employee-section-tabs.is-tab-entering::before {
  animation: employee-capsule-slide .32s cubic-bezier(.18, .72, .18, 1);
}

@keyframes employee-capsule-slide {
  from {
    transform: translateX(calc(var(--employee-tab-from-index, var(--employee-tab-index)) * (100% + 1px)));
  }
  to {
    transform: translateX(calc(var(--employee-tab-index) * (100% + 1px)));
  }
}

.finance-section-tabs::before {
  width: calc((100% - 5px) / 2);
  transform: translateX(calc(var(--finance-tab-index) * (100% + 1px)));
}

.safety-section-tabs::before {
  width: calc((100% - 5px) / 2);
  transform: translateX(calc(var(--safety-tab-index) * (100% + 1px)));
}

.education-type-tabs::before {
  width: calc((100% - 5px) / 2);
  transform: translateX(calc(var(--education-tab-index) * (100% + 1px)));
}

.finance-summary-mode-tabs::before {
  width: calc((100% - 5px) / 2);
  transform: translateX(calc(var(--finance-summary-mode-index) * (100% + 1px)));
}

.top-module-tab,
.operation-section-tabs .subpage-tab,
.vehicle-section-tabs .subpage-tab,
.employee-section-tabs .subpage-tab,
.finance-section-tabs .subpage-tab,
.safety-section-tabs .subpage-tab,
.education-type-tabs .subpage-tab,
.finance-summary-mode-tabs button,
.finance-chart-mode-tabs button {
  min-height: 30px;
  height: 30px;
  padding: 0 14px;
  border-radius: 7px;
  color: #687a72;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  background: transparent;
  box-shadow: none;
  transition:
    color .18s ease,
    background-color .18s ease,
    transform .16s ease;
}

.finance-summary-mode-tabs button,
.finance-chart-mode-tabs button {
  min-width: 58px;
}

.top-module-tab:hover:not(.active),
.operation-section-tabs .subpage-tab:hover:not(.active),
.vehicle-section-tabs .subpage-tab:hover:not(.active),
.employee-section-tabs .subpage-tab:hover:not(.active),
.finance-section-tabs .subpage-tab:hover:not(.active),
.safety-section-tabs .subpage-tab:hover:not(.active),
.education-type-tabs .subpage-tab:hover:not(.active),
.finance-summary-mode-tabs button:hover:not(.active),
.finance-chart-mode-tabs button:hover:not(.active) {
  color: var(--green-dark);
  background: var(--capsule-hover-bg);
  transform: none;
}

.top-module-tab.active,
.operation-section-tabs .subpage-tab.active,
.operation-section-tabs .subpage-tab.active:hover,
.vehicle-section-tabs .subpage-tab.active,
.vehicle-section-tabs .subpage-tab.active:hover,
.employee-section-tabs .subpage-tab.active,
.employee-section-tabs .subpage-tab.active:hover,
.finance-section-tabs .subpage-tab.active,
.finance-section-tabs .subpage-tab.active:hover,
.safety-section-tabs .subpage-tab.active,
.safety-section-tabs .subpage-tab.active:hover,
.education-type-tabs .subpage-tab.active,
.education-type-tabs .subpage-tab.active:hover,
.finance-summary-mode-tabs button.active,
.finance-chart-mode-tabs button.active {
  color: var(--green-dark);
  font-weight: 400;
  background: transparent;
  box-shadow: none;
  transform: none;
}

/* Global light typography pass */
body :where(h1, h2, h3, h4, p, span, small, strong, b, em, label, button, input, select, textarea, th, td, dt, dd, a) {
  font-weight: 400 !important;
}

body :where(svg) {
  stroke-width: 1.7 !important;
}

.eyebrow {
  letter-spacing: .14em;
}

@media (prefers-reduced-motion: reduce) {
  .top-module-nav::before,
  .operation-section-tabs::before,
  .vehicle-section-tabs::before,
  .employee-section-tabs::before,
  .finance-section-tabs::before,
  .safety-section-tabs::before,
    .education-type-tabs::before,
    .finance-summary-mode-tabs::before,
    .finance-chart-mode-tabs::before {
    transition: none;
  }
  #employeeView .employee-section-tabs.is-tab-entering::before {
    animation: none;
  }
}
.education-list-panel[hidden],
#safetyEducationToolbar[hidden],
#safetyAccidentToolbar[hidden],
#accidentListPanel[hidden] { display: none !important; }
.education-table { min-width: 760px; }
.education-table tr { cursor: pointer; }
.education-table tr:hover td { background: #f6faf8; }
.education-table td {
  min-width: 126px;
  padding: 0 14px;
  text-align: left;
}
.education-table td:nth-last-child(2) { text-align: center; }
.education-status { min-width: 62px; }
.education-detail-body {
  min-height: 0;
  display: grid;
  gap: 16px;
}
.education-form-stack {
  display: grid;
  gap: 16px;
}
.education-form-grid {
  max-width: 100%;
}
.education-detail-grid div:nth-child(2n) { border-right: 0; }
.education-readonly-field input[readonly] {
  color: #4f6259;
  border-color: #dfe9e4;
  background: #f7faf8;
  cursor: default;
}
.education-participant-field {
  gap: 10px;
}
.education-participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  padding: 9px;
  border: 1px solid #dfe9e4;
  border-radius: 8px;
  background: #fff;
}
.education-participant-empty {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.education-participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 8px 0 10px;
  border: 1px solid #d6e4de;
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  background: #f8fcfa;
  cursor: pointer;
}
.education-participant-chip b {
  color: var(--red);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}
.education-participant-chip:hover,
.education-participant-chip:focus-visible {
  border-color: #bfd3ca;
  background: #fff;
}
.education-signature-field {
  display: grid;
  gap: 12px;
}
.education-signature-toolbar,
.education-signature-row-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.education-signature-toolbar > span {
  color: #5d6a64;
  font-size: 13px;
  font-weight: 700;
}
.education-signature-add,
.education-signature-remove {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d6e4de;
  border-radius: 9px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}
.education-signature-remove {
  color: var(--red);
  border-color: #efcfca;
}
.education-signature-add:hover,
.education-signature-add:focus-visible {
  border-color: #bfd3ca;
  background: #f8fcfa;
}
.education-signature-remove:hover,
.education-signature-remove:focus-visible {
  border-color: #e7b6af;
  background: #fff1ef;
}
.education-signature-list {
  display: grid;
  gap: 12px;
}
.education-signature-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dfe9e4;
  border-radius: 12px;
  background: #fff;
}
.education-signature-name {
  width: min(420px, 100%);
}
.education-signature-pad {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed #b8d1c4;
  border-radius: 10px;
  background: #fbfdfc;
}
.education-signature-pad canvas {
  display: block;
  width: 100%;
  height: 150px;
  border: 1px solid #dfe9e4;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}
.education-signature-preview {
  grid-template-columns: minmax(150px, 220px);
}
.education-signature-clear {
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d6e4de;
  border-radius: 9px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}
.education-signature-clear:hover,
.education-signature-clear:focus-visible {
  border-color: #bfd3ca;
  background: #f8fcfa;
}
.education-file-preview-item {
  position: relative;
  min-width: 0;
}
.education-file-preview-item .accident-photo-thumb,
.education-file-preview-item .accident-file-pill {
  width: 100%;
}
.education-file-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #efcfca;
  border-radius: 999px;
  color: var(--red);
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 18px rgba(35, 58, 49, .08);
}
.education-file-remove:hover,
.education-file-remove:focus-visible {
  border-color: #e7b6af;
  background: #fff1ef;
}

.accident-detail-dialog .accident-dialog-heading > div:first-child {
  min-width: 0;
}
.accident-detail-dialog .accident-dialog-heading {
  display: grid;
  grid-template-columns: 140px minmax(420px, 520px) minmax(250px, auto);
  align-items: center;
  column-gap: 16px;
}
dialog.apple-form-dialog.accident-detail-dialog .accident-dialog-heading h2 {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
  overflow-wrap: anywhere;
}
.accident-detail-dialog .accident-dialog-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  min-width: 250px;
}
#accidentDetailDialog .accident-dialog-heading {
  grid-template-columns: 130px 500px 280px;
  justify-content: space-between;
}
#accidentDetailDialog .accident-dialog-heading h2 {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
}
#accidentDetailDialog .accident-dialog-actions {
  flex-wrap: nowrap;
  min-width: 280px;
}
.accident-detail-dialog .accident-dialog-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.accident-detail-dialog .accident-module-tabs {
  --accident-tab-index: 0;
  --capsule-active-bg: #f1f5f2;
  --capsule-track-bg: var(--panel);
  --capsule-hover-bg: #f1f5f2;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 1px;
  align-self: center;
  justify-self: center;
  width: 480px;
  max-width: 100%;
  height: 36px;
  min-height: 36px;
  margin: 0 auto;
  padding: 2px;
  border: 1px solid #dce4e0;
  border-radius: 9px;
  overflow: visible;
  background: var(--capsule-track-bg);
  box-shadow: none;
}
.accident-detail-dialog .accident-module-tabs::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 6px) / 5);
  border-radius: 7px;
  background: var(--capsule-active-bg);
  box-shadow: none;
  transform: translateX(calc(var(--accident-tab-index) * (100% + 1px)));
  transition:
    transform .32s cubic-bezier(.18, .72, .18, 1),
    width .32s cubic-bezier(.18, .72, .18, 1),
    background-color .18s ease;
}
.accident-module-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #687a72;
  background: transparent;
  box-shadow: none;
  transition:
    color .18s ease,
    background-color .18s ease,
    transform .16s ease;
}
.accident-module-tab span {
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}
.accident-module-tab:hover:not(.active) {
  color: var(--green-dark);
  background: var(--capsule-hover-bg);
  transform: none;
}
.accident-module-tab.active {
  color: var(--green-dark);
  background: transparent;
  box-shadow: none;
  transform: none;
}
.accident-detail-body {
  min-width: 0;
  width: min(100%, 1120px);
  margin-inline: auto;
  display: grid;
  gap: 22px;
}
.accident-content-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  scroll-margin-top: 72px;
}
.accident-content-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.accident-content-section-heading h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 900;
}
.accident-form-group {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(220, 229, 224, .92);
  border-radius: 10px;
  background: rgba(255, 255, 255, .68);
}
.accident-form-group + .accident-form-group {
  margin-top: 2px;
}
.accident-form-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
}
.accident-form-group-heading h4 {
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}
.accident-repair-items .accident-section-head h3 {
  font-size: 13px;
  font-weight: 800;
}
#accidentDetailDialog .accident-add-icon {
  flex-basis: 26px !important;
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
#accidentDetailDialog .accident-add-icon::before {
  width: 18px !important;
  height: 18px !important;
}
.accident-repair-items .maintenance-record-edit-items {
  max-height: none;
  padding-right: 0;
  overflow: visible;
  overscroll-behavior: auto;
}
.accident-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.accident-detail-grid div {
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.accident-detail-grid div:nth-child(2n) { border-right: 0; }
.accident-detail-grid dt {
  color: var(--muted);
  font-size: var(--dialog-label-size);
  font-weight: 700;
}
.accident-detail-grid dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: var(--dialog-body-size);
  font-weight: 500;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.accident-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.accident-form-grid > .field:not(.accident-wide-field),
.accident-form-grid > .accident-number-field {
  grid-column: span 4;
}
.accident-form-grid > .accident-field-short {
  grid-column: span 3;
}
.accident-form-grid > .accident-field-medium {
  grid-column: span 4;
}
.accident-form-grid > .accident-field-occurrence-location,
.accident-form-grid > .accident-field-report-accident-type {
  grid-column: span 6;
}
.accident-wide-field { grid-column: 1 / -1; }
.accident-form-grid > .accident-field-accident-cause,
.accident-form-grid > .accident-field-education-content,
.accident-form-grid > .accident-field-prevention-plan,
.accident-form-grid > .accident-field-other-compensation-amount,
.accident-form-grid > .accident-field-report-response-status {
  grid-column: 1 / -1;
}
.accident-form-grid > .accident-file-field,
.accident-form-grid > .accident-list-field,
.accident-form-grid > .accident-link-card,
.accident-form-grid > .accident-field-sync-education {
  grid-column: 1 / -1;
}
#accident-section-overview .accident-form-grid > :is(
  .accident-field-occurrence-datetime,
  .accident-field-driver-id,
  .accident-field-vehicle-id
) {
  grid-column: span 4;
}
#accident-section-overview .accident-form-grid > .accident-field-occurrence-location {
  grid-column: span 8;
}
#accident-section-overview .accident-form-grid > .accident-field-accident-kind {
  grid-column: span 4;
}
#accident-section-overview .accident-form-grid > :is(
  .accident-field-passenger-count,
  .accident-field-injured-count,
  .accident-field-occurrence-speed,
  .accident-field-speed-limit
) {
  grid-column: span 3;
}
#accident-section-overview .accident-form-grid > :is(
  .accident-field-driver-license-photo-url,
  .accident-field-police-report-photo-url
) {
  grid-column: 1 / -1;
}
#accident-section-overview .accident-form-grid > .accident-field-accident-photo-urls {
  grid-column: 1 / -1;
}
#accident-section-investigation .accident-form-grid > :is(
  .accident-field-investigation-sketch,
  .accident-field-accident-cause
) {
  grid-column: 1 / -1;
}
#accident-section-investigation .accident-form-grid > :is(
  .accident-field-education-date,
  .accident-field-education-staff,
  .accident-field-education-type
) {
  grid-column: span 4;
}
#accident-section-insurance .accident-form-grid > :is(
  .accident-field-responsibility-self,
  .accident-field-responsibility-other,
  .accident-field-self-repair-cost,
  .accident-field-other-repair-cost
) {
  grid-column: span 3;
}
.accident-link-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #dfe9e4;
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
}
.accident-link-card > span {
  color: var(--muted);
  font-size: var(--dialog-label-size);
  font-weight: 700;
}
.accident-link-card > strong {
  color: var(--ink);
  font-size: var(--dialog-body-size);
  font-weight: 600;
}
.accident-link-card > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.accident-check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  color: var(--ink);
  cursor: pointer;
}
.accident-check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.accident-check-row strong {
  font-size: var(--dialog-body-size);
  font-weight: 600;
}
.accident-check-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.accident-readonly-field output,
.accident-readonly-file-empty {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: var(--dialog-input-size);
  font-weight: 400;
  line-height: 1.45;
  background: #fff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.accident-readonly-text output {
  align-items: flex-start;
  min-height: 96px;
}
#accidentDetailDialog .accident-form-grid > :is(
  .accident-field-sync-education,
  .accident-field-accident-cause,
  .accident-field-education-content,
  .accident-field-prevention-plan,
  .accident-field-other-compensation-amount,
  .accident-field-report-response-status,
  .accident-file-field,
  .accident-list-field,
  .accident-link-card
) {
  grid-column: 1 / -1 !important;
}
#accidentDetailDialog .accident-form-grid > :is(
  .accident-field-education-date,
  .accident-field-education-staff,
  .accident-field-education-type
) {
  grid-column: span 4 !important;
}
#accidentDetailDialog .accident-prevention-group .accident-form-grid > :is(
  .accident-field-prevention-plan,
  .accident-field-completion-proof-urls
) {
  grid-column: 1 / -1 !important;
}
.accident-number-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.accident-number-field > span { grid-column: 1 / -1; }
.accident-number-field em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.accident-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.accident-section-head h3,
.accident-photo-section h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: 16px;
}
.accident-counterparty-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 34px 10px 10px;
  border: 1px solid #dfe9e4;
  border-radius: 8px;
  background: #fff;
}
.accident-counterparty-row .field:nth-child(n) { grid-column: span 1; }
.accident-counterparty-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid #e5c5bf;
  border-radius: 8px;
  color: var(--red);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  background: #fff8f7;
}
.accident-counterparty-remove:hover,
.accident-counterparty-remove:focus-visible {
  border-color: #d9988d;
  background: #fff1ef;
}
#accidentDetailDialog .maintenance-record-remove-item {
  flex-basis: 26px !important;
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
#accidentDetailDialog .maintenance-record-remove-item::before {
  width: 16px !important;
  height: 16px !important;
}
@media (max-width: 1100px) {
  .accident-detail-dialog .accident-dialog-heading {
    grid-template-columns: minmax(120px, 1fr) auto;
  }
  .accident-detail-dialog .accident-module-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    order: 3;
  }
  .accident-form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .accident-form-grid > .field:not(.accident-wide-field),
  .accident-form-grid > .accident-number-field,
  .accident-form-grid > .accident-field-medium {
    grid-column: span 3;
  }
  .accident-form-grid > .accident-field-short {
    grid-column: span 2;
  }
  .accident-counterparty-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .accident-counterparty-row .field:nth-child(n) { grid-column: span 1; }
}
@media (max-width: 720px) {
  .accident-detail-dialog .accident-dialog-heading {
    grid-template-columns: 1fr;
  }
  .accident-detail-dialog .accident-dialog-actions {
    justify-content: flex-start;
  }
  .accident-form-grid,
  .accident-counterparty-row {
    grid-template-columns: 1fr;
  }
  .accident-form-group {
    padding: 12px;
  }
  .accident-form-grid > .field:not(.accident-wide-field),
  .accident-form-grid > .accident-number-field,
  .accident-form-grid > .accident-field-short,
  .accident-form-grid > .accident-field-medium,
  .accident-counterparty-row .field:nth-child(n) {
    grid-column: 1 / -1;
  }
}
.accident-file-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}
.accident-file-field > span {
  padding-top: 0;
}
.accident-file-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
@media (max-width: 720px) {
  .accident-file-field {
    grid-template-columns: 1fr;
  }
  .accident-file-field > span {
    padding-top: 0;
  }
  .accident-file-control {
    max-width: 100%;
  }
  .accident-file-field .accident-photo-grid {
    grid-column: 1 / -1;
  }
}
.accident-file-control input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.accident-file-control strong {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--green);
}
.accident-file-control small {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.accident-photo-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 720px) {
  .accident-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }
}
.accident-preview-item {
  position: relative;
  min-width: 0;
}
.accident-preview-item .accident-file-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid rgba(214, 155, 145, .72);
  border-radius: 999px;
  color: var(--red);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 6px 14px rgba(35, 58, 49, .12);
}
.accident-photo-thumb,
.accident-photo-grid img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border: 1px dashed #b8d1c4;
  border-radius: 8px;
  background: #f8fcfa;
}
.accident-photo-thumb span {
  display: none;
}
.accident-file-pill {
  display: block;
  min-height: 46px;
  padding: 10px 52px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  overflow-wrap: anywhere;
}
.accident-sketch-preview {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px dashed #b8d1c4;
  border-radius: 8px;
  background: #fff;
}
.accident-edit-actions {
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 16px 26px;
  border-top: 1px solid #e2e9e5;
  background: #fff;
  box-shadow: 0 -8px 22px rgba(22, 50, 38, .04);
}

/* Unified modal controls */
dialog :is(.field, .vehicle-edit-field, .maintenance-record-edit-item .field) {
  gap: 7px;
}

dialog :is(.field.compact, .vehicle-edit-field, .maintenance-record-edit-item .field) {
  margin-top: 0;
  margin-bottom: 0;
}

dialog :is(
  .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .field select,
  .vehicle-edit-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .vehicle-edit-field select,
  .maintenance-record-edit-item input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .maintenance-record-edit-item select,
  .finance-select-button,
  .dialog-custom-select-button
) {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dce6e0;
  border-radius: 14px;
  color: #18231e;
  background-color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, outline-color .16s ease;
}

dialog :is(.field textarea, .vehicle-edit-field textarea, .maintenance-record-edit-item textarea) {
  width: 100%;
  min-height: 78px;
  padding: 11px 14px;
  border: 1px solid #dce6e0;
  border-radius: 14px;
  color: #18231e;
  background-color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  resize: vertical;
}
#accidentDetailDialog .field textarea {
  min-height: 118px;
}
#accidentDetailDialog .maintenance-record-edit-item textarea {
  min-height: 64px;
}

dialog :is(.field input, .field select, .field textarea, .vehicle-edit-field input, .vehicle-edit-field select, .vehicle-edit-field textarea, .finance-select-button, .dialog-custom-select-button):is(:focus, :focus-visible),
dialog .finance-select.is-open .finance-select-button,
dialog .dialog-custom-select.is-open .dialog-custom-select-button {
  outline: 2px solid rgba(118, 170, 153, .42);
  outline-offset: 0;
  border-color: transparent;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(118, 170, 153, .08);
}

dialog :is(.field input, .field textarea, .vehicle-edit-field input, .vehicle-edit-field textarea)::placeholder {
  color: #8a9690;
  font-weight: 400;
}

dialog :is(.field input, .field select, .field textarea, .vehicle-edit-field input, .vehicle-edit-field select, .vehicle-edit-field textarea):disabled,
dialog :is(.field input, .field select, .field textarea, .vehicle-edit-field input, .vehicle-edit-field select, .vehicle-edit-field textarea)[readonly] {
  color: #6e7b75;
  background-color: #f3f8f5;
  cursor: not-allowed;
}

dialog :is(.field select, .vehicle-edit-field select) {
  appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 21px) 50%,
    calc(100% - 15px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

dialog :is(.field select, .vehicle-edit-field select) option {
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 400;
}


dialog .finance-select {
  min-width: 0;
}

dialog .dialog-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


dialog .dialog-custom-select {
  position: relative;
  min-width: 0;
  width: 100%;
}

dialog .dialog-custom-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: auto;
  padding: 0 14px;
  text-indent: 0;
  text-align: left;
  cursor: pointer;
}

dialog .dialog-custom-select-button.is-empty {
  color: #8a9690;
  font-weight: 400;
}

dialog .dialog-custom-select-button:disabled {
  color: #6e7b75;
  background-color: #f3f8f5;
  cursor: not-allowed;
}

dialog .dialog-custom-select-button::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .82;
}

dialog .dialog-custom-select-list {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: none;
  max-height: min(238px, 42vh);
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 46px rgba(35, 58, 49, .16);
}

dialog .dialog-custom-select.is-dropup .dialog-custom-select-list {
  top: auto;
  bottom: calc(100% + 7px);
}

dialog .dialog-custom-select.is-open .dialog-custom-select-list {
  display: grid;
  gap: 4px;
}

dialog .dialog-custom-select-option {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}

dialog .dialog-custom-select-option.is-active,
dialog .dialog-custom-select-option:hover,
dialog .dialog-custom-select-option:focus-visible {
  color: var(--green-dark);
  background: var(--green-soft);
  outline: none;
}

dialog .dialog-custom-select-option:disabled {
  color: #9ba6a0;
  cursor: not-allowed;
  background: transparent;
}

dialog .finance-select-button {
  height: auto;
  min-height: 48px;
  font-size: 15px;
}

dialog .finance-select-button::after {
  width: 8px;
  height: 8px;
  border-width: 2px;
}

dialog :is(
  .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .field select,
  .field textarea,
  .vehicle-edit-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .vehicle-edit-field select,
  .vehicle-edit-field textarea,
  .maintenance-record-edit-item textarea,
  .finance-select-button,
  .dialog-custom-select-button,
  .dialog-custom-select-option
) {
  font-weight: 400;
}

dialog :is(
  .vehicle-detail-grid dd,
  .driver-detail-grid dd,
  .maintenance-detail-list dd,
  .finance-detail-grid strong,
  .accident-detail-grid dd,
  .accident-link-card > strong,
  .rollcall-detail-row strong,
  .rollcall-detail-check-row em,
  .daily-report-stamps strong,
  .assignment-current-vehicle strong
) {
  font-weight: 400;
}

dialog .finance-select-list {
  top: calc(100% + 7px);
  max-height: 238px;
  padding: 8px;
  border-radius: 14px;
  box-shadow: 0 22px 46px rgba(35, 58, 49, .16);
}

dialog .finance-select.is-open .finance-select-list {
  gap: 4px;
}

dialog .finance-select-option {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 14px;
  transition: background-color .14s ease, color .14s ease;
}

dialog .finance-select-option.active,
dialog .finance-select-option:hover,
dialog .finance-select-option:focus-visible {
  color: var(--green-dark);
  background: var(--green-soft);
}

dialog.apple-form-dialog {
  --apple-dialog-width: 920px;
  --apple-dialog-content-width: 760px;
  --apple-dialog-body-padding-x: 34px;
  --apple-dialog-body-padding-top: 26px;
  --apple-dialog-body-padding-bottom: 34px;
  width: min(var(--apple-dialog-width), calc(100vw - 64px));
  max-height: min(88vh, 880px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #fbfdfc;
  box-shadow: 0 30px 90px rgba(22, 38, 30, .26);
}

dialog.apple-form-dialog::backdrop {
  background: rgba(24, 35, 31, .44);
  backdrop-filter: blur(8px);
}

dialog.apple-form-dialog > form,
dialog.apple-form-dialog .vehicle-detail-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  max-height: min(88vh, 880px);
  padding: 0;
  overflow: hidden;
  background: #fbfdfc;
}

#vehicleDetailDialog.apple-form-dialog .vehicle-detail-content {
  height: min(88vh, 880px);
}

#vehicleDetailDialog.apple-form-dialog .vehicle-modal-body {
  display: block;
  overflow-y: auto;
}

#vehicleDetailDialog.apple-form-dialog #vehicleDetailGrid {
  height: auto;
  min-height: 0;
  align-self: start;
}

dialog.apple-form-dialog .dialog-heading {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  margin: 0;
  padding: 22px var(--apple-dialog-body-padding-x) 18px;
  border-bottom: 1px solid rgba(220, 229, 224, .86);
  background: #fbfdfc;
}

dialog.apple-form-dialog .dialog-heading .eyebrow {
  color: #6f927d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

dialog.apple-form-dialog .dialog-heading h2 {
  margin-top: 6px;
  color: #17221d;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
}

dialog.apple-form-dialog :is(.dialog-heading-actions, .vehicle-action-buttons, .modal-header-actions) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

dialog.apple-form-dialog :is(.icon-button, .modal-close-button) {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #4f5d56;
  border-color: #dce6e0;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 8px 18px rgba(28, 54, 42, .07);
}

dialog.apple-form-dialog :is(.icon-button, .modal-close-button):is(:hover, :focus-visible) {
  outline: 0;
  border-color: #cbdad2;
  background: #f7fbf8;
  box-shadow: 0 0 0 3px rgba(111, 146, 125, .14), 0 8px 18px rgba(28, 54, 42, .07);
}

dialog.apple-form-dialog :is(.office-dialog-body, .maintenance-dialog-body, .driver-modal-body, .assignment-dialog-body, .rollcall-form-body, .rollcall-detail-body, .daily-report-detail-body, .vehicle-modal-body, .accident-dialog-body, .education-detail-body, .settings-dialog-body) {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  padding: var(--apple-dialog-body-padding-top) var(--apple-dialog-body-padding-x) var(--apple-dialog-body-padding-bottom);
  overflow: auto;
  background: #fbfdfc;
  scrollbar-color: rgba(102, 116, 108, .45) transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

dialog.apple-form-dialog :is(.office-dialog-body, .maintenance-dialog-body, .driver-modal-body, .assignment-dialog-body, .rollcall-form-body, .rollcall-detail-body, .daily-report-detail-body, .vehicle-modal-body, .accident-dialog-body, .education-detail-body, .settings-dialog-body)::-webkit-scrollbar {
  width: 10px;
}

dialog.apple-form-dialog :is(.office-dialog-body, .maintenance-dialog-body, .driver-modal-body, .assignment-dialog-body, .rollcall-form-body, .rollcall-detail-body, .daily-report-detail-body, .vehicle-modal-body, .accident-dialog-body, .education-detail-body, .settings-dialog-body)::-webkit-scrollbar-track {
  background: transparent;
}

dialog.apple-form-dialog :is(.office-dialog-body, .maintenance-dialog-body, .driver-modal-body, .assignment-dialog-body, .rollcall-form-body, .rollcall-detail-body, .daily-report-detail-body, .vehicle-modal-body, .accident-dialog-body, .education-detail-body, .settings-dialog-body)::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(102, 116, 108, .38);
  background-clip: content-box;
}

dialog.apple-form-dialog :is(.office-dialog-body, .maintenance-dialog-body, .driver-modal-body, .assignment-dialog-body) > .form-hint {
  display: none;
}

dialog.apple-form-dialog .vehicle-detail-hint {
  display: none;
}

dialog.apple-form-dialog :is(.maintenance-form-grid, .finance-record-grid, .maintenance-record-edit-grid, .assignment-time-grid, .dialog-form-card) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: var(--apple-dialog-content-width);
  margin: 0 auto;
  gap: 18px;
  padding: 22px;
  border: 1px solid #dfe8e3;
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 42px rgba(27, 55, 43, .07);
}

dialog.apple-form-dialog :is(.finance-dialog-section, .assignment-segment-list-section, .assignment-editor-section, .maintenance-record-edit-items, .permission-matrix) {
  width: 100%;
  max-width: var(--apple-dialog-content-width);
  margin-inline: auto;
}

dialog.apple-form-dialog .finance-dialog-section {
  padding: 22px;
  border: 1px solid #dfe8e3;
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 42px rgba(27, 55, 43, .07);
}

dialog.apple-form-dialog .finance-dialog-section + .finance-dialog-section,
dialog.apple-form-dialog .maintenance-record-edit-toolbar,
dialog.apple-form-dialog .maintenance-record-edit-items {
  margin-top: 18px;
}

dialog.apple-form-dialog .maintenance-record-edit-toolbar {
  width: 100%;
  max-width: var(--apple-dialog-content-width);
  margin-inline: auto;
}

dialog.apple-form-dialog .maintenance-record-edit-item-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

dialog.apple-form-dialog .finance-dialog-section .maintenance-form-grid {
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#financeRecordDialog.apple-form-dialog .finance-record-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

#financeRecordDialog.apple-form-dialog :is(
  .finance-record-date-field,
  .finance-record-direction-field,
  .finance-record-account-field,
  .finance-record-tax-field,
  .finance-record-amount-field,
  .finance-record-tax-preview-field,
  .finance-record-counterparty-field,
  .finance-record-payment-field,
  .finance-record-document-field
) {
  grid-column: span 4;
}

#financeRecordDialog.apple-form-dialog :is(.finance-record-description-field, .finance-record-notes-field) {
  grid-column: 1 / -1;
}

#vehicleDetailDialog.apple-form-dialog .vehicle-edit-form {
  width: 100%;
  max-width: var(--apple-dialog-content-width);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #dfe8e3;
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 42px rgba(27, 55, 43, .07);
}

dialog.apple-form-dialog :is(.vehicle-edit-fields, .rollcall-flat-form) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

dialog.apple-form-dialog :is(.finance-detail-grid, .driver-detail-sections, .maintenance-detail-list, .maintenance-detail-wrap, .rollcall-detail-section, .daily-report-section, .settings-summary) {
  width: 100%;
  max-width: var(--apple-dialog-content-width);
  margin-inline: auto;
}

dialog.apple-form-dialog :is(.maintenance-detail-wrap, .maintenance-detail-items, .maintenance-record-edit-items) {
  max-height: none;
  margin-top: 0;
  padding-right: 0;
  overflow: visible;
}

dialog.apple-form-dialog :is(.field, .vehicle-edit-field, .maintenance-record-edit-item) {
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0;
}

dialog.apple-form-dialog :is(.field > span, .vehicle-edit-field > span, .maintenance-record-edit-item > span) {
  color: #73817a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

dialog.apple-form-dialog :is(
  .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .field select,
  .vehicle-edit-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .vehicle-edit-field select,
  .maintenance-record-edit-item input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .maintenance-record-edit-item select,
  .finance-select-button,
  .dialog-custom-select-button
) {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dce6e0;
  border-radius: 14px;
  color: #18231e;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}

dialog.apple-form-dialog :is(.field textarea, .vehicle-edit-field textarea, .maintenance-record-edit-item textarea) {
  width: 100%;
  min-height: 78px;
  padding: 11px 14px;
  border: 1px solid #dce6e0;
  border-radius: 14px;
  color: #18231e;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

dialog.apple-form-dialog :is(input::placeholder, textarea::placeholder) {
  color: #9aa6a0;
  font-weight: 400 !important;
}

dialog.apple-form-dialog :is(.dialog-custom-select-button, .finance-select-button) {
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 44px;
}

dialog.apple-form-dialog :is(.dialog-custom-select-button, .finance-select-button)::after {
  position: absolute;
  top: 50%;
  right: 18px;
  flex: none;
  transform: translateY(-60%) rotate(45deg);
}


dialog.apple-form-dialog :is(
  .field input,
  .field select,
  .field textarea,
  .vehicle-edit-field input,
  .vehicle-edit-field select,
  .vehicle-edit-field textarea,
  .maintenance-record-edit-item input,
  .maintenance-record-edit-item select,
  .maintenance-record-edit-item textarea,
  .finance-select-button,
  .dialog-custom-select-button
):is(:focus, :focus-visible),
dialog.apple-form-dialog .dialog-custom-select.is-open .dialog-custom-select-button,
dialog.apple-form-dialog .finance-select.is-open .finance-select-button {
  outline: 0;
  border-color: #7ba5f8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 123, 246, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: translateY(-1px);
}

dialog.apple-form-dialog :is(input:read-only, input:disabled, select:disabled, textarea:disabled) {
  color: #6a776f;
  background: #eef4f0;
}

dialog.apple-form-dialog :is(.employee-wide-field, .maintenance-notes, .maintenance-description, .finance-record-description-field, .finance-record-notes-field, .vehicle-edit-field-full, .maintenance-record-edit-item-wide, .maintenance-record-edit-item-full, .assignment-route-field, .rollcall-check-section, .rollcall-file-field, .rollcall-photo-preview) {
  grid-column: 1 / -1;
}

dialog.apple-form-dialog .vehicle-plate-edit-row {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(247, 249, 248, .82);
}

dialog.apple-form-dialog :is(.dialog-actions, .vehicle-edit-actions, .accident-edit-actions) {
  position: static;
  bottom: auto;
  z-index: auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 16px var(--apple-dialog-body-padding-x);
  border-top: 1px solid #e2e9e5;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -8px 22px rgba(22, 50, 38, .04);
}

dialog.apple-form-dialog .vehicle-file-picker {
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dce6e0;
  border-radius: 14px;
  color: #18231e;
  font-size: 16px;
  font-weight: 400;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

dialog.apple-form-dialog .vehicle-file-button,
dialog.apple-form-dialog .maintenance-record-edit-toolbar .button {
  border-radius: 14px;
  background: #6f927d;
}

#assignmentDialog.apple-form-dialog .assignment-segment-list-section,
#assignmentDialog.apple-form-dialog .assignment-editor-section {
  width: min(620px, 100%);
  margin: 0 auto;
}

#financeRecordDialog.apple-form-dialog {
  --apple-dialog-width: 1060px;
  --apple-dialog-content-width: 960px;
}

#financeSummaryFilterDialog.apple-form-dialog {
  --apple-dialog-width: 760px;
  --apple-dialog-content-width: 620px;
}

#officeDialog.apple-form-dialog,
#platformCompanyDialog.apple-form-dialog,
#userDialog.apple-form-dialog,
#roleDialog.apple-form-dialog,
#settingsDialog.apple-form-dialog,
#maintenancePlanDialog.apple-form-dialog,
#maintenancePlanDetailDialog.apple-form-dialog,
#maintenanceRecordEditDialog.apple-form-dialog,
#rollCallRecordDialog.apple-form-dialog,
#rollCallOutputDialog.apple-form-dialog,
#dailyReportOutputDialog.apple-form-dialog {
  --apple-dialog-width: 900px;
  --apple-dialog-content-width: 760px;
}

#driverDialog.apple-form-dialog,
#officeStaffDialog.apple-form-dialog,
#vehicleDetailDialog.apple-form-dialog,
#rollCallDetailDialog.apple-form-dialog {
  --apple-dialog-width: 980px;
  --apple-dialog-content-width: 900px;
}

#driverDetailDialog.apple-form-dialog,
#officeStaffDetailDialog.apple-form-dialog,
#maintenanceDetailDialog.apple-form-dialog,
#dailyReportDetailDialog.apple-form-dialog,
#financeRecordDetailDialog.apple-form-dialog,
#accidentDetailDialog.apple-form-dialog,
#educationDetailDialog.apple-form-dialog {
  --apple-dialog-width: 1060px;
  --apple-dialog-content-width: 960px;
}

#assignmentDialog.apple-form-dialog .assignment-status-field,
#assignmentDialog.apple-form-dialog .assignment-status-panel,
#assignmentDialog.apple-form-dialog .assignment-time-grid,
#assignmentDialog.apple-form-dialog .assignment-route-field {
  width: 100%;
  max-width: none;
}

dialog :is(
  .button.save-action-button,
  .dialog-heading-actions .button.primary,
  .button.modal-action-output,
  .button.detail-action-output,
  .button.modal-action-edit,
  .button.modal-action-delete,
  .button.detail-action-delete,
  .dialog-heading .icon-button,
  .dialog-heading .modal-close-button,
  .driver-detail-header-actions .icon-button,
  .driver-detail-header-actions .modal-close-button
) {
  --dialog-action-icon-x: 0px;
  --dialog-action-icon-y: 0px;
  position: relative;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 46px !important;
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  padding: 0 !important;
  border-radius: 16px;
  gap: 0 !important;
  overflow: hidden;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(35, 58, 49, .08);
}

dialog :is(
  .button.save-action-button,
  .dialog-heading-actions .button.primary,
  .button.modal-action-output,
  .button.detail-action-output,
  .button.modal-action-edit,
  .button.modal-action-delete,
  .button.detail-action-delete,
  .dialog-heading .icon-button,
  .dialog-heading .modal-close-button,
  .driver-detail-header-actions .icon-button,
  .driver-detail-header-actions .modal-close-button
)::before {
  content: "" !important;
  display: block !important;
  flex: none !important;
  width: 21px !important;
  height: 21px !important;
  margin: 0 !important;
  border: 0 !important;
  background: currentColor !important;
  transform: translate(var(--dialog-action-icon-x), var(--dialog-action-icon-y)) !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
}

dialog :is(
  .button.save-action-button,
  .dialog-heading-actions .button.primary
) {
  color: #fff;
  border-color: transparent;
  background: #6f927d;
}

dialog :is(.button.modal-action-output, .button.detail-action-output, .button.modal-action-edit) {
  color: var(--green-dark);
  border-color: #d6e4de;
  background: #fff;
}

dialog :is(.button.modal-action-delete, .button.detail-action-delete) {
  color: var(--red);
  border-color: #efcfca;
  background: #fff7f6;
}

dialog :is(.dialog-heading .icon-button, .dialog-heading .modal-close-button, .driver-detail-header-actions .icon-button, .driver-detail-header-actions .modal-close-button) {
  color: #3f4c46;
  border-color: #dfe7e3;
  background: #fff;
}

dialog :is(.button.save-action-button, .dialog-heading-actions .button.primary)::before {
  --dialog-action-icon-x: .25px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 4h10l2 2v14H6zM9 4v6h6V4M9 15h6M9 18h4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 4h10l2 2v14H6zM9 4v6h6V4M9 15h6M9 18h4'/%3E%3C/svg%3E");
}

dialog :is(.button.modal-action-output, .button.detail-action-output)::before {
  --dialog-action-icon-x: .35px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 4h8l4 4v12H6zM14 4v5h5M10 14h7M14 11l3 3-3 3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 4h8l4 4v12H6zM14 4v5h5M10 14h7M14 11l3 3-3 3'/%3E%3C/svg%3E");
}

dialog .button.modal-action-edit::before {
  --dialog-action-icon-x: .45px;
  --dialog-action-icon-y: -.25px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 20h4l10.5-10.5a2.1 2.1 0 0 0-3-3L5 17zM14 7l3 3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 20h4l10.5-10.5a2.1 2.1 0 0 0-3-3L5 17zM14 7l3 3'/%3E%3C/svg%3E");
}

dialog :is(.button.modal-action-delete, .button.detail-action-delete)::before {
  --dialog-action-icon-y: -.2px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E");
}

dialog :is(.dialog-heading .icon-button, .dialog-heading .modal-close-button, .driver-detail-header-actions .icon-button, .driver-detail-header-actions .modal-close-button)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

dialog :is(
  .button.save-action-button,
  .dialog-heading-actions .button.primary,
  .button.modal-action-output,
  .button.detail-action-output,
  .button.modal-action-edit,
  .button.modal-action-delete,
  .button.detail-action-delete,
  .dialog-heading .icon-button,
  .dialog-heading .modal-close-button,
  .driver-detail-header-actions .icon-button,
  .driver-detail-header-actions .modal-close-button
)[hidden] {
  display: none !important;
}

dialog :is(
  .button.save-action-button,
  .dialog-heading-actions .button.primary,
  .button.modal-action-output,
  .button.detail-action-output,
  .button.modal-action-edit,
  .button.modal-action-delete,
  .button.detail-action-delete,
  .dialog-heading .icon-button,
  .dialog-heading .modal-close-button,
  .driver-detail-header-actions .icon-button,
  .driver-detail-header-actions .modal-close-button
):is(:hover, :focus-visible) {
  outline: 0;
  border-color: #bfd3ca;
  background: #f8fcfa;
  box-shadow: 0 0 0 3px rgba(111, 146, 125, .18), 0 10px 22px rgba(35, 58, 49, .12);
}

dialog :is(.button.save-action-button, .dialog-heading-actions .button.primary):is(:hover, :focus-visible) {
  background: #638672;
}

dialog :is(.button.modal-action-delete, .button.detail-action-delete):is(:hover, :focus-visible) {
  border-color: #e7b6af;
  background: #fff1ef;
  box-shadow: 0 0 0 3px rgba(184, 83, 72, .15), 0 10px 22px rgba(106, 37, 31, .08);
}

dialog :is(.dialog-heading h2, .accident-dialog-heading h2) {
  margin-top: 4px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: .12em !important;
}

dialog.apple-form-dialog .dialog-heading .eyebrow {
  font-weight: 400 !important;
}

dialog :is(.form-hint, .vehicle-detail-hint, .driver-detail-hint, .detail-summary) {
  display: none !important;
}

@media (max-width: 760px) {
  dialog.apple-form-dialog {
    width: calc(100% - 24px);
    max-height: min(92vh, 880px);
    border-radius: 24px;
  }
  dialog.apple-form-dialog > form,
  dialog.apple-form-dialog .vehicle-detail-content {
    min-height: 0;
    max-height: min(92vh, 880px);
  }
  dialog.apple-form-dialog .dialog-heading {
    min-height: 112px;
    padding: 20px;
  }
  dialog.apple-form-dialog .dialog-heading h2 {
    font-size: 23px;
  }
  dialog.apple-form-dialog :is(.office-dialog-body, .maintenance-dialog-body, .driver-modal-body, .assignment-dialog-body, .rollcall-form-body, .rollcall-detail-body, .daily-report-detail-body, .vehicle-modal-body, .accident-dialog-body, .education-detail-body, .settings-dialog-body) {
    padding: 18px 16px 24px;
  }
  dialog.apple-form-dialog :is(.maintenance-form-grid, .finance-record-grid, .maintenance-record-edit-grid, .assignment-time-grid, .dialog-form-card) {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    padding: 16px;
    border-radius: 22px;
  }

  #vehicleDetailDialog.apple-form-dialog .vehicle-edit-fields,
  dialog.apple-form-dialog .rollcall-flat-form,
  #maintenanceRecordEditDialog.apple-form-dialog .maintenance-record-edit-grid,
  #maintenanceRecordEditDialog.apple-form-dialog .maintenance-record-edit-item-grid,
  dialog.apple-form-dialog .vehicle-plate-edit-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #financeRecordDialog.apple-form-dialog .finance-record-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #financeRecordDialog.apple-form-dialog :is(
    .finance-record-date-field,
    .finance-record-direction-field,
    .finance-record-account-field,
    .finance-record-tax-field,
    .finance-record-amount-field,
    .finance-record-tax-preview-field,
    .finance-record-counterparty-field,
    .finance-record-payment-field,
    .finance-record-document-field,
    .finance-record-description-field,
    .finance-record-notes-field
  ) {
    grid-column: 1 / -1;
  }
}

.daily-report-print-page { page-break-after: always; color: #17221d; background: #fff; }
.daily-report-print-page header { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(210px, auto) minmax(360px, auto); gap: 18px; align-items: start; padding: 8px 0 12px; border-top: 3px double #1f2a24; border-bottom: 3px double #1f2a24; }
.daily-report-print-page header p { margin: 0; color: #44554d; font-weight: 900; }
.daily-report-print-page header h2 { margin: 7px 0; font-size: 30px; letter-spacing: 0; }
.daily-report-print-meta { display: grid; gap: 8px; }
.daily-report-print-meta span { padding: 8px 12px; border: 1px solid #1f2a24; text-align: center; font-weight: 900; background: #f8faf8; }
.daily-report-print-stamps { display: grid; grid-template-columns: repeat(4, minmax(82px, 1fr)); border: 1px solid #1f2a24; }
.daily-report-print-stamps div { display: grid; grid-template-rows: 28px 62px; border-left: 1px solid #1f2a24; text-align: center; }
.daily-report-print-stamps div:first-child { border-left: 0; }
.daily-report-print-stamps span { display: grid; place-items: center; padding: 2px; border-bottom: 1px solid #1f2a24; font-size: 11px; font-weight: 900; background: #f3f6f4; }
.daily-report-print-stamps b { display: grid; place-items: center; padding: 4px; color: #17221d; font-size: 14px; overflow-wrap: anywhere; }
.daily-report-print-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; border: 1px solid #1f2a24; }
.daily-report-print-summary div { min-height: 76px; padding: 8px; border-left: 1px solid #1f2a24; }
.daily-report-print-summary div:first-child { border-left: 0; }
.daily-report-print-summary span,
.daily-report-print-notes span { display: block; color: #4b5b54; font-size: 11px; font-weight: 900; }
.daily-report-print-summary p { margin: 4px 0 0; color: #17221d; font-size: 12px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.daily-report-print-summary b { font-weight: 900; }
.daily-report-print-summary strong { font-size: 13px; }
.daily-report-print-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.daily-report-print-grid h3 { margin: 0 0 6px; font-size: 15px; }
.daily-report-print-grid table { width: 100%; border-collapse: collapse; font-size: 10px; table-layout: fixed; }
.daily-report-print-grid th,
.daily-report-print-grid td { border: 1px solid #1f2a24; padding: 4px; vertical-align: middle; }
.daily-report-print-grid th { background: #eef4f1; }
.daily-report-print-grid th:nth-child(1),
.daily-report-print-grid td:nth-child(1) { width: 30px; text-align: center; }
.daily-report-print-grid th:nth-child(2),
.daily-report-print-grid td:nth-child(2),
.daily-report-print-grid th:nth-child(4),
.daily-report-print-grid td:nth-child(4) { width: 56px; text-align: center; }
.daily-report-print-grid th:nth-child(6),
.daily-report-print-grid td:nth-child(6) { width: 58px; text-align: center; }
.daily-report-print-grid th:nth-child(7),
.daily-report-print-grid td:nth-child(7) { width: 42px; text-align: center; }
.daily-report-print-notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.daily-report-print-notes div { min-height: 60px; padding: 8px; border: 1px solid #1f2a24; }
.daily-report-print-notes p { margin: 4px 0 0; color: #17221d; white-space: pre-wrap; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body.printing-rollcall { background: #fff; }
  body.printing-rollcall .topbar,
  body.printing-rollcall .floating-actions,
  body.printing-rollcall .subpage-tabs,
  body.printing-rollcall #employeeView,
  body.printing-rollcall #operationView,
  body.printing-rollcall #rollCallRecordsView,
  body.printing-rollcall #rollCallOutputDialog,
  body.printing-rollcall .toast { display: none !important; }
  body.printing-rollcall .app-shell { display: block; }
  body.printing-rollcall main { padding: 0; }
  body.printing-rollcall #rollCallView,
  body.printing-rollcall #rollCallLedgerView { display: block !important; }
  body.printing-rollcall .panel { border: 0; box-shadow: none; }
  body.printing-rollcall .vehicle-toolbar { display: none; }
  body.printing-rollcall .rollcall-ledger { padding: 0; overflow: visible; }
  body.printing-rollcall .rollcall-ledger-wrap { overflow: visible; }
  body.printing-rollcall .rollcall-ledger-head { gap: 14px; padding: 8px 0 10px; }
  body.printing-rollcall .rollcall-ledger-head h2 { font-size: 22px; }
  body.printing-rollcall .rollcall-stamp-grid div { grid-template-rows: 22px 48px; }
  body.printing-rollcall .rollcall-stamp-grid b { min-height: 48px; }
  body.printing-rollcall .rollcall-ledger-table { min-width: 0; font-size: 8.5px; }
  body.printing-rollcall .rollcall-ledger-table th,
  body.printing-rollcall .rollcall-ledger-table td { padding: 4px 3px; }
  body.printing-daily-report { background: #fff; }
  body.printing-daily-report .topbar,
  body.printing-daily-report .floating-actions,
  body.printing-daily-report .subpage-tabs,
  body.printing-daily-report #employeeView,
  body.printing-daily-report #operationView,
  body.printing-daily-report #dailyReportRecordsView,
  body.printing-daily-report #dailyReportOutputDialog,
  body.printing-daily-report #dailyReportDetailDialog,
  body.printing-daily-report .toast { display: none !important; }
  body.printing-daily-report .app-shell { display: block; }
  body.printing-daily-report main { padding: 0; }
  body.printing-daily-report #dailyReportView,
  body.printing-daily-report #dailyReportPrintView { display: block !important; }
  body.printing-daily-report .panel { border: 0; box-shadow: none; }
  body.printing-daily-report .daily-report-print-pages { display: block; }
  body.printing-daily-report .daily-report-print-page { min-height: 180mm; padding: 0; break-after: page; }
  body.printing-daily-report .daily-report-print-page header h2 { font-size: 24px; }
  body.printing-daily-report .daily-report-print-grid table { font-size: 8px; }
  body.printing-daily-report .daily-report-print-grid th,
  body.printing-daily-report .daily-report-print-grid td { padding: 3px; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
  main { grid-column: 1; grid-row: 2; padding: 22px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .topbar-left { min-width: 0; }
  .top-module-nav { max-width: max(240px, calc(100vw - 390px)); }
  .top-actions { justify-content: flex-end; }
  .status-grid { grid-template-columns: 1fr; }
  .finance-settings-layout,
  .finance-master-grid,
  .finance-summary-overview { grid-template-columns: 1fr; }
  .finance-summary-total { border-right: 0; border-bottom: 1px solid var(--line); }
  .finance-summary-total:last-child { border-bottom: 0; }
  .finance-summary-period-controls { flex-wrap: wrap; justify-content: flex-start; width: 100%; margin-left: 0; }
  .finance-settings-unified .finance-settings-grid,
  .finance-rules-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .operation-section-tabs { width: 100%; }
  .vehicle-section-tabs, .employee-section-tabs, .finance-section-tabs { width: 100%; }
  .operation-section-tabs .subpage-tab { flex: 1; }
  .vehicle-section-tabs .subpage-tab, .employee-section-tabs .subpage-tab, .finance-section-tabs .subpage-tab { flex: 1; }
  .floating-actions { right: 18px; bottom: 24px; }
  .operation-tab-toolbar, .module-tab-toolbar { align-items: stretch; flex-direction: column; }
  .operation-toolbar-controls { width: 100%; margin-left: 0; }
  .operation-toolbar-controls .vehicle-search { flex: 1; min-width: min(420px, 100%); }
  #vehicleView {
    --module-list-toolbar-height: 170px;
    --module-list-sticky-offset: -22px;
  }
  #vehicleView .vehicle-unified-toolbar .vehicle-toolbar-controls {
    align-items: stretch;
    flex-direction: column-reverse;
    width: 100%;
    min-width: 0;
  }
  #vehicleView .vehicle-unified-toolbar .vehicle-search {
    flex: 1;
    min-width: 0;
    width: 100%;
  }
  #vehicleView .vehicle-unified-toolbar .vehicle-section-tabs {
    width: 100%;
  }
  #employeeView {
    --module-list-toolbar-height: 170px;
    --module-list-sticky-offset: -22px;
  }
  #employeeView .employee-list-toolbar .vehicle-toolbar-controls {
    align-items: stretch;
    flex-direction: column-reverse;
    width: 100%;
    min-width: 0;
  }
  #employeeView .employee-list-toolbar .vehicle-search {
    flex: 1;
    min-width: 0;
    width: 100%;
  }
  #employeeView .employee-list-toolbar .employee-section-tabs {
    width: 100%;
  }
  .date-tabs { max-width: 100%; }
  #assignmentDialog .assignment-time-grid { grid-template-columns: 1fr; }
  #maintenanceRecordEditDialog .maintenance-record-edit-item-grid { grid-template-columns: minmax(0, 1fr); }
  #maintenanceRecordEditDialog :is(.maintenance-record-item-category, .maintenance-record-item-name, .maintenance-record-item-quantity, .maintenance-record-item-unit-price, .maintenance-record-item-amount, .maintenance-record-item-vendor, .maintenance-record-item-notes) { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .app-shell {
    --topbar-height: 58px;
    width: 100%;
    max-width: 100vw;
  }
  .topbar {
    gap: 8px;
    min-width: 0;
    min-height: var(--topbar-height);
    padding: 8px 10px;
  }
  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .top-module-nav {
    width: 100%;
    max-width: 100%;
    height: 36px;
    min-height: 36px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .top-module-tab {
    min-width: 72px;
    padding-inline: 11px;
  }
  .top-actions {
    flex: 0 0 auto;
    gap: 6px;
    min-width: 0;
  }
  .office-scope {
    --office-scope-width: clamp(104px, 30vw, 128px);
  }
  .office-scope-button {
    gap: 6px;
    padding-inline: 8px;
  }
  .office-scope-label {
    max-width: 72px;
  }
  .user-menu-button {
    padding: 0;
    border: 0;
    background: transparent;
  }
  .current-user,
  #profilePhotoButton {
    display: none !important;
  }
  main {
    width: 100%;
    max-width: 100vw;
    min-height: calc(100vh - var(--topbar-height));
    padding: 16px 10px 92px;
    overflow-x: hidden;
  }
  main > section,
  .panel {
    min-width: 0;
    max-width: 100%;
  }
  .toolbar, .schedule-heading { align-items: flex-start; flex-direction: column; }
  .toolbar-help, .legend { display: none; }
  .operation-tab-toolbar, .module-tab-toolbar { padding: 12px 14px 14px; }
  .floating-actions { right: 16px; bottom: 18px; gap: 10px; }
  .floating-action-add { width: 52px; height: 52px; }
  .floating-action-export { width: 46px; height: 46px; }
  .operation-toolbar-controls { align-items: stretch; flex-direction: column; }
  .operation-toolbar-controls .button { width: 100%; }
  .operation-section-tabs .subpage-tab,
  .vehicle-section-tabs .subpage-tab,
  .employee-section-tabs .subpage-tab,
  .finance-section-tabs .subpage-tab { min-width: 0; padding-inline: 12px; }
  .vehicle-toolbar { align-items: stretch; flex-direction: column; }
  .vehicle-toolbar-controls { align-items: stretch; flex-direction: column; }
  .vehicle-toolbar-controls,
  .vehicle-search,
  .vehicle-search input {
    width: 100%;
    min-width: 0;
  }
  .accident-summary-pills {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .accident-summary-pills span {
    flex: 0 0 auto;
  }
  .app-shell.is-safety-page #safetyView .safety-unified-toolbar,
  .app-shell.is-finance-page #financeView .finance-unified-toolbar {
    height: auto !important;
    max-height: none !important;
    padding: 10px !important;
  }
  .app-shell.is-safety-page #safetyView .safety-unified-toolbar::after,
  .app-shell.is-finance-page #financeView .finance-unified-toolbar::after {
    border-radius: 14px 14px 0 0;
  }
  .app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel),
  .app-shell.is-finance-page #financeView #financeLedgerPanel {
    overflow: hidden !important;
    border-radius: 0 0 14px 14px !important;
  }
  .app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table-wrap,
  .app-shell.is-finance-page #financeView #financeLedgerPanel .vehicle-table-wrap,
  .app-shell.is-operation-page :is(#operationView .operation-list-panel .table-wrap, #rollCallRecordsView .vehicle-table-wrap, #dailyReportRecordsView .vehicle-table-wrap) {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }
  .app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table thead th,
  .app-shell.is-finance-page #financeView #financeLedgerPanel .vehicle-table thead th,
  .app-shell.is-operation-page :is(#rollCallRecordsView .vehicle-table thead th, #dailyReportRecordsView .vehicle-table thead th) {
    top: calc(var(--topbar-height) + 112px) !important;
  }
  .accident-table {
    min-width: 820px;
  }
  .finance-settings-page-head { align-items: flex-start; flex-direction: column; }
  .finance-settings-page-head .button { width: 100%; }
  .finance-settings-summary { grid-template-columns: 1fr; }
  .finance-summary-period-controls { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
  .finance-summary-mode-tabs { grid-column: 1 / -1; width: fit-content; }
  .finance-period-label { min-width: 0; padding-inline: 12px; }
  .finance-summary-filter-button { justify-self: end; }
  .finance-chart-mode-tabs { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-chart-bars { gap: 5px; }
  .finance-summary-filter-grid { grid-template-columns: 1fr; }
  .finance-summary-filter-grid .field:nth-child(5) { grid-column: auto; }
  .finance-summary-filter-footer { align-items: stretch; flex-direction: column; }
  .finance-settings-unified .finance-settings-grid,
  .finance-rules-strip { grid-template-columns: 1fr; }
  .finance-master-row { grid-template-columns: 64px minmax(0, 1fr); }
  .finance-master-row small { justify-self: start; grid-column: 2; }
  .finance-record-grid { grid-template-columns: 1fr; }
  .finance-record-date-field,
  .finance-record-direction-field,
  .finance-record-account-field,
  .finance-record-tax-field,
  .finance-record-amount-field,
  .finance-record-tax-preview-field,
  .finance-record-counterparty-field,
  .finance-record-payment-field,
  .finance-record-document-field {
    grid-column: auto;
  }
  .finance-record-description-field,
  .finance-record-notes-field { grid-column: auto; }
  .finance-detail-grid { grid-template-columns: 1fr; }
  .daily-report-form-grid { grid-template-columns: 1fr; }
  .daily-report-field-short,
  .daily-report-field-medium,
  .daily-report-field-third,
  .daily-report-field-half,
  .daily-report-field-full { grid-column: auto; }
  .finance-detail-grid > div,
  .finance-detail-grid > div:nth-child(3n),
  .finance-detail-grid > div:nth-last-child(-n+3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .finance-detail-grid > div:last-child { border-bottom: 0; }
  .finance-toolbar-controls { width: 100%; margin-left: 0; }
  .finance-record-toolbar .filter-select { width: 100%; }
  .permission-row { grid-template-columns: 1fr; }
  .vehicle-search { min-width: 0; }
  .settings-card-grid { grid-template-columns: 1fr; }
  .maintenance-form-grid { grid-template-columns: 1fr; }
  .office-dialog .maintenance-form-grid { grid-template-columns: 1fr; }
  .office-dialog .maintenance-notes { grid-column: auto; }
  .maintenance-record-edit-grid, .maintenance-record-edit-item-grid { grid-template-columns: 1fr; }
  .maintenance-record-edit-item-wide { grid-column: auto; }
  .maintenance-description { grid-column: auto; }
  .employee-wide-field { grid-column: auto; }
  .vehicle-detail-grid { grid-template-columns: 1fr; }
  .vehicle-detail-grid > div { border-right: 0; }
  .vehicle-plate-edit-row { grid-template-columns: 1fr; }
  .driver-profile-layout { grid-template-columns: 1fr; }
  .driver-photo-frame { min-height: 220px; }
  .driver-detail-grid { grid-template-columns: 1fr; }
  .driver-detail-grid > div { border-right: 0; }
  .rollcall-form-grid { grid-template-columns: 1fr; }
  .daily-report-checks,
  .daily-report-stamps,
  .daily-report-print-summary,
  .daily-report-print-grid,
  .daily-report-print-notes { grid-template-columns: 1fr; }
}

#financeView {
  --finance-control-height: 40px;
}

#financeView .finance-summary-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-width: 0;
}

#financeView .finance-summary-toolbar .module-toolbar-metric {
  flex: 0 0 auto;
  min-width: 82px;
}

#financeView .finance-summary-period-controls {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  width: 100%;
  min-width: 0;
}

#financeView :is(
  .finance-summary-mode-tabs,
  .finance-period-step,
  .finance-period-label,
  .finance-summary-filter-button,
  .finance-section-tabs
) {
  height: var(--finance-control-height);
  min-height: var(--finance-control-height);
}

#financeView :is(.finance-summary-mode-tabs, .finance-section-tabs) {
  padding: 2px;
}

#financeView .finance-summary-mode-tabs {
  grid-column: auto;
  width: auto;
}

#financeView :is(.finance-summary-mode-tabs, .finance-section-tabs)::before {
  top: 2px;
  bottom: 2px;
}

#financeView :is(.finance-summary-mode-tabs button, .finance-section-tabs .subpage-tab) {
  height: calc(var(--finance-control-height) - 6px);
  min-height: calc(var(--finance-control-height) - 6px);
}

#financeView .finance-period-step,
#financeView .finance-summary-filter-button {
  width: var(--finance-control-height);
  padding: 0;
}

#financeView .finance-period-label {
  min-width: 210px;
  padding: 0 18px;
}

#financeView .finance-summary-filter-button {
  margin-left: auto;
}

#financeView .finance-summary-list {
  position: relative;
  z-index: 0;
  margin-top: 0;
  overflow: hidden;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

#financeView .finance-summary-shell {
  gap: 0;
  overflow: hidden;
}

#financeView .finance-summary-chart-card {
  overflow: hidden;
  border-top: 0;
  border-radius: 0;
}

#financeView .finance-summary-overview {
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

#financeView .finance-summary-total {
  min-height: 96px;
  padding: 18px 28px;
}

#financeView .finance-summary-total span {
  font-size: 13px;
  line-height: 1.15;
}

#financeView .finance-summary-total strong {
  margin-top: 4px;
  font-size: 27px;
  line-height: 1.12;
}

#financeView.is-summary-tab .finance-summary-chart-card:first-child {
  border-radius: 0;
}

/* Employee module option B: sticky toolbar plus square table header. */
#employeeView {
  --employee-sticky-head-offset: -28px;
}

.app-shell.is-employee-page #employeeView {
  --employee-sticky-head-offset: 64px;
}

main #employeeView .employee-sticky-head {
  position: sticky !important;
  top: var(--employee-sticky-head-offset) !important;
  z-index: 70 !important;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

main #employeeView .employee-sticky-head::before,
main #employeeView .employee-sticky-head::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

main #employeeView .employee-sticky-head::before {
  z-index: 0;
  background: var(--page-bg);
}

main #employeeView .employee-sticky-head::after {
  z-index: 1;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: none;
}

main #employeeView .employee-sticky-head .employee-list-toolbar {
  position: relative !important;
  top: auto !important;
  z-index: 2 !important;
  height: 66px !important;
  max-height: 66px !important;
  min-height: 0 !important;
  padding: 10px 20px !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  opacity: 1 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  transform: none !important;
}

main #employeeView .employee-head-table-wrap {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

main #employeeView .employee-head-table {
  table-layout: fixed;
  margin: 0;
}

main #employeeView .employee-head-table thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  height: 52px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom: 1px solid var(--line);
  background: #fff !important;
  transition: none !important;
}

main #employeeView .employee-list-panel .vehicle-table:not(.employee-head-table) > thead {
  display: none;
}

/* Vehicle module: page scrollbar plus sticky toolbar/header, matching employee module behavior. */
.app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar {
  position: sticky !important;
  top: 64px !important;
  z-index: 70 !important;
  height: 66px !important;
  max-height: 66px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar::before,
.app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar::before {
  z-index: 0;
  background: var(--page-bg);
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar::after {
  z-index: 1;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #fff;
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar > * {
  position: relative;
  z-index: 2;
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel {
  margin-top: 0 !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
  overflow: visible !important;
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel .vehicle-table-wrap {
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
  border-radius: 0 0 18px 18px !important;
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel .vehicle-table thead th {
  position: sticky !important;
  top: 130px !important;
  z-index: 60 !important;
  height: 52px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom: 1px solid var(--line);
  background: #fff !important;
  transition: none !important;
}

.app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel .vehicle-table thead th:first-child,
.app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel .vehicle-table thead th:last-child {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.app-shell.is-safety-page #safetyView .safety-unified-toolbar,
.app-shell.is-finance-page #financeView .finance-unified-toolbar {
  position: sticky !important;
  top: 64px !important;
  z-index: 70 !important;
  height: 66px !important;
  max-height: 66px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

.app-shell.is-safety-page #safetyView .safety-unified-toolbar::before,
.app-shell.is-finance-page #financeView .finance-unified-toolbar::before,
.app-shell.is-safety-page #safetyView .safety-unified-toolbar::after,
.app-shell.is-finance-page #financeView .finance-unified-toolbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.app-shell.is-safety-page #safetyView .safety-unified-toolbar::before,
.app-shell.is-finance-page #financeView .finance-unified-toolbar::before {
  z-index: 0;
  background: var(--page-bg);
}

.app-shell.is-safety-page #safetyView .safety-unified-toolbar::after,
.app-shell.is-finance-page #financeView .finance-unified-toolbar::after {
  z-index: 1;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #fff;
}

.app-shell.is-safety-page #safetyView .safety-unified-toolbar > *,
.app-shell.is-finance-page #financeView .finance-unified-toolbar > * {
  position: relative;
  z-index: 2;
}

.app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel),
.app-shell.is-finance-page #financeView #financeLedgerPanel {
  margin-top: 0 !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
  overflow: visible !important;
}

.app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table-wrap,
.app-shell.is-finance-page #financeView #financeLedgerPanel .vehicle-table-wrap {
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
  border-radius: 0 0 18px 18px !important;
}

.app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table thead th,
.app-shell.is-finance-page #financeView #financeLedgerPanel .vehicle-table thead th {
  position: sticky !important;
  top: 130px !important;
  z-index: 60 !important;
  height: 52px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom: 1px solid var(--line);
  background: #fff !important;
  transition: none !important;
}

/* Operation module: fixed global nav, toolbar, and table headers. */
.app-shell.is-operation-page #operationView .operation-unified-toolbar {
  position: sticky !important;
  top: 64px !important;
  z-index: 70 !important;
  height: 66px !important;
  max-height: 66px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

.app-shell.is-operation-page #operationView .operation-unified-toolbar::before,
.app-shell.is-operation-page #operationView .operation-unified-toolbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.app-shell.is-operation-page #operationView .operation-unified-toolbar::before {
  z-index: 0;
  background: var(--page-bg);
}

.app-shell.is-operation-page #operationView .operation-unified-toolbar::after {
  z-index: 1;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #fff;
}

.app-shell.is-operation-page #operationView .operation-unified-toolbar > * {
  position: relative;
  z-index: 2;
}

.app-shell.is-operation-page :is(#operationView .operation-list-panel, #rollCallRecordsView > .vehicle-list-panel, #dailyReportRecordsView > .vehicle-list-panel) {
  margin-top: 0 !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
  overflow: visible !important;
}

.app-shell.is-operation-page :is(#operationView .operation-list-panel .table-wrap, #rollCallRecordsView .vehicle-table-wrap, #dailyReportRecordsView .vehicle-table-wrap) {
  max-height: none !important;
  overflow-y: visible !important;
  overscroll-behavior: auto !important;
  border-radius: 0 0 18px 18px !important;
}

.app-shell.is-operation-page #operationView #dispatchView > .operation-list-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto !important;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-sticky-head {
  position: sticky;
  top: 130px;
  z-index: 60;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table-wrap {
  overflow: hidden;
  scrollbar-width: none;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table-wrap::-webkit-scrollbar {
  display: none;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table {
  table-layout: auto;
  margin: 0;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  height: 49px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  background: #fff !important;
  transition: none !important;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table thead th.staff,
.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table thead th.summary {
  position: sticky !important;
  z-index: 2 !important;
  box-shadow: none;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table thead th.staff {
  left: 0;
}

.app-shell.is-operation-page #operationView #dispatchView .dispatch-head-table thead th.summary {
  right: 0;
}

.app-shell.is-operation-page #operationView #dispatchView #scheduleTable > thead {
  display: none;
}

.app-shell.is-operation-page :is(#rollCallRecordsView .vehicle-table thead th, #dailyReportRecordsView .vehicle-table thead th) {
  position: sticky !important;
  top: 130px !important;
  z-index: 60 !important;
  background: #fff !important;
  transition: none !important;
}

.app-shell.is-operation-page #operationView #dispatchView > .operation-list-panel #scheduleTable > thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: #fff !important;
}

.app-shell.is-operation-page #operationView #dispatchView > .operation-list-panel #scheduleTable > thead th.staff {
  position: sticky !important;
  top: auto !important;
  left: 0;
  z-index: 5 !important;
}

.app-shell.is-operation-page #operationView #dispatchView > .operation-list-panel #scheduleTable > thead th.summary {
  position: sticky !important;
  top: auto !important;
  right: 0;
  z-index: 5 !important;
}

.app-shell.is-operation-page :is(#operationView .operation-list-panel thead th:first-child, #operationView .operation-list-panel thead th:last-child, #rollCallRecordsView .vehicle-table thead th:first-child, #rollCallRecordsView .vehicle-table thead th:last-child, #dailyReportRecordsView .vehicle-table thead th:first-child, #dailyReportRecordsView .vehicle-table thead th:last-child) {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

@media (max-width: 620px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page) {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
  }

  .app-shell.is-safety-page #safetyView .safety-unified-toolbar,
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar,
  .app-shell.is-finance-page #financeView .finance-unified-toolbar {
    height: auto !important;
    max-height: none !important;
    padding: 10px !important;
    overflow: hidden !important;
  }

  main #employeeView .employee-sticky-head {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  main #employeeView .employee-sticky-head .employee-list-toolbar {
    height: auto !important;
    max-height: none !important;
    padding: 10px !important;
    overflow: hidden !important;
  }

  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar .vehicle-toolbar-controls,
  main #employeeView .employee-list-toolbar .vehicle-toolbar-controls {
    align-items: stretch !important;
    flex-direction: column-reverse !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar .vehicle-search,
  main #employeeView .employee-list-toolbar .vehicle-search,
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar .vehicle-section-tabs,
  main #employeeView .employee-list-toolbar .employee-section-tabs {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar .module-toolbar-metric,
  main #employeeView .employee-list-toolbar .module-toolbar-metric {
    min-width: 0 !important;
  }

  .app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel),
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel,
  main #employeeView .employee-list-panel,
  .app-shell.is-finance-page #financeView #financeLedgerPanel,
  .app-shell.is-operation-page :is(#operationView .operation-list-panel, #rollCallRecordsView > .vehicle-list-panel, #dailyReportRecordsView > .vehicle-list-panel) {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table-wrap,
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel .vehicle-table-wrap,
  main #employeeView .employee-list-panel .vehicle-table-wrap,
  .app-shell.is-finance-page #financeView #financeLedgerPanel .vehicle-table-wrap,
  .app-shell.is-operation-page :is(#operationView .operation-list-panel .table-wrap, #rollCallRecordsView .vehicle-table-wrap, #dailyReportRecordsView .vehicle-table-wrap) {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell.is-safety-page #safetyView :is(.accident-list-panel, .education-list-panel) .vehicle-table thead th,
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-panel .vehicle-table thead th,
  main #employeeView .employee-list-panel .vehicle-table thead th,
  .app-shell.is-finance-page #financeView #financeLedgerPanel .vehicle-table thead th,
  .app-shell.is-operation-page :is(#rollCallRecordsView .vehicle-table thead th, #dailyReportRecordsView .vehicle-table thead th) {
    top: calc(var(--topbar-height) + 112px) !important;
  }

  .vehicle-table {
    min-width: 760px;
  }

  #vehicleView #vehicleLedgerView .vehicle-table,
  #employeeView .employee-list-panel .vehicle-table {
    min-width: 720px !important;
  }

  .vehicle-empty {
    width: 100%;
    max-width: 100%;
    padding-inline: 14px;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

/* Mobile admin layout: narrow screens use normal document flow, while wide
   operational tables scroll inside their own panels. Desktop sticky behavior is
   intentionally left untouched above this breakpoint. */
@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page) {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    overflow: hidden !important;
  }

  .app-shell:is(.is-employee-page, .is-vehicle-page, .is-operation-page, .is-safety-page, .is-finance-page) main {
    width: 100%;
    max-width: 100vw;
    height: calc(100dvh - var(--topbar-height));
    padding: 18px 10px 92px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto;
  }

  .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px !important;
    min-height: 64px;
    padding: 8px 10px !important;
  }

  .topbar-left,
  .top-actions {
    min-width: 0;
  }

  .topbar-left {
    overflow: hidden;
  }

  .top-module-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .top-module-tab {
    min-width: 82px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .top-actions {
    gap: 8px !important;
    margin-left: 0 !important;
  }

  .office-scope {
    width: clamp(128px, 34vw, 160px) !important;
    min-width: 0 !important;
  }

  .office-scope-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #currentUser {
    display: none !important;
  }

  .user-menu-button {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  #profilePhotoButton {
    display: none !important;
  }

  main > section:not([hidden]) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #employeeView,
  #vehicleView,
  #operationView,
  #safetyView,
  #financeView {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible !important;
  }

  main #employeeView .employee-sticky-head,
  main #employeeView .employee-sticky-head .employee-list-toolbar,
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar,
  .app-shell.is-operation-page #operationView .operation-unified-toolbar,
  .app-shell.is-safety-page #safetyView .safety-unified-toolbar,
  .app-shell.is-finance-page #financeView .finance-unified-toolbar {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px 16px 0 0 !important;
    background: #fff !important;
    overflow: hidden !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  main #employeeView .employee-sticky-head::before,
  main #employeeView .employee-sticky-head::after,
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar::before,
  .app-shell.is-vehicle-page #vehicleView .vehicle-unified-toolbar::after,
  .app-shell.is-operation-page #operationView .operation-unified-toolbar::before,
  .app-shell.is-operation-page #operationView .operation-unified-toolbar::after,
  .app-shell.is-safety-page #safetyView .safety-unified-toolbar::before,
  .app-shell.is-safety-page #safetyView .safety-unified-toolbar::after,
  .app-shell.is-finance-page #financeView .finance-unified-toolbar::before,
  .app-shell.is-finance-page #financeView .finance-unified-toolbar::after {
    display: none !important;
    content: none !important;
  }

  main #employeeView .employee-head-table-wrap,
  .app-shell.is-operation-page #operationView #dispatchView .dispatch-sticky-head {
    display: none !important;
  }

  main #employeeView .employee-list-panel .vehicle-table:not(.employee-head-table) > thead,
  .app-shell.is-operation-page #operationView #dispatchView #scheduleTable > thead {
    display: table-header-group !important;
  }

  .module-tab-toolbar:not([hidden]),
  .operation-tab-toolbar:not([hidden]),
  .vehicle-toolbar:not([hidden]),
  .vehicle-toolbar-controls,
  .finance-summary-period-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .module-toolbar-metric,
  .operation-count {
    width: 100%;
    min-width: 0 !important;
  }

  .module-toolbar-metric h2,
  .operation-count h2 {
    line-height: 1.15;
  }

  .accident-summary-pills,
  .finance-status-pills,
  .legend {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .subpage-tabs,
  .vehicle-section-tabs,
  .employee-section-tabs,
  .operation-section-tabs,
  .safety-section-tabs,
  .finance-section-tabs,
  .education-type-tabs,
  .finance-summary-mode-tabs {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 44px !important;
    max-height: none !important;
    margin: 0 !important;
  }

  .subpage-tab,
  .vehicle-section-tabs button,
  .employee-section-tabs button,
  .education-type-tabs button,
  .finance-summary-mode-tabs button {
    min-width: 0 !important;
    height: 40px !important;
    padding-inline: 10px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vehicle-search,
  .vehicle-search input,
  .dispatch-month-control,
  .dispatch-month-button,
  .finance-period-label {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .month-switcher,
  .finance-summary-period-controls {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center !important;
  }

  .finance-summary-period-controls .finance-summary-mode-tabs,
  .finance-summary-period-controls .finance-summary-filter-button {
    grid-column: 1 / -1;
    width: 100% !important;
  }

  .finance-summary-period-controls .finance-period-step,
  .finance-summary-period-controls .finance-summary-filter-button {
    min-width: 44px !important;
    height: 44px !important;
  }

  #employeeView .employee-list-panel,
  #vehicleView .vehicle-unified-panel,
  #operationView .operation-list-panel,
  #rollCallRecordsView > .vehicle-list-panel,
  #dailyReportRecordsView > .vehicle-list-panel,
  #safetyView :is(.accident-list-panel, .education-list-panel),
  #financeView :is(#financeLedgerPanel, .finance-summary-list) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-top: 0 !important;
    border-radius: 0 0 16px 16px !important;
    overflow: hidden !important;
  }

  #financeView #financeSummaryPanel,
  #financeView .finance-summary-shell,
  #financeView .finance-summary-chart-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden !important;
  }

  .vehicle-table-wrap,
  .table-wrap,
  .accident-table-wrap,
  .education-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch;
  }

  .vehicle-table,
  #scheduleTable {
    width: max-content !important;
    max-width: none !important;
    table-layout: fixed;
  }

  .vehicle-table {
    min-width: 720px !important;
  }

  #employeeView .vehicle-table,
  #vehicleView .vehicle-table {
    min-width: 700px !important;
  }

  #safetyView .vehicle-table,
  #financeView .vehicle-table {
    min-width: 760px !important;
  }

  #scheduleTable {
    min-width: 920px !important;
  }

  #operationView :is(th, td),
  #vehicleView :is(th, td),
  #employeeView :is(th, td),
  #safetyView :is(th, td),
  #financeView :is(th, td) {
    height: auto;
    min-height: 50px;
  }

  #operationView :is(thead th, tfoot th, tfoot td, th.staff, td.staff, th.summary, td.summary),
  #vehicleView .vehicle-table thead th,
  #employeeView .vehicle-table thead th,
  #safetyView .vehicle-table thead th,
  #financeView .vehicle-table thead th {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }

  #operationView #dispatchView > .operation-list-panel tfoot th,
  #operationView #dispatchView > .operation-list-panel tfoot td {
    position: static !important;
    inset: auto !important;
  }

  .vehicle-empty {
    width: 100% !important;
    max-width: 100% !important;
    padding: 28px 14px 34px !important;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .floating-add-button,
  .fab,
  #mobileAddButton {
    right: calc(16px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
