:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  color: #26354a;
  background: #f2f5fa;
  --brand: #2462c6;
  --brand-dark: #1b4ca2;
  --ink: #26354a;
  --muted: #66758a;
  --line: #e3e9f2;
  --surface: #fff;
  --wash: #f6f8fc;
  --danger: #b12d36;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
button, input, select, textarea { font: inherit; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 33px;
  padding: 5px 13px;
  border-radius: 4px;
  border: 1px solid #d5dfec;
  background: #fff;
  color: #33465f;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
button:hover, .button:hover { background: #f2f7ff; color: var(--brand); border-color: #a8c4ef; text-decoration: none; }
button:disabled { opacity: .6; cursor: wait; }
button.primary, .button.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
button.primary:hover, .button.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
button.text, button.text-danger { min-height: 26px; padding: 2px 5px; border-color: transparent; background: transparent; }
button.text { color: var(--brand); }
button.text-danger { color: var(--danger); }
button.text:hover, button.text-danger:hover { background: #f4f7fb; }
button:focus-visible, a:focus-visible { outline: 2px solid #67a0ff; outline-offset: 2px; }
h1, h2, p { margin: 0; }
h1 { font-size: 17px; font-weight: 660; }
h2 { font-size: 14px; font-weight: 650; }
.muted { color: var(--muted); }
.required { color: #b13030; margin-left: 4px; }

.app-frame { display: grid; grid-template-columns: 90px minmax(0, 1fr); min-height: 100vh; }
.app-content { min-width: 0; }
.primary-rail { position: sticky; top: 0; height: 100vh; overflow: auto; background: #1c4e9e; border-right: 1px solid #ffffff28; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  background: #1c4e9e;
  color: #fff;
  padding: 0 20px;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-size: 17px; font-weight: 700; flex: 0 0 auto; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-symbol { display: inline-grid; place-items: center; width: 32px; height: 32px; background: #ffffff23; border: 1px solid #ffffff32; border-radius: 7px; }
.topnav { display: grid; align-content: start; gap: 3px; padding: 7px 0; }
.topnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 58px; padding: 6px 4px; color: #f1f6ff; white-space: nowrap; position: relative; }
.topnav a:hover, .topnav a.selected { background: #ffffff19; text-decoration: none; color: #fff; }
.topnav a.selected::after { content: ""; position: absolute; inset: 8px auto 8px 0; width: 3px; background: #a1ccff; border-radius: 0 3px 3px 0; }
.topnav a:focus-visible { outline-offset: -3px; }
.account { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.account .user { display: flex; align-items: center; gap: 5px; }
.account button { color: #fff; background: #ffffff14; border-color: #ffffff40; min-height: 29px; padding: 3px 8px; }
.account button:hover { background: #ffffff2a; }
.shell { display: flex; min-height: calc(100vh - 60px); }
.sidebar { flex: 0 0 155px; background: #fff; border-right: 1px solid var(--line); padding: 19px 10px; }
.sidebar a { display: block; color: #3e4e65; padding: 10px 12px; margin: 2px 0; border-radius: 4px; }
.sidebar a.selected { background: #e9f1ff; color: #1a56b4; font-weight: 650; }
.sidebar a:hover { text-decoration: none; background: #f0f5fd; }
.workspace { min-width: 0; width: 100%; padding: 17px 20px 28px; }
.home-workspace { max-width: 1560px; margin: 0 auto; padding-top: 22px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--muted); margin-bottom: 13px; font-size: 12px; }
.breadcrumb b { color: var(--ink); font-weight: 600; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 15px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; white-space: nowrap; min-height: 21px; padding: 2px 7px; background: #edf1f6; color: #536479; border-radius: 4px; font-size: 11px; }
.badge.orange { background: #fff1d9; color: #89540c; }
.badge.green { background: #e9f6ee; color: #267040; }
.badge.blue { background: #eaf2ff; color: #225db4; }

.home-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 17px; }
.home-heading h1 { font-size: 22px; }
.home-heading p { margin-top: 5px; color: var(--muted); }
.global-search { display: flex; gap: 8px; align-items: center; min-width: min(340px, 45vw); color: var(--muted); }
.global-search input { flex: 1; }
.segments { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.segments a { padding: 5px 10px; color: var(--muted); }
.segments a.selected { background: #eaf2ff; color: var(--brand); }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); padding: 16px 4px; }
.metric { display: grid; gap: 9px; padding: 12px 20px; border-right: 1px solid var(--line); }
.metric:last-child { border: 0; }
.metric > span { color: var(--muted); }
.metric strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.metric small { font-size: 11px; font-weight: 450; margin-left: 4px; color: var(--muted); }
.home-columns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 15px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px; gap: 5px; }
.quick-grid a { display: grid; justify-items: center; gap: 7px; padding: 10px 4px; color: #354961; }
.quick-grid a:hover { border-radius: 5px; background: var(--wash); text-decoration: none; }
.quick-grid a > span { background: #eaf2ff; color: var(--brand); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; }
.todo-list { padding: 5px 16px 10px; }
.todo-list a { display: flex; justify-content: space-between; padding: 9px 1px; border-bottom: 1px solid var(--line); }
.todo-list a:last-child { border: 0; }
.todo-list a span { color: var(--ink); }
.process { display: flex; gap: 30px; padding: 18px 16px; }

.tabs { display: flex; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow: auto; }
.tabs a { color: #56657b; padding: 11px 6px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--brand); }
.tabs a.selected { color: var(--brand); border-color: var(--brand); font-weight: 650; }
.body-pad { padding: 14px 16px 18px; }
.body-pad .tabs { padding: 0; }
.subheading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; margin: 7px 0 9px; }
.subheading h2 { border-left: 3px solid #447fda; padding-left: 8px; }
.body-pad > .subheading:first-child { margin-top: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 9px 12px; padding: 14px 16px; align-items: end; background: #fbfcfe; border-bottom: 1px solid var(--line); }
.body-pad .filters { padding-left: 0; padding-right: 0; background: #fff; }
.filters .field { width: auto; min-width: 123px; }
.filters .field:has([name=q]) { min-width: 216px; }
.filter-buttons { display: flex; gap: 7px; }
.field { min-width: 0; display: grid; gap: 5px; color: #47586e; align-content: start; }
.field > span { font-size: 12px; }
input:not([type=checkbox]), select, textarea {
  min-width: 0; width: 100%; min-height: 33px; border: 1px solid #d5dfec; border-radius: 4px;
  background: #fff; color: var(--ink); padding: 5px 8px;
}
input[readonly] { background: #f1f5fa; color: #3c587c; }
input::placeholder, textarea::placeholder { color: #78869a; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b6d2ff; outline-offset: 0; border-color: #84a9e9; }
textarea { resize: vertical; }
input[type=checkbox] { accent-color: var(--brand); }
.check { display: flex; gap: 5px; align-items: center; min-height: 32px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.settings-form { display: grid; justify-items: start; gap: 9px; padding: 0 4px 10px; }
.settings-form .field { min-width: 240px; }

.table-scroll { max-width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; text-align: left; }
th, td { padding: 10px 11px; border: 1px solid var(--line); white-space: nowrap; }
th { background: #f4f7fb; color: #516177; font-weight: 620; }
td { color: #32465e; }
tbody tr:hover td { background: #f9fbfe; }
td > button + button { margin-left: 3px; }
td > input { min-width: 85px !important; }
.table-footer { color: #66758a; text-align: right; padding: 9px 15px; font-size: 12px; }
.empty { display: grid; min-height: 126px; align-content: center; justify-items: center; gap: 9px; color: #73829a; }
.empty svg { color: #93a9c6; }
.editor { padding: 12px 16px 16px; }
.steps { display: flex; gap: 30px; padding: 13px 18px; background: var(--wash); border-bottom: 1px solid var(--line); color: var(--muted); }
.steps span { display: inline-flex; gap: 6px; align-items: center; }
.steps b { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #e7edf5; }
.steps .selected { color: var(--brand); font-weight: 650; }
.steps .selected b { background: var(--brand); color: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .span { grid-column: span 2; }
.quote-context, .notice { padding: 9px 12px; background: #eef5ff; border: 1px solid #dbe9fd; border-radius: 4px; color: #355980; line-height: 1.55; }
.quote-context { margin: 12px 0; }
.notice { margin: 5px 0 12px; }
.editor-table { border: 1px solid var(--line); }
.editor-table td { padding: 6px 8px; }
.editor-table td:first-child { min-width: 210px; }
.editor-table td:has(input) { width: 120px; }
.line-price-note { display: block; color: #5c7391; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 15px; padding-top: 13px; }
.editor-footer strong { margin-left: 8px; font-size: 18px; color: #1a4e9b; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); column-gap: 22px; row-gap: 10px; margin: 0 0 16px; padding: 6px 0 15px; border-bottom: 1px solid var(--line); }
.detail-grid > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; column-gap: 9px; min-width: 0; }
.detail-grid dt { color: #666; }
.detail-grid dt::after { content: "："; }
.detail-grid dd { margin: 0; color: #303030; overflow-wrap: anywhere; }
.detail-grid .detail-nowrap dd { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 390px) { .detail-grid .detail-nowrap { grid-template-columns: minmax(0, 1fr); } }
.finance-summary { display: flex; gap: 22px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.finance-summary b { margin-left: 5px; }

dialog { max-width: min(760px, calc(100vw - 28px)); width: 100%; max-height: calc(100vh - 36px); padding: 0; border: 1px solid #cbd8eb; border-radius: 8px; color: var(--ink); box-shadow: 0 20px 55px #12264532; }
dialog::backdrop { background: #1427446b; }
dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 42px); }
dialog header, dialog footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 11px 17px; border-bottom: 1px solid var(--line); }
dialog footer { justify-content: flex-end; border-bottom: 0; border-top: 1px solid var(--line); }
dialog header h2 { font-size: 16px; }
dialog .dialog-body { overflow: auto; min-height: 0; padding: 14px 17px; }
dialog .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
dialog .close { min-height: 27px; font-size: 20px; line-height: 1; padding: 0 7px; border: 0; }
.form-error { color: var(--danger); min-height: 16px; font-size: 12px; }
.form-error:empty { min-height: 0; }
.dialog-body .form-error:not(:empty) { margin-top: 10px; }
.import-tools { display: flex; align-items: end; gap: 10px; margin-bottom: 10px; }
#message { display: none; }
#message.visible { display: block; position: fixed; z-index: 4; top: 68px; right: 20px; max-width: calc(100vw - 40px); padding: 10px 14px; background: #e7f6ec; border: 1px solid #b4dfc3; border-radius: 5px; box-shadow: 0 5px 15px #102c4d18; color: #235a37; }
#message.error { background: #ffeded; border-color: #e7b3b3; color: #952b35; }

.login { min-height: 100vh; display: grid; grid-template-columns: 1.14fr 1fr; background: #fff; }
.login-left { position: relative; isolation: isolate; display: grid; grid-template-rows: 1fr 2fr 1fr; overflow: hidden; color: #fff; padding: clamp(26px, 6vw, 80px); background: linear-gradient(138deg, #193f80, #2460bb 65%, #3377d3); }
.login-brand { align-self: start; display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; }
.login-brand .brand-symbol { width: 40px; height: 40px; }
.login-copy { align-self: center; }
.login-copy .eyebrow { color: #d2e5ff; font-size: 14px; }
.login-copy h1 { font-size: clamp(32px, 5vw, 65px); line-height: 1.18; letter-spacing: -.04em; margin: 13px 0 18px; }
.login-copy p { color: #e0ebfb; font-size: clamp(13px, 1.55vw, 17px); }
.login-art { pointer-events: none; position: absolute; inset: 0; z-index: -1; }
.login-art div { position: absolute; width: 520px; height: 280px; border: 1px solid #c1d9ff48; border-radius: 50%; right: -240px; bottom: -45px; transform: rotate(-33deg); }
.login-art div:nth-child(2) { width: 655px; height: 350px; right: -270px; bottom: -54px; }
.login-art div:nth-child(3) { width: 780px; height: 415px; right: -300px; bottom: -64px; }
.login-right { display: grid; place-items: center; padding: 24px; }
.login-form { width: min(350px, 100%); display: grid; gap: 14px; }
.login-form h2 { font-size: 26px; }
.login-form .field { gap: 6px; }
.login-form input { min-height: 42px; }
.login-caption { display: flex; gap: 7px; align-items: center; color: #697a92; font-size: 12px; }
.login-button { min-height: 42px; }

@media (max-width: 980px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .account .user svg { display: none; }
  .sidebar { flex-basis: 120px; }
  .workspace { padding: 13px 12px; }
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { padding: 9px 12px; }
}
@media (max-width: 730px) {
  .app-frame { grid-template-columns: 63px minmax(0, 1fr); }
  .topnav a { min-height: 52px; font-size: 11px; }
  .topbar { flex-wrap: wrap; padding: 8px 10px; }
  .account { margin-left: auto; gap: 5px; }
  .shell { display: block; }
  .sidebar { display: flex; overflow: auto; padding: 2px 7px; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .sidebar a { padding: 7px 8px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .home-columns { display: block; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-header { flex-wrap: wrap; }
  .finance-summary { flex-wrap: wrap; gap: 6px 15px; }
  .login { grid-template-columns: 1fr; }
  .login-left { padding: 24px; grid-template-rows: auto auto; gap: 22px; }
  .login-copy h1 { margin: 7px 0; }
  .login-right { align-items: start; padding: 23px; }
}
@media print {
  .primary-rail, .topbar, .sidebar, .breadcrumb, .panel-header .actions, #message, .print-hidden { display: none !important; }
  .app-frame, .shell, .workspace { display: block; margin: 0; padding: 0; }
  .printable { border: 0; }
  .table-scroll { overflow: visible; }
}

.filter-advanced { flex-basis: 100%; }
.filter-advanced summary { width: fit-content; padding: 5px 0; color: var(--brand); cursor: pointer; }
.filter-advanced .form-grid { margin-top: 8px; }

.price-grid table { border: 1px solid var(--line); }
.price-grid th, .price-grid td { border-right: 1px solid var(--line); }
.price-grid th:first-child { width: 40%; }
.price-grid td:first-child { white-space: normal; overflow-wrap: anywhere; }
.price-grid td:first-child .text { white-space: normal; text-align: left; }
.price-switch { border: 0; padding: 4px 6px; gap: 8px; }
.switch-track { display: inline-flex; align-items: center; width: 31px; height: 17px; padding: 2px; border-radius: 10px; background: #6c7c90; }
.switch-track::before { content: ""; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.price-switch[aria-checked=true] .switch-track { background: var(--brand); justify-content: end; }
.quote-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.quote-filters .field { flex: 1 1 190px; }
.quote-version { color: var(--muted); margin-bottom: 9px; }

.date-trigger { justify-content: space-between; min-width: 125px; }
.date-trigger::after { content: ""; width: 9px; height: 8px; border: 1px solid currentColor; border-top: 3px solid currentColor; border-radius: 2px; opacity: .65; }
.date-popover { width: min(310px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: 8px; padding: 11px; color: var(--ink); box-shadow: 0 8px 32px #192b482f; }
.calendar-header, .calendar-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.calendar-header label { display: flex; align-items: center; gap: 3px; }
.calendar-header input { width: 76px; }
.calendar-header select { width: 72px; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; margin: 9px 0; }
.calendar-days span { color: var(--muted); padding: 4px 0; font-size: 11px; }
.calendar-days button { min-height: 29px; padding: 0; border-color: transparent; }
.calendar-days button[aria-pressed=true] { background: var(--brand); color: white; }
.date-time { display: flex; gap: 12px; margin-bottom: 9px; }
.date-time label { display: flex; align-items: center; gap: 5px; }
.date-time input { width: 64px; }
.permission-group { margin-bottom: 12px; }
.permission-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; padding: 2px 4px; border-bottom: 1px solid var(--line); }
.permission-row > .check:first-child { min-width: 143px; font-weight: 600; }
.settings-form { border: 0; margin: 0; }
.base-workspace .filters { padding-inline: 0; }
.base-workspace th { background: #f4f4f4; }
.base-workspace a:not(.button):not(.tabs a), .base-workspace .text { color: #216dcc; }
.base-list-actions, .base-form-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 9px 0 12px; }
.base-classifications th, .base-classifications td { width: 50%; text-align: center; }
.base-classifications .compact { min-height: 25px; padding: 1px 12px; }
.category-layout { display: grid; grid-template-columns: minmax(260px, 1.05fr) minmax(200px, 1fr); gap: 14px; }
.category-layout > section { border: 1px solid var(--line); padding: 11px; min-height: 340px; }
.category-layout h3 { margin: 0 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.category-layout .actions { justify-content: flex-start; }
.category-tree > b { display: block; background: var(--brand); color: #fff; padding: 9px 12px; }
.category-tree summary, .category-leaf { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.category-tree summary { cursor: pointer; }
.category-tree details > details, .category-tree details > .category-leaf { margin-left: 15px; }
.category-tree .selected { font-weight: 650; }
.base-settings { padding-top: 5px; }
.base-settings .settings-form { padding: 0; }
.setting-group { margin: 0 0 16px; }
.setting-group h2 { margin: 0; padding: 10px 8px; border-bottom: 1px dashed #d9d9d9; font-size: 14px; }
.setting-options, .setting-inline { display: flex; flex-wrap: wrap; column-gap: 21px; row-gap: 8px; padding: 11px 9px; }
.setting-options .check { min-width: 125px; }
.setting-inline { padding: 0; }
#employee-form .form-grid { padding: 15px 8px; }
@media (max-width: 700px) {
  .category-layout { grid-template-columns: 1fr; }
}

.archive-grid th:first-child { width: 56px; }

.template-grid th:first-child { width: 56px; }
.template-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.template-preview, .print-preview { border: 1px solid var(--line); padding: 14px; }
.print-tools { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.print-document header { display: block; text-align: center; padding: 0 0 10px; border: 0; }
.print-document h2 { margin-bottom: 6px; }
.print-text { white-space: pre-wrap; margin: 12px 0; }
.print-totals { text-align: right; font-weight: 600; }
.issue-workspace:has(#issue-form) { background: #f6f6f6; }
.issue-workspace .panel-header, .issue-sheet, .issue-footer, .issue-vehicle { background: #fff; }
.issue-workspace a:not(.button):not(.tabs a), .issue-workspace button.text { color: #1768d3; }
.issue-workspace th, .issue-history th { background: #f3f3f3; color: #333; }
.issue-workspace td, .issue-history td { color: #404040; }
.issue-vehicle { padding: 22px 20px; margin: 12px 14px; }
.issue-vehicle h2 { margin: 0 0 5px; font-size: 21px; }
.issue-vehicle-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin-bottom: 4px; color: #666; }
.issue-vehicle-meta > span { padding-right: 12px; margin-right: 12px; border-right: 1px solid #e2e2e2; }
.issue-vehicle-meta > span:last-child { border-right: 0; }
.issue-vehicle .actions { justify-content: flex-start; }
.issue-sheet { margin: 0 14px; padding: 14px; }
.issue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.issue-toolbar button:disabled { cursor: not-allowed; }
.issue-person { margin-bottom: 12px; max-width: 230px; }
.issue-notes { display: grid; gap: 12px; margin-top: 10px; }
.issue-notes > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; gap: 10px; }
.issue-notes > div > span { padding-top: 9px; }
.issue-notes p { margin: 0; padding: 8px 10px; min-height: 34px; border: 1px solid #ddd; border-radius: 4px; overflow-wrap: anywhere; white-space: pre-wrap; }
.issue-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 28px; border-top: 1px solid #eee; }
dialog:has(.issue-history) { max-width: min(1180px, calc(100vw - 28px)); }
.issue-history-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid #ddd; }
.issue-history-tabs button { border-radius: 0; border-color: #e3e3e3; min-width: 80px; }
.issue-history-tabs .selected { color: var(--brand); font-weight: 650; border-bottom-color: #fff; }
.issue-history-filters, .issue-history-pages { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.issue-history-filters .field { grid-template-columns: max-content minmax(110px, 1fr); align-items: center; }
.issue-history-pages > span[aria-current] { display: grid; place-items: center; min-width: 32px; min-height: 32px; background: var(--brand); color: #fff; border-radius: 3px; }
.history-jump { display: inline-flex; gap: 6px; align-items: center; }
.history-jump input { width: 56px; padding-inline: 6px; text-align: center; }
.history-expand summary { cursor: pointer; }
.history-expand ul { padding-inline-start: 15px; margin: 7px 0 0; }
.issue-history .table-footer { display: none; }
@media (max-width: 600px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .issue-vehicle, .issue-sheet { margin-inline: 7px; padding-inline: 10px; }
  .issue-footer { padding-inline: 17px; }
}
.amendment-entry { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--line); }
.amendment-entry summary { cursor: pointer; }
.amendment-entry td { white-space: pre-line; }
#work-difference { color: var(--muted); }
@media screen {
  #print-sheet { display: none; }
}
@media print {
  body:has(#print-sheet) > :not(#print-sheet) { display: none !important; }
  #print-sheet .print-document { color: #000; }
  #print-sheet .table-scroll { overflow: visible; }
  #print-sheet th, #print-sheet td { border-color: #666; }
  #print-sheet .issue-document th, #print-sheet .issue-document td { white-space: normal; overflow-wrap: anywhere; }
}

.base-settings .setting-group { border: 1px solid var(--line); border-radius: 4px; }
.base-settings .setting-group h2 { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--wash); }
.base-settings[data-key=customer] .setting-options { display: grid; padding: 0 14px; }
.required-setting { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; cursor: pointer; }
.required-setting + .required-setting { border-top: 1px solid var(--line); }
.required-setting input { position: absolute; inset-inline-end: 0; width: 34px; height: 20px; opacity: 0; margin: 0; }
.required-track { display: inline-flex; align-items: center; width: 34px; height: 20px; padding: 3px; background: #8b98a9; border-radius: 10px; }
.required-track::before { content: ""; width: 14px; height: 14px; background: #fff; border-radius: 50%; }
.required-setting input:checked + .required-track { background: var(--brand); }
.required-setting input:checked + .required-track::before { transform: translateX(14px); }
.required-setting input:focus-visible + .required-track { outline: 2px solid var(--brand); outline-offset: 2px; }
.archive-switch { display: inline-flex; width: 38px; min-width: 38px; height: 22px; padding: 2px; border: 0; border-radius: 20px; background: #79879a; vertical-align: middle; }
.archive-switch > span { width: 18px; height: 18px; border-radius: 50%; background: white; }
.archive-switch[aria-checked="true"] { background: var(--brand, #245fc0); justify-content: flex-end; }
.archive-switch:focus-visible { outline: 2px solid var(--brand, #245fc0); outline-offset: 2px; }
.workbook-preview { display: block; width: 100%; height: min(60vh, 620px); border: 1px solid var(--line); border-radius: 4px; }
