:root {
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-synthesis: none;
  color: #25313b;
  background: #f6f7f6;
  --page: #f6f7f6;
  --surface: #ffffff;
  --ink: #25313b;
  --muted: #505d68;
  --line: #dfe4e6;
  --subtle: #f6f8f8;
  --nav: #fbfcfb;
  --nav-active: #e9eef2;
  --primary: #203d60;
  --primary-hover: #162e4c;
  --focus: #316aba;
  --available-ink: #196143;
  --available-fill: #e9f5ed;
  --driving-ink: #865014;
  --driving-fill: #fff3df;
  --danger-ink: #a1262a;
  --danger-fill: #fff1ef;
  --radius: 11px;
  --sidebar: 208px;
  font-size: 14px;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, dl { margin: 0; }
dt, dd { margin: 0; }
svg { display: block; flex: 0 0 auto; }
.icon { width: 18px; height: 18px; }
.number { font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; top: 10px; left: 10px; transform: translateY(-200%); z-index: 10; padding: 9px 13px; border-radius: 5px; color: white; background: var(--primary); }
.skip-link:focus { transform: none; }
.startup { min-height: 100svh; padding: 32px; display: grid; align-content: center; justify-items: center; gap: 14px; color: var(--muted); text-align: center; }
.spinner { width: 25px; height: 25px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: rotate .8s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; min-height: 0; display: flex; flex-direction: column; background: var(--nav); color: var(--ink); border-right: 1px solid var(--line); padding: 22px 14px 19px; z-index: 2; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: inherit; font-size: 19px; font-weight: 750; letter-spacing: -.06em; text-decoration: none; }
.sidebar .brand { min-height: 64px; align-items: flex-start; padding: 0 9px; line-height: 34px; border-bottom: 1px solid var(--line); }
.brand-name, .account-name, .company-name { overflow-wrap: anywhere; }
.brand-mark { width: 35px; height: 35px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-mark img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: inherit; }
.nav-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 8px 11px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 650; white-space: nowrap; }
.nav-link .icon { color: inherit; }
.nav-link:hover { background: #edf0f1; color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--nav-active); color: var(--primary); font-weight: 800; }
.nav-divider { margin: 10px 9px 6px; border-top: 1px solid var(--line); }
.sidebar-end { margin-top: auto; }
.sidebar-foot { padding: 13px 11px 1px; border-top: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; text-decoration: none; }
.sidebar-foot .icon { width: 16px; height: 16px; }
.sidebar-foot:hover, .sidebar-foot[aria-current="page"] { color: var(--primary); }
.sidebar-version { display: block; margin: 8px 11px 0; color: var(--muted); font-size: 12px; }
.mobile-nav, .mobile-brand { display: none; }
.account .install-shortcut { display: none; }
.workspace { min-width: 0; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 10px 28px; gap: 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-company { display: flex; align-items: center; gap: 10px; min-width: 0; color: #344359; font-weight: 700; }
.topbar-company .icon { color: #66788f; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; color: #203d60; background: #eaf0f7; border: 1px solid #dce6f2; border-radius: 50%; font-size: 13px; font-weight: 750; flex: 0 0 auto; }
.account-name { line-height: 1.38; font-weight: 700; }
.account-role { color: var(--muted); font-size: 11px; }
.account-exit { display: grid; place-items: center; width: 39px; min-height: 39px; margin-left: 5px; }
.account-password { display: inline-flex; align-items: center; gap: 5px; padding-inline: 7px; white-space: nowrap; font-size: 12px; font-weight: 700; }
.account-password .icon { width: 16px; height: 16px; }
.pilot-notice { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 12px; padding: 8px 16px; border-bottom: 1px solid #ebd3a7; background: #fff3df; color: #623c10; font-size: 13px; text-align: center; }
.pilot-notice strong { font-size: 14px; }
.content { width: 100%; max-width: 1760px; margin: 0 auto; padding: 28px 28px 45px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(27px, 3vw, 32px); font-weight: 800; line-height: 1.25; letter-spacing: -.07em; }
.page-description { margin-top: 6px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.today { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.today .icon { width: 16px; height: 16px; }
.surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.surface-head { min-height: 65px; padding: 14px 17px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.surface-head h2, .surface-title { font-size: 16px; font-weight: 800; letter-spacing: -.04em; }
.surface-caption { color: var(--muted); font-size: 12px; margin-top: 1px; }
.surface-body { padding: 18px; }
.surface + .surface, .section-space { margin-top: 16px; }
.vehicle-settings-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.settings-version { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }

.summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.summary-item { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.summary-item + .summary-item { border-left: 1px solid var(--line); padding-left: 16px; }
.summary-label { display: flex; align-items: center; gap: 7px; color: #415169; white-space: nowrap; font-weight: 700; font-size: 13px; }
.summary-marker { display: inline-block; width: 7px; height: 7px; background: #59738f; border-radius: 2px; }
.summary-marker.available { background: #32815b; }
.summary-marker.driving { background: #b77822; }
.summary-value { display: flex; align-items: baseline; gap: 2px; line-height: 1.3; }
.summary-value strong { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.summary-value span { font-size: 12px; color: var(--muted); }
.mine { padding: 15px 17px; display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 16px; border-left: 3px solid #a97430; }
.mine h2 { font-size: 14px; font-weight: 800; color: var(--driving-ink); }
.mine-list { width: 100%; }
.mine-trip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; width: 100%; }
.mine-trip + .mine-trip { border-top: 1px solid var(--line); }
.mine-details { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.mine-details strong { font-size: 16px; font-weight: 800; }
.mine-details span { color: var(--muted); overflow-wrap: anywhere; }
.mine .button { flex-shrink: 0; }

.fleet-connection { min-height: 36px; display: flex; gap: 8px 12px; align-items: center; justify-content: space-between; }
.fleet-connection-stale { padding: 7px 9px; background: #fff5e6; border: 1px solid #ecd7b8; border-radius: 6px; }
.fleet-connection-message { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 9px; min-width: 0; }
.fleet-time, .fleet-stale-text { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.fleet-time time { font-variant-numeric: tabular-nums; }
.fleet-stale-text { color: #6e471e; }
.fleet-toolbar, .fleet-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px 16px; }
.fleet-toolbar { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fleet-meta { min-height: 52px; padding-block: 8px; margin-bottom: 5px; }
#fleet-connection-panel { min-width: 0; margin-inline-start: auto; }
.company-tabs { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.company-tab { min-height: 40px; padding: 6px 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.company-tab:hover { background: #edf1f3; color: var(--primary); }
.company-tab[aria-pressed="true"] { border-color: #d8e2e9; background: #e8eef3; color: var(--primary); font-weight: 800; }
.vehicle-settings-scope { padding: 0 16px 12px; }
.vehicle-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.vehicle-card { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.vehicle-card-context { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.vehicle-card-company { color: var(--primary); font-size: 14px; font-weight: 750; line-height: 1.42; min-width: 0; padding-block: 4px; overflow-wrap: anywhere; }
.vehicle-card-company.unassigned { color: var(--muted); font-weight: 650; }
.vehicle-card-context .status { min-height: 28px; padding-inline: 8px; flex-shrink: 0; font-size: 14px; }
.vehicle-card-plate { color: var(--ink); font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.vehicle-card-name { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.vehicle-card-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.vehicle-card-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 9px 13px; padding-block: 14px 15px; }
.vehicle-card-metadata dt { margin-bottom: 2px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.vehicle-card-metadata dd { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.vehicle-card-odometer, .vehicle-card-destination { grid-column: 1 / -1; }
.vehicle-card-odometer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 9px; }
.vehicle-card-odometer dd { font-size: 21px; letter-spacing: -.02em; }
.vehicle-card-more { min-width: 0; font-size: 13px; }
.vehicle-card-more summary { width: fit-content; padding: 2px 0; color: var(--primary); font-weight: 700; cursor: pointer; }
.vehicle-card-more dl { margin-top: 5px; padding: 8px 10px; border-radius: 7px; background: var(--subtle); }
.vehicle-card-more dt { margin: 2px 0; color: var(--muted); }
.vehicle-card-more dd { color: var(--ink); font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.vehicle-card-actions { margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.vehicle-card-actions .button { width: 100%; min-height: 46px; font-size: 15px; }
.fleet-empty .empty { border-top: 0; }

@media (min-width: 620px) {
  .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .vehicle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vehicle-card { min-height: 280px; padding: 22px; }
  .vehicle-card-plate { font-size: clamp(28px, 2.35vw, 32px); }
  .vehicle-card-name, .vehicle-card-metadata dd { font-size: 16px; }
  .vehicle-card-odometer dd { font-size: 22px; }
  .vehicle-card-actions .button { min-height: 48px; }
}

.button { min-height: 40px; padding: 7px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #33455d; cursor: pointer; text-decoration: none; font-size: 13px; line-height: 1.4; font-weight: 750; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.button:hover { background: #eef2f6; }
.button:active { opacity: .84; }
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { background: #fff; border-color: #cdd8e4; }
.button.secondary:hover { background: #f1f5fa; border-color: #acbfd3; }
.button.danger { color: var(--danger-ink); border-color: #e6b9ba; background: #fff; }
.button.danger:hover { background: var(--danger-fill); }
.button.small { min-height: 36px; padding: 5px 9px; font-size: 12px; }
.button:disabled { background: #f0f2f5; color: #566479; border-color: #e2e7ed; cursor: not-allowed; opacity: 1; }
.button.full { width: 100%; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; min-width: 39px; min-height: 39px; background: none; border: 1px solid transparent; border-radius: 6px; color: #485b73; cursor: pointer; }
.icon-button:hover { background: #edf2f7; }
.filters { padding: 12px 16px 15px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filters .field { min-width: 120px; flex: 0 1 180px; }
.filters .field.search { flex-basis: 260px; }
.field { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.field label, .field-label { color: #37465a; font-weight: 750; font-size: 13px; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.field-required { color: var(--danger-ink); }
.control { min-width: 0; max-width: 100%; width: 100%; min-height: 41px; padding: 8px 10px; background: #fff; color: var(--ink); border: 1px solid #cfd8de; border-radius: 8px; }
.control:hover { border-color: #abbed1; }
.control::placeholder { color: #637286; }
.control:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.control[readonly] { background: #f2f5f9; color: #42536b; }
.control:disabled { background: var(--subtle); color: var(--muted); opacity: 1; }
input[type="date"].control, input[type="month"].control, input[type="datetime-local"].control, input[type="time"].control { display: block; }
textarea.control { resize: vertical; min-height: 77px; }
.search-control { position: relative; min-width: 0; }
.search-control .icon { position: absolute; top: 12px; left: 11px; color: #61748c; pointer-events: none; width: 16px; height: 16px; }
.search-control .control { padding-left: 34px; }
.inline-search { display: flex; align-items: center; gap: 7px; }
.inline-search .search-control { width: 222px; }
.inline-search .control { min-height: 38px; }
.inline-search .search-control .icon { top: 11px; }
.inline-search .button { min-height: 38px; }
.checkbox { min-height: 41px; display: flex; align-items: center; gap: 8px; color: #37465a; font-weight: 700; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--primary); flex: 0 0 auto; }

.table-scroll { max-width: 100%; overflow-x: auto; }
.records { border-collapse: collapse; width: 100%; font-size: 13px; table-layout: fixed; }
.records th { padding: 10px 12px; text-align: left; background: #f0f3f3; border-bottom: 1px solid var(--line); color: #40505a; font-weight: 750; white-space: nowrap; }
.records td { padding: 12px; border-bottom: 1px solid #e6ebf1; vertical-align: middle; overflow-wrap: anywhere; }
.records tr:last-child td { border-bottom: 0; }
.records tbody tr:hover { background: #fafbfd; }
.records th:first-child, .records td:first-child { padding-left: 17px; }
.records th:last-child, .records td:last-child { padding-right: 17px; }
.records .right { text-align: right; }
.records .nowrap { white-space: nowrap; }
.data-title { display: block; color: #1e2e44; font-size: 14px; letter-spacing: -.025em; font-weight: 800; line-height: 1.4; }
.data-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.record-company { display: block; margin-top: 3px; color: var(--primary); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.vehicle-settings-company { color: var(--primary); font-weight: 700; }
.vehicle-settings-table th:first-child { width: 23%; }
.vehicle-settings-table th:last-child { width: 20%; }
.missing { color: #69778a; }
.status { border-radius: 4px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; font-size: 12px; line-height: 1.45; font-weight: 750; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.status.available { background: var(--available-fill); color: var(--available-ink); }
.status.driving { background: var(--driving-fill); color: var(--driving-ink); }
.status.inactive { background: #eef1f5; color: #42536b; }
.status.problem { background: var(--danger-fill); color: var(--danger-ink); }
.row-actions { white-space: nowrap; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.trips-table th:nth-child(1) { width: 13%; }
.trips-table th:nth-child(2) { width: 13%; }
.trips-table th:nth-child(3) { width: 11%; }
.trips-table th:nth-child(4) { width: 28%; }
.trips-table th:nth-child(5) { width: 13%; }
.trips-table th:nth-child(6) { width: 10%; }
.trips-table th:nth-child(7) { width: 12%; }
.trips-table td:first-child .data-sub { word-break: keep-all; overflow-wrap: normal; }
.table-footer { padding: 9px 17px; border-top: 1px solid var(--line); background: #f8fafc; border-radius: 0 0 var(--radius) var(--radius); color: var(--muted); display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 12px; }
.empty { padding: 38px 16px 40px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.empty .icon { color: #637b96; width: 27px; height: 27px; margin: 0 auto 11px; }
.empty strong { color: var(--ink); display: block; margin-bottom: 4px; }
.empty .button { margin-top: 13px; }

.notice { border: 1px solid #d7e3f0; background: #eef4fb; color: #345372; border-radius: 6px; padding: 10px 12px; line-height: 1.6; display: flex; gap: 9px; align-items: flex-start; overflow-wrap: anywhere; }
.notice .icon { margin-top: 2px; flex: 0 0 auto; }
.notice.warning { border-color: #eed7ae; background: #fff6e6; color: #6e471e; }
.notice.error { border-color: #edc9c9; background: var(--danger-fill); color: var(--danger-ink); }
.notice .button { margin-left: auto; }
.notice + .surface, .notice + .form-grid { margin-top: 14px; }
.notice-stack { display: grid; gap: 10px; }
.draft-notices { margin-bottom: 15px; }
.draft-notices .notice { align-items: center; }
.page-loading { color: var(--muted); padding: 31px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.page-loading .spinner { width: 18px; height: 18px; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 17px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.tab { min-height: 42px; display: flex; align-items: center; padding: 7px 2px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; text-decoration: none; }
.tab:hover { color: var(--primary); }
.tab[aria-current="page"] { color: var(--primary); border-color: var(--primary); font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid .span { grid-column: 1 / -1; }
.report { max-width: 660px; }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.report-preview { padding: 16px; background: var(--subtle); border: 1px solid var(--line); border-radius: 7px; }
.report-preview strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 2px; }
.report-preview p { color: var(--muted); }
.report-preview .notice { margin-top: 9px; }
.key-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.key-values dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.key-values dd { font-weight: 750; overflow-wrap: anywhere; }
.backup-form { max-width: 640px; }
.backup-form .button { justify-self: start; }
.backup-table th:first-child { width: 45%; }
.record-detail dt { color: var(--muted); font-size: 12px; }
.record-detail dd { overflow-wrap: anywhere; white-space: pre-wrap; }
.return-notice { margin-bottom: 11px; }
.install-guide dt { font-weight: 800; }
.install-guide dd { margin: 2px 0 12px; }
.install-guide p { color: var(--muted); }

dialog { padding: 0; border: 1px solid #d4dee9; border-radius: 11px; width: min(560px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); margin: auto; color: var(--ink); background: #fff; box-shadow: 0 18px 60px #0b1b3430; }
dialog::backdrop { background: #0b172a7a; }
.dialog-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.055em; }
.dialog-head .icon-button { min-width: 35px; min-height: 35px; }
.dialog-body { padding: 16px 18px 19px; }
.dialog-context { background: var(--subtle); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; margin-bottom: 13px; color: #3e5068; }
.dialog-context strong { color: var(--ink); }
.dialog-context p { padding-top: 2px; overflow-wrap: anywhere; }
.dialog-footer { position: sticky; bottom: 0; z-index: 1; background: var(--surface); padding: 12px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.dialog-footer .push { margin-right: auto; }
.dialog-body .notice { margin-top: 12px; }
.distance { padding: 7px 10px; background: var(--subtle); color: #3d526b; border: 1px solid var(--line); border-radius: 6px; line-height: 1.6; }
.distance output { font-weight: 850; color: var(--ink); margin-left: 6px; }
#toast:not(:empty) { min-width: min(310px, calc(100vw - 28px)); max-width: min(450px, calc(100vw - 28px)); position: fixed; z-index: 5; bottom: 19px; right: 19px; background: #203d60; color: #fff; border-radius: 7px; padding: 12px 14px; box-shadow: 0 4px 14px #14284427; overflow-wrap: anywhere; }

.auth { min-height: 100svh; display: flex; flex-direction: column; background: var(--page); }
.auth-top { min-height: 68px; padding: 15px max(24px, 5vw); display: flex; align-items: center; border-bottom: 1px solid var(--line); background: #fff; color: #203854; }
.auth-top .brand-mark { background: var(--primary); }
.auth-main { display: grid; place-items: center; flex: 1; min-height: 0; padding: 30px 16px; }
.auth-panel { width: min(100%, 426px); padding: 29px 30px 31px; border-top: 3px solid var(--primary); }
.auth-panel h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.065em; font-weight: 800; margin-bottom: 6px; }
.auth-panel > p { color: var(--muted); }
.auth-form { display: grid; gap: 14px; margin-top: 22px; }
.auth-form .button { min-height: 44px; margin-top: 4px; }
.auth-form .control { min-height: 43px; }
.password-fields { display: grid; gap: 13px; }
.company-code { color: var(--muted); font-size: 13px; }
.company-code summary { cursor: pointer; width: fit-content; font-weight: 650; }
.company-code .field { margin-top: 9px; }
.account-guide { display: grid; gap: 11px; min-width: 0; }
.account-guide-values { display: grid; gap: 6px; }
.account-guide-values > div { display: grid; grid-template-columns: minmax(98px, .5fr) minmax(0, 1.5fr); align-items: baseline; gap: 8px; padding-block: 6px; border-bottom: 1px solid var(--line); }
.account-guide-values dt { color: var(--muted); font-size: 13px; font-weight: 650; }
.account-guide-values dd { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.account-guide-actions, .issued-password-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; }
.issued-password-line span { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 1160px) {
  :root { --sidebar: 188px; }
  .topbar { padding-inline: 23px; }
  .content { padding-inline: 23px; }
  .records td, .records th { padding-inline: 9px; }
  .records td:first-child, .records th:first-child { padding-left: 13px; }
  .records td:last-child, .records th:last-child { padding-right: 13px; }
}

@media (max-width: 960px) {
  :root { --sidebar: 160px; }
  .sidebar { padding-inline: 9px; }
  .nav-link { padding-inline: 8px; gap: 7px; font-size: 13px; }
  .brand { font-size: 17px; }
  .content, .topbar { padding-inline: 17px; }
  .records th { white-space: normal; }
}

@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .mobile-brand { display: flex; }
  .mobile-brand .brand-mark { width: 32px; height: 32px; }
  .mobile-brand .brand-mark .icon { width: 20px; height: 20px; }
  .topbar { min-height: 59px; padding: 7px 15px; gap: 8px; }
  .topbar-company { display: none; }
  .account { gap: 5px; font-size: 12px; }
  .account .avatar { display: none; }
  .account .install-shortcut { display: grid; }
  .account .icon-button { min-height: 42px; min-width: 41px; }
  .account-password { justify-content: center; min-width: 45px; padding-inline: 4px; line-height: 1.2; text-align: center; white-space: normal; }
  .account-password .icon { display: none; }
  .account-password span { width: 44px; font-size: 11px; }
  .account-exit { margin-left: 1px; }
  .mobile-nav { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; position: fixed; z-index: 3; inset: auto 0 0; background: #fff; border-top: 1px solid #d2dde8; padding: 3px 4px calc(3px + env(safe-area-inset-bottom)); }
  .mobile-nav .nav-link { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 1px; min-height: 49px; font-size: 10px; color: #4b5e76; white-space: normal; line-height: 1.2; text-align: center; }
  .mobile-nav .nav-link .icon { color: inherit; }
  .mobile-nav .nav-link[aria-current="page"] { background: var(--nav-active); color: var(--primary); font-weight: 800; }
  .content { padding: 21px 14px calc(77px + env(safe-area-inset-bottom)); }
  .form-grid .mobile-span { grid-column: 1 / -1; }
  .page-head { align-items: flex-start; gap: 8px 11px; margin-bottom: 14px; }
  .page-head h1 { font-size: 25px; }
  .page-description { font-size: 12px; margin-top: 4px; }
  .page-actions .button { min-height: 40px; }
  .today { display: none; }
  .summary { gap: 4px 8px; }
  .summary-item { gap: 4px; }
  .summary-item + .summary-item { padding-left: 8px; }
  .summary-label { gap: 4px; font-size: 12px; }
  .summary-marker { width: 6px; height: 6px; }
  .summary-value strong { font-size: 16px; }
  .mine { align-items: stretch; flex-direction: column; gap: 0; padding: 9px 11px; margin-bottom: 12px; }
  .mine-trip { padding: 4px 0; }
  .mine-details { gap: 1px 8px; font-size: 12px; }
  .mine .button { min-height: 44px; }
  .surface-head { padding: 11px 12px; min-height: 54px; flex-wrap: wrap; }
  .surface-body { padding: 13px 12px; }
  .fleet-connection { min-height: 44px; }
  .fleet-connection .button, .company-tab { min-height: 44px; }
  .fleet-meta { column-gap: 12px; }
  .fleet-toolbar .inline-search { min-width: min(240px, 100%); }
  .vehicle-settings-scope { padding-inline: 12px; }
  .vehicle-grid { gap: 14px; }
  .vehicle-card-more summary { min-height: 44px; padding-block: 10px; font-size: 15px; line-height: 1.6; }
  .vehicle-settings-table .vehicle-state { grid-row: 1; grid-column: 2; }
  .inline-search { flex: 1 1 180px; }
  .inline-search .search-control { flex: 1 1 auto; width: auto; }
  .filters { padding: 8px 12px 13px; gap: 8px; }
  .filters .field, .filters .field.search { flex: 1 1 135px; min-width: 0; }
  .filters .button { min-height: 43px; }
  .control, .auth-form .control { font-size: 16px; min-height: 44px; }
  .inline-search .control, .inline-search .button { min-height: 43px; }
  .inline-search .search-control .icon { top: 13px; }
  .table-scroll { overflow: visible; }
  .records, .records tbody, .records tr, .records td { display: block; width: 100%; }
  .records thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .records tbody { border-top: 1px solid var(--line); }
  .records tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 11px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
  .records tr:last-child { border-bottom: 0; }
  .records td, .records td:first-child, .records td:last-child, .records .right { min-width: 0; height: auto; padding: 0; border: 0; text-align: left; }
  .records td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; margin-bottom: 1px; }
  .records .cell-wide, .records .cell-actions { grid-column: 1 / -1; }
  .records .vehicle-state { justify-self: end; }
  .records .vehicle-state .status { float: right; }
  .records .mobile-hide { display: none; }
  .records .nowrap { white-space: normal; }
  .records .cell-actions .row-actions { justify-content: stretch; }
  .records .cell-actions .button { flex: 1 1 90px; min-height: 44px; font-size: 13px; }
  .record-company { font-size: 13px; }
  .table-footer { padding: 8px 12px; }
  .empty { padding: 29px 12px; }
  .key-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #toast:not(:empty) { bottom: calc(63px + env(safe-area-inset-bottom)); right: 14px; }
  .report-actions .button { min-height: 44px; }
  .auth-top { min-height: 59px; padding-inline: 15px; }
  .auth-main { align-items: start; padding-top: 36px; }
  .auth-panel { padding: 24px 19px 26px; }
}

@media (max-width: 619px) {
  .fleet-toolbar .company-tabs, .fleet-toolbar .inline-search { flex-basis: 100%; }
  .fleet-meta #fleet-connection-panel { flex-basis: 100%; margin-inline-start: 0; }
}

@media (max-width: 520px) {
  .vehicle-settings-head { grid-template-columns: minmax(0, 1fr) auto; }
  .vehicle-settings-head > button { grid-row: 1; grid-column: 2; }
  .vehicle-settings-head > .checkbox { grid-row: 2; grid-column: 1 / -1; min-height: 44px; }
}

@media (max-width: 400px) {
  .page-head .button { padding-inline: 8px; }
  .page-head .button .icon { width: 14px; height: 14px; }
  .surface-head { gap: 7px; }
  .surface-head .inline-search { flex-basis: 100%; }
  .dialog-head { padding: 11px 12px; }
  .dialog-head h2 { font-size: 18px; }
  .dialog-body { padding: 13px 12px; }
  .dialog-footer { padding: 10px 12px; }
  .dialog-footer .button { min-height: 44px; }
  .form-grid { gap: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
