:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --text: #0f172a;
    --muted: #64748b;
    --blue: #2563eb;
    --blue-soft: #dbeafe;
    --green: #16a34a;
    --green-soft: #dcfce7;
    --purple: #7c3aed;
    --purple-soft: #ede9fe;
    --red: #dc2626;
    --red-soft: #fee2e2;
    --gray-soft: #f1f5f9;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 8px 18px rgba(15, 23, 42, 0.05);
    --shadow-card-soft: 0 6px 14px rgba(15, 23, 42, 0.05);
    --shadow-floating: 0 16px 34px rgba(15, 23, 42, 0.16);
    --shadow-sticky: 0 8px 24px rgba(15, 23, 42, 0.1);
    --shadow-drawer: 18px 0 44px rgba(15, 23, 42, 0.18);
    --shadow-modal: 0 18px 38px rgba(15, 23, 42, 0.18);
    --z-mobile-backdrop: 9;
    --z-sidebar: 10;
    --z-bottom-nav: 10;
    --z-mobile-quick-add: 11;
    --z-sticky-actions: 12;
    --z-mobile-search: 19;
    --z-mobile-topbar: 20;
    --z-quick-add-backdrop: 20;
    --z-quick-add: 24;
    --z-topbar: 30;
    --z-top-quick-add: 35;
    --z-modal-backdrop: 40;
    --z-modal: 41;
    --control-height: 42px;
    --control-height-compact: 40px;
    --control-radius: 8px;
    --focus-ring: 0 0 0 3px rgba(96, 165, 250, 0.16);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--bg);
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
    @media (min-width: 761px) {
        html {
            overflow-y: scroll;
        }
    }
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.phone-link {
    color: inherit;
    text-decoration: none;
}

.phone-link:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (hover: hover) and (pointer: fine) {
    .phone-link:hover {
        color: var(--blue);
    }
}

a,
button,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
    max-width: 100%;
}

:where(a, button, [role="button"], .icon-link):focus-visible {
    outline: 0;
    box-shadow: var(--focus-ring);
}

h1,
h2,
h3,
.page-header h1,
.form-card h2,
.section-title {
    text-wrap: balance;
}

p,
.empty-state,
.dashboard-record-memo,
.washcard-log-memo {
    text-wrap: pretty;
}

.summary-card strong,
.dashboard-record-date strong,
.dashboard-record-amount,
.dashboard-record-info-value,
.record-result-count,
.side-summary dd,
.amount-preview,
.detail-amount-summary,
.repair-group-total,
.washcard-card-balance,
.washcard-selected-card > strong,
.washcard-amount,
.washcard-balance-after,
.insurance-roadside-item strong {
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

select {
    min-height: var(--control-height);
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    min-width: 0;
    max-width: 100%;
    line-height: var(--control-height);
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
    text-align: left;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
}

input[type="file"] {
    min-height: var(--control-height);
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 26px;
}

input[type="file"]::file-selector-button {
    min-height: 28px;
    margin: 0 10px 0 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    line-height: 26px;
    vertical-align: middle;
}

input[type="file"]::-webkit-file-upload-button {
    min-height: 28px;
    margin: 0 10px 0 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    line-height: 26px;
    vertical-align: middle;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.icon-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: #111827;
}

.icon-button:hover {
    background: var(--gray-soft);
}

.primary-button,
.ghost-button,
.outline-danger-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    padding: 0 18px;
    font-weight: 700;
    white-space: nowrap;
}

.primary-button {
    border: 1px solid var(--blue);
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.ghost-button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}

.ghost-button:hover {
    border-color: var(--line-strong);
    background: var(--surface-soft);
}

.ghost-button.compact {
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
}

.primary-button.compact {
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
}

.ghost-button.danger,
.outline-danger-button {
    color: var(--red);
}

.outline-danger-button {
    width: 100%;
    border: 1px solid var(--red);
    background: #fff;
}

.button-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-row form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.detail-page-header .button-row .primary-button {
    transform: translateY(-2px);
}

.topbar {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: var(--z-topbar);
    width: min(1680px, 100%);
    height: 70px;
    max-width: 1680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 240px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

.brand-car {
    font-weight: 800;
}

.topnav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.topnav a {
    height: 100%;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: #334155;
    border-bottom: 3px solid transparent;
    font-weight: 650;
}

.topnav a.is-active {
    color: #020617;
    border-bottom-color: #020617;
}

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

.top-page-title {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    background: var(--surface-soft);
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.top-quick-add-shell {
    display: inline-flex;
}

.top-quick-add-button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 850;
}

.top-quick-add-button .icon {
    width: 16px;
    height: 16px;
}

.mobile-topbar {
    display: none;
}

.mobile-search-panel {
    display: none;
}

.quick-add-shell {
    position: relative;
}

.quick-add-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: var(--z-quick-add);
    min-width: 224px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-floating);
    transform-origin: top right;
    animation: quickAddIn 140ms ease;
}

.quick-add-menu[hidden],
.quick-add-backdrop[hidden] {
    display: none;
}

.quick-add-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--z-quick-add-backdrop);
    background: transparent;
}

.top-quick-add-menu {
    z-index: var(--z-top-quick-add);
    min-width: 546px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.top-quick-add-menu .quick-add-link {
    min-height: 42px;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.top-quick-add-menu .icon {
    width: 18px;
    height: 18px;
}

.quick-add-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(248, 250, 252, 0.82);
    color: #334155;
    font-weight: 850;
}

.quick-add-link:hover {
    border-color: rgba(37, 99, 235, 0.32);
    background: var(--blue-soft);
    color: var(--blue);
}

[data-quick-add-toggle].is-open .icon {
    transform: rotate(45deg);
}

@keyframes quickAddIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mobileQuickAddIn {
    from {
        opacity: 0;
        transform: translateX(50%) translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(50%) translateY(0) scale(1);
    }
}

@keyframes mobileQuickAddOut {
    from {
        opacity: 1;
        transform: translateX(50%) translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(50%) translateY(18px) scale(0.98);
    }
}

.app-shell {
    max-width: 1680px;
    min-height: calc(100dvh - 70px);
    margin: 70px auto 0;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar {
    position: fixed;
    top: 70px;
    left: max(0px, calc((100vw - 1680px) / 2));
    z-index: var(--z-sidebar);
    width: 300px;
    height: calc(100dvh - 70px);
    min-height: calc(100dvh - 70px);
    max-height: calc(100dvh - 70px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 18px 22px;
    border-right: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
}

.car-card {
    position: relative;
    flex: 0 0 auto;
    min-height: 176px;
    margin: 0 -18px;
    overflow: hidden;
    background: var(--surface-soft);
}

.car-card img {
    width: 100%;
    height: 176px;
    object-fit: cover;
    display: block;
}

.car-card-overlay {
    position: absolute;
    left: 18px;
    bottom: 16px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.car-card-overlay strong,
.car-card-overlay span {
    display: block;
}

.car-card-overlay span {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 800;
}

.side-menu {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    margin-right: -4px;
}

.side-menu-item {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius);
    padding: 0 12px;
    color: #334155;
    font-weight: 650;
}

.side-menu-item .icon {
    width: 18px;
    height: 18px;
}

.side-menu-item.is-active {
    background: #eff6ff;
    color: var(--blue);
}

.side-summary {
    order: 4;
    flex: 0 0 auto;
    margin-top: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.side-summary h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.side-summary dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    margin: 0;
}

.side-summary dt,
.side-summary dd {
    margin: 0;
}

.side-summary dd {
    font-weight: 750;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-weight: 800;
}

.sync-text {
    order: 3;
    flex: 0 0 auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.sync-text time {
    color: #64748b;
    font-weight: 850;
    white-space: nowrap;
}

.main-content {
    grid-column: 2;
    min-width: 0;
    padding: 28px 28px 36px;
    background: linear-gradient(180deg, #fff 0, #f8fafc 100%);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-header > div {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.count-text {
    color: #475569;
    font-weight: 650;
}

.record-count-header {
    margin-bottom: 12px;
}

.record-count-header > div {
    align-items: center;
}

.record-count-header .count-text {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
}

.filter-bar {
    display: grid;
    grid-template-columns: 130px 160px 160px minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.dashboard-filter {
    grid-template-columns: 150px;
    justify-content: start;
}

.compact-filter {
    grid-template-columns: 150px minmax(220px, 1fr) auto;
}

.filter-bar select,
.filter-bar input,
.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
    min-height: var(--control-height);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
}

.filter-bar select:focus,
.filter-bar input:focus,
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: #93c5fd;
    outline: 0;
    background: #fff;
    box-shadow: var(--focus-ring);
}

.form-card textarea:focus {
    padding-top: 10px;
}

.form-card textarea {
    padding-top: 10px;
    resize: vertical;
}

.form-card input[type="file"] {
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 26px;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field .icon {
    position: absolute;
    left: 12px;
    color: var(--muted);
}

.search-field input {
    padding-left: 40px;
}

.summary-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    margin-bottom: 20px;
}

.summary-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon label" "icon amount" "icon small";
    column-gap: 14px;
    min-width: 0;
    max-width: 100%;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.summary-card:last-child {
    border-right: 1px solid var(--line);
}

.summary-icon {
    grid-area: icon;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
}

.summary-icon.blue,
.summary-icon.blue-soft {
    background: #3b82f6;
}

.summary-icon.green {
    background: #22c55e;
}

.summary-icon.purple {
    background: #8b5cf6;
}

.summary-icon.orange {
    background: #f97316;
}

.summary-card p,
.summary-card strong,
.summary-card small {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.summary-card p {
    grid-area: label;
    color: #334155;
    font-weight: 650;
}

.summary-card strong {
    grid-area: amount;
    margin-top: 5px;
    font-size: 23px;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.summary-card small {
    grid-area: small;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.35;
}

.timeline-list {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.timeline-row {
    display: grid;
    grid-template-columns: 70px 18px minmax(0, 1fr);
    min-height: 100px;
}

.timeline-date {
    padding: 20px 0 0 18px;
    color: #0f172a;
    text-align: center;
}

.timeline-date strong,
.timeline-date span {
    display: block;
}

.timeline-date span {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.timeline-dot {
    position: relative;
    display: flex;
    justify-content: center;
}

.timeline-dot::before {
    content: "";
    width: 1px;
    height: 100%;
    background: var(--line);
}

.timeline-dot::after {
    content: "";
    position: absolute;
    top: 27px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 3px solid var(--surface);
    background: #64748b;
}

.timeline-row.is-featured .timeline-dot::after {
    background: var(--blue);
}

.timeline-marker {
    --marker-color: #64748b;
    position: relative;
    display: flex;
    justify-content: center;
}

.timeline-marker::before {
    content: "";
    width: 1px;
    height: 100%;
    background: var(--line);
}

.timeline-marker::after {
    content: "";
    position: absolute;
    top: 22px;
    z-index: 1;
    width: 30px;
    height: 30px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.timeline-marker > .icon,
.timeline-marker > span,
.timeline-marker > img {
    position: absolute;
    z-index: 2;
    color: #fff;
}

.timeline-marker > img {
    top: 22px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
}

.timeline-marker > .icon {
    top: 29px;
    width: 16px;
    height: 16px;
}

.timeline-marker > span {
    top: 30px;
    width: 28px;
    text-align: center;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1;
}

.timeline-marker-repair {
    --marker-color: #2563eb;
}

.timeline-marker-drive {
    --marker-color: #0ea5e9;
}

.timeline-marker-etc {
    --marker-color: #64748b;
}

.timeline-marker-accident {
    --marker-color: #ef4444;
}

.timeline-marker-fuel,
.fuel-brand-rto {
    --marker-color: #16a34a;
}

.fuel-brand-gsc {
    --marker-color: #0ea5e9;
}

.fuel-brand-hdo {
    --marker-color: #1d4ed8;
}

.fuel-brand-sol {
    --marker-color: #f97316;
}

.fuel-brand-skg {
    --marker-color: #e11d48;
}

.timeline-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 18px 18px 18px 26px;
    border-bottom: 1px solid var(--line);
}

.timeline-row.is-featured .timeline-card {
    margin: 0 0 0 0;
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.timeline-card h2 {
    margin: 0;
    font-size: 18px;
}

.timeline-card p {
    margin: 8px 0 0;
    color: #475569;
}

.timeline-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px !important;
}

.timeline-card p .timeline-meta-pill {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    padding: 0 9px;
    margin: 0;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

.timeline-card p .timeline-meta-pill:nth-child(2) {
    border-color: #e0e7ff;
    background: #eef2ff;
    color: #4338ca;
}

.timeline-memo {
    max-width: 760px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.45;
}

.timeline-card p span,
.mobile-item-card p span {
    color: var(--line-strong);
    margin: 0 8px;
}

.timeline-amount {
    text-align: right;
}

.timeline-amount strong,
.timeline-amount span {
    display: block;
}

.timeline-amount strong {
    font-size: 18px;
}

.timeline-amount span {
    margin-top: 18px;
    color: #475569;
    font-size: 13px;
}

.dashboard-timeline {
    border: 0;
    background: transparent;
    overflow: visible;
    display: grid;
    gap: 10px;
}

.dashboard-timeline .timeline-row {
    grid-template-columns: 82px 24px minmax(0, 1fr);
    min-height: 112px;
}

.dashboard-timeline .timeline-card,
.dashboard-timeline .timeline-row.is-featured .timeline-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.dashboard-timeline .timeline-row.is-featured .timeline-card {
    border-color: var(--line);
    box-shadow: var(--shadow-card);
}

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

.dashboard-record-list .empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.dashboard-record-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: stretch;
}

.dashboard-record-left {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
}

.dashboard-record-left::after {
    content: "";
    width: 2px;
    flex: 1 1 auto;
    min-height: 20px;
    margin-top: 6px;
    border-radius: 99px;
    background: #d7dce3;
}

.dashboard-record-icon {
    --record-icon-border: #334155;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    flex: 0 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    border: 2px solid var(--record-icon-border);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.dashboard-record-icon img {
    display: block;
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.dashboard-record-icon-drive {
    --record-icon-border: #24FF75;
}

.dashboard-record-icon-fuel {
    --record-icon-border: #ff9d9d;
}

.dashboard-record-icon-repair {
    --record-icon-border: #87a3ff;
}

.dashboard-record-icon-etc,
.dashboard-record-icon-accident {
    --record-icon-border: #334155;
}

.dashboard-record-icon-insurance {
    --record-icon-border: #7C3AED;
}

.dashboard-record-icon-purchase {
    --record-icon-border: #F59E0B;
}

.dashboard-record-date {
    display: block;
    margin-top: 4px;
    color: #7b8491;
    text-align: center;
    line-height: 1.2;
}

.dashboard-record-date strong,
.dashboard-record-date span {
    display: block;
}

.dashboard-record-date strong {
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-record-date span {
    margin-top: 2px;
    font-size: 12px;
}

.dashboard-record-card {
    min-width: 0;
    display: block;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: #333;
    box-shadow: none;
}

.dashboard-record-card.is-hidden,
.record-card.is-hidden {
    border-color: #fecaca;
    border-left: 4px solid #fca5a5;
    background: #fff7f7;
}

.dashboard-record-row.is-featured .dashboard-record-card {
    border-color: #cbd5e1;
}

.dashboard-record-row.is-featured .dashboard-record-card.is-hidden {
    border-color: #fecaca;
    border-left-color: #fca5a5;
}

.dashboard-record-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-record-title-group {
    min-width: 0;
}

.dashboard-record-title {
    margin: 0;
    color: #303030;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    word-break: keep-all;
}

.dashboard-record-title-tag {
    margin-left: 4px;
    color: #8b8b8b;
    font-size: 0.84em;
    font-weight: 750;
    white-space: nowrap;
}

.dashboard-record-chip {
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 7px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    vertical-align: 1px;
}

.dashboard-record-chip + .dashboard-record-chip,
.dashboard-record-title .dashboard-record-chip {
    margin-left: 4px;
}

.dashboard-record-chip-service {
    border-color: #dbeafe;
    background: #eff6ff;
    color: #2563eb;
}

.dashboard-record-chip-class {
    border-color: #e9d5ff;
    background: #f3e8ff;
    color: #7c3aed;
}

.dashboard-record-title-group-purchase {
    display: grid;
    gap: 5px;
}

.dashboard-record-purchase-chip-row {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.dashboard-record-purchase-chip {
    max-width: 100%;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 7px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
    white-space: normal;
}

.dashboard-record-purchase-chip-vehicle {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.dashboard-record-purchase-chip-vehicle.is-common {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.dashboard-record-purchase-chip-quantity {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.dashboard-record-purchase-title {
    overflow-wrap: anywhere;
}

.dashboard-record-purchase-items {
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    padding: 9px 0 0;
    border-top: 1px dashed #e2e8f0;
    list-style: none;
}

.dashboard-record-purchase-item {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 2px;
    padding-left: 13px;
}

.dashboard-record-purchase-item::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 1px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
}

.dashboard-record-purchase-item strong {
    min-width: 0;
    color: #303030;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dashboard-record-purchase-item span {
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.dashboard-repair-lines {
    display: grid;
    gap: 5px;
}

.dashboard-repair-line {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: #303030;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    word-break: keep-all;
}

.dashboard-repair-category {
    min-width: 0;
    margin-right: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-repair-chips {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.dashboard-record-place {
    margin: 4px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.35;
}

.dashboard-record-meta-line {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.dashboard-record-amount {
    flex: 0 0 auto;
    min-width: 86px;
    color: #303030;
    text-align: right;
}

.dashboard-record-amount strong,
.dashboard-record-amount small {
    display: block;
}

.dashboard-record-amount strong {
    font-size: 16px;
    font-weight: 850;
    line-height: 1.25;
}

.dashboard-record-amount strong.is-zero {
    color: #404040;
}

.dashboard-record-amount small {
    margin-top: 3px;
    color: #888;
    font-size: 12px;
    font-weight: 650;
}

.dashboard-record-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #444;
    font-size: 13px;
    line-height: 1.45;
}

.dashboard-record-info-group {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.dashboard-record-info-group:last-child {
    text-align: right;
}

.dashboard-record-info-line {
    display: flex;
    gap: 6px;
}

.dashboard-record-info-group:last-child .dashboard-record-info-line {
    justify-content: flex-end;
}

.dashboard-record-info-label {
    color: #888;
}

.dashboard-record-info-value {
    color: #4b5563;
}

.dashboard-record-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}

.dashboard-record-detail-badges {
    justify-content: flex-start;
}

.dashboard-record-payment-badges .dashboard-record-mileage-badge {
    margin-left: auto;
}

.dashboard-record-info-badge,
.dashboard-record-paid-badge,
.dashboard-record-discount-badge,
.dashboard-record-mileage-badge {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

.dashboard-record-info-badge {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    color: #2563eb;
}

.dashboard-record-paid-badge {
    border: 1px solid #d1fae5;
    background: #f0fdf4;
    color: #15803d;
}

.dashboard-record-discount-badge {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.dashboard-record-mileage-badge {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.dashboard-record-memo {
    margin: 8px 0 0;
    border-radius: 6px;
    padding: 7px 9px;
    background: #f4f4f4;
    color: #666;
    font-size: 12px;
    line-height: 1.55;
    word-break: break-word;
}

.route-chip-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 5px;
    min-width: 0;
}

.dashboard-route-chips {
    margin-top: 8px;
}

.route-chip {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.route-chip-junction {
    border-color: #ddd6fe;
    border-style: dashed;
    background: #f5f3ff;
    color: #6d28d9;
}

.route-chip-arrow {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

.carwash-process-chip-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.dashboard-carwash-chips {
    margin-top: 8px;
}

.detail-route-card,
.detail-carwash-card {
    display: grid;
    gap: 12px;
}

.detail-route-card .detail-route-chips {
    margin-top: 0;
}

.detail-route-card .route-chip {
    min-height: 22px;
    padding-inline: 6px;
}

.detail-route-card .route-chip-arrow {
    margin-inline: 0;
}

.detail-carwash-chips {
    gap: 7px;
}

.detail-route-chips,
.mobile-detail-process .detail-carwash-chips {
    margin-top: 8px;
}

@media (min-width: 769px) {
    .detail-route-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
        gap: 3px;
        margin-top: 0;
        padding-bottom: 2px;
    }
}

.carwash-process-chip {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1fae5;
    border-radius: 999px;
    padding: 0 9px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.carwash-process-arrow {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

.detail-other-inventory-card {
    display: grid;
    gap: 14px;
}

.other-inventory-detail-list {
    display: grid;
    gap: 10px;
}

.other-inventory-detail-row {
    min-width: 0;
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.other-inventory-detail-title {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.other-inventory-detail-title strong {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.other-inventory-detail-badges {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.other-inventory-detail-badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 9px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11.5px;
    font-weight: 850;
    white-space: nowrap;
}

.other-inventory-detail-badge.is-stock {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.other-inventory-detail-badge.is-direct {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.other-inventory-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
}

.other-inventory-detail-meta div {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 6px 9px;
    background: #f8fafc;
}

.other-inventory-detail-meta dt,
.other-inventory-detail-meta dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
}

.other-inventory-detail-meta dt {
    color: var(--muted);
    font-weight: 750;
}

.other-inventory-detail-meta dd {
    color: var(--text);
    font-weight: 850;
}

.other-inventory-detail-meta .other-inventory-detail-memo {
    flex: 1 1 260px;
    border-radius: 8px;
}

.other-inventory-detail-memo dd {
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .other-inventory-detail-title {
        display: grid;
        gap: 8px;
    }

    .other-inventory-detail-badges {
        justify-content: flex-start;
    }

    .other-inventory-detail-meta div {
        border-radius: 8px;
    }
}

.badge-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.badge,
.badge-line em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 6px;
    padding: 0 9px;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.badge-blue {
    color: #1d4ed8;
    background: var(--blue-soft);
}

.badge-green {
    color: #15803d;
    background: var(--green-soft);
}

.badge-purple {
    color: #6d28d9;
    background: var(--purple-soft);
}

.badge-orange {
    color: #c2410c;
    background: #ffedd5;
}

.badge-gray {
    color: #475569;
    background: var(--gray-soft);
}

.badge-red {
    color: #b91c1c;
    background: var(--red-soft);
}

.blue-text {
    color: var(--blue);
}

.green-text {
    color: var(--green);
}

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

.detail-card,
.form-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.detail-card {
    margin-bottom: 18px;
    padding: 22px;
}

.detail-page-header {
    margin-bottom: 16px;
}

.detail-page-header h1 {
    font-size: 26px;
}

.detail-card h2,
.form-card h2 {
    margin: 0;
    color: var(--blue);
    font-size: 18px;
}

.detail-attachment-card {
    display: grid;
    gap: 12px;
}

.detail-attachment-content {
    color: var(--text);
    font-weight: 750;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.mobile-meta article > p a,
.detail-attachment-content a {
    overflow-wrap: anywhere;
}

.attachment-form-preview {
    margin-top: 10px;
}

.other-attachment-preview {
    grid-column: 1 / -1;
}

.insurance-attachment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.insurance-attachment-fields label {
    display: grid;
    gap: 7px;
}

.insurance-attachment-fields .field-help {
    grid-column: 1 / -1;
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.attachment-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 10px;
}

.attachment-preview-card {
    position: relative;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.attachment-preview-link {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.attachment-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.attachment-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview-card--pdf .attachment-thumb {
    border-color: #fed7aa;
    background: #fff7ed;
}

.attachment-file-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.attachment-preview-card--pdf .attachment-file-fallback {
    color: #ea580c;
}

.attachment-name {
    min-width: 0;
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-delete-button {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    color: #ef4444;
    cursor: pointer;
}

.attachment-delete-button .icon {
    width: 15px;
    height: 15px;
}

.attachment-preview-link:focus-visible,
.attachment-delete-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

.attachment-delete-button:hover {
    border-color: #fca5a5;
    background: #fff7f7;
}

.attachment-delete-form {
    display: none;
}

.attachment-empty {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 700px) {
    .insurance-attachment-fields {
        grid-template-columns: 1fr;
    }
}

.form-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.form-card-title-row h2 {
    min-width: 0;
    margin-bottom: 0;
}

.form-card label.record-hidden-chip {
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.record-hidden-chip input[type="checkbox"] {
    position: absolute;
    width: 1px;
    min-width: 1px;
    height: 1px;
    min-height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.form-card label.record-hidden-chip span {
    margin: 0;
    color: inherit;
    font: inherit;
    line-height: 1;
}

.form-card label.record-hidden-chip:has(input:checked) {
    border-color: #fecaca;
    background: #fff7f7;
    color: #dc2626;
    box-shadow: inset 0 0 0 1px #fee2e2;
}

.form-card label.record-hidden-chip:focus-within {
    outline: 2px solid rgba(37, 99, 235, 0.18);
    outline-offset: 2px;
}

.insurance-type-field {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.insurance-type-field legend {
    margin: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.insurance-type-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.insurance-premium-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f8fbff 0, #fff 100%);
}

.insurance-premium-panel h3 {
    margin: 0;
    color: var(--blue);
    font-size: 16px;
}

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

.insurance-standard-panel,
.insurance-coverage-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.insurance-standard-panel h3,
.insurance-coverage-panel h3,
.insurance-coverage-panel h4 {
    margin: 0;
    color: var(--blue);
}

.insurance-standard-panel h3,
.insurance-coverage-panel h3 {
    font-size: 16px;
}

.insurance-standard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.insurance-coverage-panel .section-title-row {
    align-items: flex-start;
    margin-bottom: 0;
}

.insurance-coverage-group {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    background: #f8fbff;
}

.insurance-coverage-panel h4 {
    font-size: 14px;
}

.insurance-coverage-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.insurance-coverage-group-title .small-button {
    flex: 0 0 auto;
}

.insurance-coverage-list {
    display: grid;
    gap: 6px;
}

.insurance-coverage-head {
    display: grid;
    grid-template-columns: minmax(150px, 1.05fr) minmax(220px, 1.45fr) 128px 40px;
    gap: 8px;
    padding: 0 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.insurance-coverage-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.05fr) minmax(220px, 1.45fr) 128px 40px;
    align-items: end;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.insurance-coverage-row--special {
    align-items: center;
    padding: 6px 10px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.insurance-coverage-row--special:last-child {
    border-bottom: 0;
}

.insurance-coverage-row--special label {
    gap: 0;
}

.insurance-coverage-row label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.insurance-coverage-row label > span:first-child {
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

.insurance-coverage-row input,
.insurance-coverage-row textarea {
    width: 100%;
    min-height: var(--control-height-compact);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    padding: 0 11px;
    background: var(--surface);
    color: var(--text);
}

.insurance-coverage-row textarea {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
}

.insurance-coverage-row input:focus,
.insurance-coverage-row textarea:focus {
    border-color: #93c5fd;
    outline: 0;
    box-shadow: var(--focus-ring);
}

.insurance-coverage-row .readonly-field {
    background: #f8fafc;
    color: #334155;
}

.insurance-coverage-remove {
    align-self: end;
}

.insurance-standard-summary,
.insurance-standard-detail dd {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.insurance-standard-summary {
    margin-top: 12px;
}

.insurance-standard-summary span,
.insurance-standard-detail span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fbff;
    color: #475569;
    font-size: 12.5px;
    font-weight: 800;
}

.insurance-standard-summary strong,
.insurance-standard-detail strong {
    color: var(--text);
}

.insurance-coverage-detail-card {
    display: grid;
    gap: 14px;
}

.insurance-coverage-detail-groups {
    display: grid;
    gap: 14px;
}

.insurance-coverage-detail-group {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    background: #f8fbff;
}

.insurance-coverage-detail-group h3 {
    margin: 0;
    color: var(--blue);
    font-size: 14px;
}

.insurance-coverage-detail-list {
    display: grid;
    gap: 8px;
}

.insurance-coverage-detail-row {
    display: grid;
    grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) 138px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.insurance-coverage-detail-row--vehicle {
    grid-template-columns: minmax(0, 1fr) 138px;
}

.insurance-coverage-detail-title {
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
}

.insurance-coverage-detail-limit {
    min-width: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insurance-coverage-detail-row--vehicle .insurance-coverage-detail-limit {
    font-weight: 800;
    color: var(--text);
}

.insurance-coverage-detail-premium {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    text-align: right;
}

.insurance-coverage-detail-premium span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.insurance-coverage-detail-premium strong {
    white-space: nowrap;
    font-size: 14px;
}

.muted-text {
    color: #94a3b8 !important;
}

.insurance-date-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.section-subtext {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.empty-inline {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 13px;
}

.insurance-roadside-card {
    display: grid;
    gap: 14px;
}

.insurance-roadside-form {
    display: grid;
    grid-template-columns: minmax(128px, .9fr) minmax(112px, .75fr) minmax(118px, .75fr) minmax(108px, .7fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.insurance-roadside-form button {
    min-width: 132px;
}

.insurance-roadside-form label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.insurance-roadside-form label > span:first-child {
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

.insurance-roadside-form input,
.insurance-roadside-form select {
    width: 100%;
    min-height: var(--control-height-compact);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    padding: 0 11px;
    background: var(--surface);
    color: var(--text);
}

.insurance-roadside-form input:focus,
.insurance-roadside-form select:focus {
    border-color: #93c5fd;
    outline: 0;
    box-shadow: var(--focus-ring);
}

.insurance-roadside-form .input-icon-field input {
    min-height: var(--control-height-compact);
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.insurance-roadside-form .input-icon-field input:focus {
    outline: 0;
    box-shadow: none;
}

.insurance-roadside-list {
    display: grid;
    gap: 10px;
}

.insurance-roadside-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card-soft);
}

.insurance-roadside-item > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 10px;
    min-width: 0;
}

.insurance-roadside-item strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 850;
    white-space: nowrap;
}

.insurance-roadside-item > div span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.insurance-roadside-item p {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.insurance-roadside-item p span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.insurance-roadside-item form {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.insurance-roadside-item .icon-button.danger {
    color: var(--red);
}

.two-column-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 18px;
}

.two-column-info dl {
    margin: 0;
}

.two-column-info dl.detail-full-row {
    grid-column: 1 / -1;
}

.two-column-info div {
    display: grid;
    grid-template-columns: 140px 1fr;
    border-bottom: 1px solid var(--line);
}

.two-column-info dt,
.two-column-info dd {
    margin: 0;
    padding: 12px 14px;
}

.two-column-info dt {
    background: #f8fafc;
    font-weight: 800;
}

.two-column-info dd {
    min-width: 0;
}

.detail-info-card,
.detail-items-card {
    font-size: 14px;
}

.detail-info-card,
.detail-items-card {
    padding: 20px;
}

.detail-info-card > h2,
.detail-items-card h2 {
    font-size: 17px;
}

.detail-info-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 18px;
    margin-top: 16px;
}

.insurance-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 24px;
}

.insurance-detail-layout .two-column-info {
    grid-template-columns: minmax(220px, 0.86fr) minmax(0, 1.14fr);
}

.insurance-detail-layout .two-column-info dl {
    display: block;
}

.insurance-detail-layout .two-column-info dl.detail-full-row {
    grid-column: 1 / -1;
    display: block;
}

.insurance-detail-layout .two-column-info dl.detail-full-row div:last-child {
    grid-column: 1 / -1;
}

.insurance-detail-layout .detail-amount-summary {
    width: 100%;
    max-width: 360px;
    justify-self: end;
}

.detail-info-card .two-column-info {
    grid-template-columns: minmax(220px, 0.86fr) minmax(0, 1.14fr);
    gap: 18px;
    margin-top: 0;
}

.detail-info-card .two-column-info div {
    grid-template-columns: minmax(122px, 140px) minmax(0, 1fr);
}

.detail-info-card .two-column-info dl.detail-full-row div {
    grid-template-columns: minmax(96px, 112px) minmax(0, 1fr);
}

.detail-info-card .two-column-info dt,
.detail-info-card .two-column-info dd {
    padding: 10px 12px;
    font-size: 13.5px;
    line-height: 1.55;
}

.detail-info-card .two-column-info dt {
    font-weight: 760;
}

.insurance-detail-layout .two-column-info {
    grid-template-columns: minmax(220px, 0.86fr) minmax(0, 1.14fr);
}

.insurance-detail-layout .two-column-info dl {
    display: block;
}

.detail-amount-summary {
    border: 1px solid #a78bfa;
    border-radius: var(--radius);
    padding: 16px;
    background: linear-gradient(180deg, #fff 0, #fdfcff 100%);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.08);
}

.detail-amount-summary h2 {
    margin: 0 0 12px;
    color: var(--purple);
    font-size: 16px;
}

.detail-amount-summary dl {
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #ddd6fe;
    border-radius: var(--radius);
    background: #fff;
}

.detail-amount-summary dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.detail-amount-summary dl div:last-child {
    border-bottom: 0;
}

.detail-amount-summary dl div.accident-summary-breakdown-title {
    margin-top: 4px;
    padding-top: 11px;
}

.detail-amount-summary dl div.accident-summary-breakdown-title dt {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.detail-amount-summary dl div.accident-summary-subrow {
    padding: 6px 0;
}

.detail-amount-summary dl div.accident-summary-subrow dt,
.detail-amount-summary dl div.accident-summary-subrow dd {
    color: #64748b;
    font-size: 12.5px;
    font-weight: 780;
}

.detail-amount-summary dt,
.detail-amount-summary dd {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.detail-amount-summary dt {
    font-weight: 760;
}

.detail-amount-summary dd {
    text-align: right;
    white-space: nowrap;
    font-weight: 850;
}

.detail-amount-summary p {
    margin: 12px 0 0;
    color: #475569;
    font-size: 12.5px;
    line-height: 1.6;
}

.detail-amount-summary p span {
    display: block;
    margin-top: 2px;
    text-align: right;
}

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

.table-scroll {
    overflow-x: auto;
}

.item-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    font-size: 14px;
}

.item-table th,
.item-table td {
    border: 1px solid var(--line);
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.item-table th {
    background: #f8fafc;
    font-weight: 850;
}

.detail-items-card .section-title-row {
    margin-bottom: 12px;
}

.detail-items-card .item-table {
    min-width: 980px;
    font-size: 13px;
}

.detail-items-card .item-table th,
.detail-items-card .item-table td {
    padding: 10px 9px;
    line-height: 1.45;
}

.detail-items-card .metric-table {
    min-width: 760px;
}

.repair-group-list {
    display: grid;
    gap: 14px;
}

.accident-linked-repair-list {
    display: grid;
    gap: 14px;
}

.accident-linked-repair-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.accident-linked-repair-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.accident-linked-repair-header h3,
.accident-linked-repair-header p {
    margin: 0;
}

.accident-linked-repair-header h3 {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.45;
}

.accident-linked-repair-header h3 a {
    color: inherit;
    text-decoration: none;
}

.accident-linked-repair-header h3 a:hover {
    color: var(--blue);
}

.accident-linked-repair-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.accident-linked-repair-header > strong {
    flex: 0 0 auto;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.accident-linked-repair-table-wrap {
    overflow-x: auto;
}

.accident-linked-repair-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.accident-linked-repair-table th,
.accident-linked-repair-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px 11px;
    text-align: left;
    vertical-align: middle;
    line-height: 1.45;
}

.accident-linked-repair-table th {
    background: #fff;
    color: #475569;
    font-size: 12.5px;
    font-weight: 850;
}

.accident-linked-repair-table tbody tr:last-child td {
    border-bottom: 0;
}

.accident-linked-repair-table th:nth-child(1) {
    width: auto;
}

.accident-linked-repair-table th:nth-child(2),
.accident-linked-repair-table th:nth-child(3) {
    width: 90px;
}

.accident-linked-repair-table th:nth-child(4) {
    width: 64px;
}

.accident-linked-repair-table th:nth-child(5) {
    width: 110px;
}

.accident-linked-repair-table th:nth-child(6) {
    width: 24%;
}

.accident-cost-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.accident-cost-summary > div {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.accident-cost-summary span,
.accident-cost-summary strong {
    display: block;
    min-width: 0;
}

.accident-cost-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.accident-cost-summary strong {
    margin-top: 5px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.accident-cost-list {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.accident-cost-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.accident-cost-form {
    display: grid;
    grid-template-columns: 128px 124px 124px 120px minmax(180px, 1fr) 92px auto;
    gap: 8px;
    align-items: end;
    min-width: 0;
}

.accident-cost-form-new {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed #bfdbfe;
    border-radius: var(--radius);
    background: #f8fbff;
}

.accident-cost-form label {
    min-width: 0;
    gap: 5px;
}

.accident-cost-form input,
.accident-cost-form select {
    width: 100%;
    height: var(--control-height);
    min-height: var(--control-height);
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    padding: 0 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.accident-cost-form input:focus,
.accident-cost-form select:focus {
    border-color: #93c5fd;
    outline: 0;
    background: #fff;
    box-shadow: var(--focus-ring);
}

.accident-cost-form input[type="date"] {
    line-height: var(--control-height);
}

.accident-cost-form .chip-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: var(--control-height);
    height: var(--control-height);
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 850;
    align-self: end;
    cursor: pointer;
    user-select: none;
}

.accident-cost-form .chip-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.accident-cost-form .chip-checkbox:has(input:checked) {
    border-color: #93c5fd;
    background: #eff6ff;
    color: var(--blue);
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.accident-cost-form .chip-checkbox.is-disabled {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    cursor: default;
    box-shadow: none;
}

.accident-cost-form .chip-checkbox:focus-within {
    outline: 2px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.accident-cost-form .ghost-button,
.accident-cost-form .primary-button {
    min-height: var(--control-height);
    height: var(--control-height);
    white-space: nowrap;
}

.repair-group-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.repair-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.repair-group-title {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.45;
}

.repair-group-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-width: max-content;
}

.repair-group-table-wrap {
    overflow-x: auto;
}

.repair-group-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.repair-group-table th,
.repair-group-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px 11px;
    text-align: left;
    vertical-align: middle;
    line-height: 1.45;
}

.repair-group-table th {
    background: #fff;
    color: #475569;
    font-size: 12.5px;
    font-weight: 850;
}

.repair-group-table tbody tr:last-child td {
    border-bottom: 0;
}

.repair-group-table .repair-col-name {
    width: auto;
}

.repair-group-table .repair-col-pay {
    width: 104px;
}

.repair-group-table .repair-col-quantity {
    width: 58px;
}

.repair-group-table .repair-col-unit,
.repair-group-table .repair-col-total {
    width: 108px;
}

.repair-group-table .repair-col-memo {
    width: 180px;
}

.repair-group-table .repair-col-action {
    width: 48px;
}

.repair-group-item-name {
    color: #0f172a;
    font-weight: 760;
}

.repair-group-table .number-cell,
.repair-group-table .money-cell,
.repair-group-table .action-cell {
    text-align: center;
    white-space: nowrap;
}

.repair-group-table .pay-cell {
    text-align: center;
}

.repair-group-table .pay-cell em {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 760;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.repair-group-table .money-cell {
    text-align: right;
}

.repair-group-table .empty-column-heading,
.repair-group-table .empty-column-cell {
    color: transparent;
    pointer-events: none;
}

.repair-group-table .unit-price-cell span,
.repair-group-table .unit-price-cell em {
    display: block;
}

.repair-group-table .unit-price-cell em {
    width: max-content;
    margin: 4px 0 0 auto;
    border-radius: 999px;
    padding: 2px 7px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.35;
    white-space: nowrap;
}

.repair-group-table .memo-cell {
    color: #475569;
    overflow-wrap: anywhere;
}

.repair-group-table .badge {
    min-height: 22px;
    padding: 0 8px;
    font-size: 11.5px;
}

.repair-group-table .icon-link {
    width: 30px;
    height: 30px;
}

.repair-group-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: #fbfdff;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.repair-group-total strong {
    color: var(--blue);
    font-size: 15px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
}

.icon-link:hover {
    background: var(--gray-soft);
}

.login-body {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(120deg, rgba(37, 99, 235, 0.08), transparent 42%),
        linear-gradient(300deg, rgba(22, 163, 74, 0.08), transparent 45%),
        #f8fafc;
}

.login-shell {
    width: min(920px, calc(100vw - 32px));
}

.login-panel {
    display: grid;
    grid-template-columns: 1fr 380px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}

.login-copy {
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 44px;
    background:
        linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.78)),
        url("../img/car-placeholder.svg") center / cover no-repeat;
    color: #fff;
}

.login-copy .eyebrow {
    margin: 0 0 10px;
    font-weight: 850;
}

.login-copy h1 {
    margin: 0;
    font-size: 42px;
}

.login-copy p:last-child {
    margin: 12px 0 0;
    color: #e2e8f0;
}

.login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 40px;
}

.login-form label,
.form-card label {
    display: grid;
    gap: 8px;
}

.login-form span,
.form-card label span {
    color: #334155;
    font-weight: 800;
    font-size: 13px;
}

.login-form input:not([type="checkbox"]) {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px;
}

.login-remember {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
    width: fit-content;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.login-remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--blue);
}

.login-remember span {
    font-size: 13px;
}

.form-error {
    margin: 0;
    color: var(--red);
    font-weight: 700;
}

.form-success {
    margin: 0;
    color: #166534;
    font-weight: 800;
}

.repair-form {
    display: grid;
    gap: 18px;
}

.repair-form-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 18px;
    align-items: start;
}

.form-card {
    padding: 22px;
}

.form-card h2 {
    margin-bottom: 18px;
}

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

.span-2 {
    grid-column: span 2;
}

.repair-total-card {
    padding: 18px 20px;
}

.repair-total-card h2 {
    margin-bottom: 12px;
}

.repair-total-summary {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}

.repair-form-top-grid .repair-total-summary {
    grid-template-columns: 1fr;
    gap: 14px;
}

.receipt-paid-field {
    display: grid;
    gap: 8px;
}

.money-input-field {
    position: relative;
    display: block;
}

.money-input-field input {
    padding-right: 38px;
}

.money-input-field em {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    pointer-events: none;
}

.repair-total-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.repair-total-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 26px;
}

.repair-total-list dt,
.repair-total-list dd {
    margin: 0;
}

.repair-total-list dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.repair-total-list dd {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.repair-total-list dd.is-negative {
    color: #dc2626;
}

.repair-total-list dd.is-positive {
    color: #2563eb;
}

.repair-total-final {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #dbe3ef;
}

.repair-total-final dt {
    color: var(--ink);
}

.repair-total-final dd {
    font-size: 18px;
}

.inline-total-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 16px 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.inline-total-preview div {
    padding: 14px;
    background: #f8fafc;
    border-right: 1px solid var(--line);
}

.inline-total-preview div:last-child {
    border-right: 0;
}

.inline-total-preview dt,
.inline-total-preview dd {
    margin: 0;
}

.inline-total-preview dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.inline-total-preview dd {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 850;
}

.refuel-top-preview {
    margin: 0 0 16px;
}

.item-category-list,
.item-editor-list {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.item-category-list {
    counter-reset: repair-category;
}

.item-category-group {
    counter-increment: repair-category;
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    margin-bottom: 8px;
    border: 1px solid #d7e2f0;
    border-radius: var(--radius);
    background: #f8fbff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.item-category-group:last-child {
    margin-bottom: 0;
}

.item-category-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: center;
}

.item-category-index {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.item-category-index::before {
    content: "#" counter(repair-category);
}

.item-category-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.item-category-group-summary {
    min-width: 0;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.item-category-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto 1px auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.item-category-group.has-accident-link .item-category-controls {
    grid-template-columns: minmax(180px, 1fr) auto 1px auto minmax(240px, 360px);
}

.item-category-select-field {
    display: block;
    min-width: 0;
}

.item-category-select-field select {
    width: 100%;
}

.repair-accident-link-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.repair-accident-link-field[hidden] {
    display: none;
}

.repair-accident-link-field span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.repair-accident-link-field select {
    width: 100%;
}

.repair-form .item-category-controls select,
.repair-form .item-category-controls .repair-choice-button,
.repair-form .item-category-actions .ghost-button {
    min-height: 38px;
    height: 38px;
}

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

.item-category-meta {
    display: contents;
}

.repair-inline-choice {
    min-width: 0;
}

.item-category-choice-divider {
    width: 1px;
    height: 28px;
    background: #cbd5e1;
}

.repair-choice-box {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: #fff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.repair-choice-box--process {
    border-color: #c7d2fe;
    background: linear-gradient(180deg, #fff 0, #f8faff 100%);
}

.repair-choice-box--work {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #fff 0, #f7fef9 100%);
}

.repair-choice-box legend {
    display: flex;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
}

.repair-choice-title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.repair-choice-subtitle {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.item-category-meta .repair-choice-buttons {
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.item-category-meta .repair-choice-button {
    flex: 0 0 auto;
    min-width: 68px;
    min-height: 38px;
    padding: 0 8px;
}

.repair-inline-choice--work .repair-choice-button {
    min-width: 76px;
}

.repair-inline-choice--process .repair-choice-button {
    border-color: #bfdbfe;
    background: #fff;
    color: #1e40af;
}

.repair-inline-choice--process .repair-choice-button.is-selected {
    border-color: #93c5fd;
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.repair-inline-choice--work .repair-choice-button {
    border-color: #bbf7d0;
    background: #fff;
    color: #166534;
}

.repair-inline-choice--work .repair-choice-button.is-selected {
    border-color: #86efac;
    background: #dcfce7;
    color: #15803d;
    box-shadow: inset 0 0 0 1px #bbf7d0;
}

.ghost-button.danger {
    color: var(--red);
}

.item-editor-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 42px;
    gap: 10px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.repair-form .item-editor-row {
    background: #fff;
}

.repair-form .item-editor-row label {
    gap: 5px;
}

.item-editor-row label,
.item-editor-row fieldset {
    min-width: 0;
}

.item-editor-row .item-full {
    grid-column: 1 / span 4;
    min-width: 0;
}

.item-editor-row .item-half {
    grid-column: span 2;
}

.item-editor-row > label.item-name-field.item-full {
    grid-column: 1 / span 4;
    grid-row: 1;
    align-self: start;
}

.item-cost-vat-row {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 6px;
    align-items: end;
    justify-content: start;
}

.item-cost-vat-row > * {
    min-width: 0;
}

.item-cost-vat-row .repair-choice-buttons {
    flex-wrap: nowrap;
}

.item-cost-vat-row .repair-choice-button {
    flex: 0 0 auto;
    min-width: 0;
    padding: 0 10px;
}

.item-cost-vat-row .repair-toggle-choice-button {
    min-width: 78px;
    border-color: #d5dde8;
    background: #fff;
    color: #475569;
}

.item-cost-vat-row .repair-toggle-choice-button.is-selected {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.item-vat-toggle .repair-toggle-choice-button.is-selected {
    border-color: #fdba74;
    background: #fff7ed;
    color: #c2410c;
    box-shadow: inset 0 0 0 1px #fed7aa;
}

.item-choice-field {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
}

.item-choice-field legend {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.repair-choice-group {
    min-width: 0;
}

.repair-choice-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.repair-choice-button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 11px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.repair-choice-button.is-selected {
    border-color: #93c5fd;
    background: #eff6ff;
    color: var(--blue);
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.repair-form .item-editor-row input,
.repair-form .item-editor-row select,
.repair-form .item-editor-row .repair-choice-button,
.repair-form .item-editor-row .icon-button {
    min-height: 38px;
    height: 38px;
}

.repair-form .item-editor-row input {
    padding-top: 0;
    padding-bottom: 0;
}

.repair-form .remove-item-button {
    width: 38px;
}

.repair-form .item-inventory-field .purchase-product-select-button {
    min-height: 38px;
    height: 38px;
}

.inventory-product-control {
    position: relative;
    min-width: 0;
}

.inventory-product-control .purchase-product-select-button {
    padding-right: 58px;
}

.inventory-product-control .purchase-product-select-button.is-empty {
    padding-right: 14px;
}

.inventory-product-control .inventory-picker-clear-button {
    position: absolute;
    top: 50%;
    right: 6px;
    min-height: 28px;
    height: 28px;
    padding: 0 9px;
    transform: translateY(-50%);
    font-size: 12px;
}

.inventory-product-control .inventory-picker-clear-button[hidden] {
    display: none !important;
}

.item-inventory-field select {
    width: 100%;
}

.item-inventory-use-field input {
    text-align: right;
}

.item-inventory-apply-field {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    align-self: end;
    gap: 7px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: #1e40af;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.item-inventory-apply-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.item-inventory-apply-field:has(input:disabled) {
    opacity: 0.58;
}

.repair-inventory-note {
    display: block;
    margin-top: 5px;
    color: #2563eb;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.45;
}

.item-amount-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(112px, 128px);
    gap: 8px;
    align-items: end;
}

.item-editor-row.is-warranty .item-amount-row {
    grid-template-columns: 64px;
}

.item-amount-row > label {
    min-width: 0;
}

.item-quantity-field {
    order: 1;
}

.item-unit-price-field {
    order: 2;
}

.item-total-price-field {
    order: 3;
}

.item-amount-row input {
    padding-left: 8px;
    padding-right: 8px;
}

.item-amount-row [data-item-total] {
    min-width: 0;
    white-space: nowrap;
    text-align: right;
}

.item-quantity-field input {
    text-align: center;
}

.item-editor-row [hidden] {
    display: none !important;
}

.repair-form .item-editor-row.has-inventory-product .item-name-field,
.repair-form .item-editor-row.has-inventory-product .item-amount-row,
.repair-form .item-editor-row.has-inventory-product .item-cost-vat-row,
.repair-form .item-editor-row.has-inventory-product .item-purchase-field {
    display: none !important;
}

.repair-form .item-editor-row.has-inventory-product .item-inventory-use-field input {
    width: 64px;
    min-width: 54px;
    text-align: right;
}

.repair-form .item-editor-row.has-inventory-product .item-memo-field {
    min-width: 0;
}

.remove-item-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--red);
    grid-column: 5;
    grid-row: 1;
    justify-self: end;
}

input.is-readonly {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

@media (min-width: 1181px) {
    .repair-form .item-editor-row {
        grid-template-columns:
            minmax(260px, 2.2fr)
            58px
            minmax(96px, 0.58fr)
            minmax(108px, 0.62fr)
            82px
            82px
            minmax(120px, 0.55fr)
            minmax(120px, 0.55fr)
            42px;
        align-items: end;
        column-gap: 12px;
        row-gap: 8px;
    }

    .repair-form .item-editor-row .item-full,
    .repair-form .item-editor-row > label.item-full,
    .repair-form .item-editor-row > .item-full {
        grid-column: auto;
    }

    .repair-form .item-editor-row > label.item-name-field.item-full {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
    }

    .repair-form .item-editor-row .repair-price-row {
        display: contents;
    }

    .repair-form .repair-price-row > label {
        grid-row: 1;
    }

    .repair-form .item-unit-price-field {
        grid-column: 3;
    }

    .repair-form .item-quantity-field {
        grid-column: 2;
    }

    .repair-form .item-total-price-field {
        grid-column: 4;
    }

    .repair-form .item-editor-row > label.item-memo-field.item-full {
        grid-column: 7 / 9;
        grid-row: 1;
        align-self: end;
        min-width: 0;
        margin-left: 10px;
    }

    .repair-form .item-cost-vat-row {
        display: contents;
    }

    .repair-form .item-cost-vat-row > * {
        grid-row: 1;
        align-self: end;
    }

    .repair-form .item-pay-toggle {
        grid-column: 5;
    }

    .repair-form .item-vat-toggle {
        grid-column: 6;
    }

    .repair-form .item-editor-row > label.item-purchase-field.item-full {
        grid-column: 7;
        grid-row: 1;
        align-self: end;
        min-width: 0;
        margin-left: 10px;
    }

    .repair-form .item-editor-row.is-direct-purchase > label.item-memo-field.item-full {
        grid-column: 8;
        margin-left: 0;
    }

    .repair-form .remove-item-button {
        grid-column: 9;
        grid-row: 1;
        align-self: end;
        justify-self: end;
    }

    .repair-form .item-editor-row > label.item-inventory-field.item-full {
        grid-column: 1 / 5;
        grid-row: 2;
        align-self: end;
    }

    .repair-form .item-inventory-use-field {
        grid-column: 5;
        grid-row: 2;
        align-self: end;
    }

    .repair-form .item-inventory-apply-field {
        grid-column: 6 / 8;
        grid-row: 2;
        justify-self: start;
    }

    .repair-form .item-editor-row.is-warranty {
        grid-template-columns: minmax(180px, 1fr) 58px minmax(0, 1fr) minmax(96px, 0.62fr) 42px;
    }

    .repair-form .item-editor-row.is-warranty .item-quantity-field {
        grid-column: 2;
    }

    .repair-form .item-editor-row.is-warranty > label.item-memo-field.item-full {
        grid-column: 3;
    }

    .repair-form .item-editor-row.is-warranty > label.item-inventory-field.item-full {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    .repair-form .item-editor-row.is-warranty .item-inventory-use-field {
        grid-column: 3;
        grid-row: 2;
    }

    .repair-form .item-editor-row.is-warranty .item-inventory-apply-field {
        grid-column: 4;
        grid-row: 2;
    }

    .repair-form .item-editor-row.is-warranty .remove-item-button {
        grid-column: 5;
    }

    .repair-form .item-editor-row.has-inventory-product {
        grid-template-columns:
            minmax(260px, 2.2fr)
            58px
            minmax(96px, 0.58fr)
            minmax(108px, 0.62fr)
            82px
            82px
            minmax(120px, 0.55fr)
            minmax(120px, 0.55fr)
            42px;
        align-items: end;
        column-gap: 12px;
        row-gap: 0;
    }

    .repair-form .item-editor-row.has-inventory-product > label.item-inventory-field.item-full {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
    }

    .repair-form .item-editor-row.has-inventory-product .item-inventory-use-field {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        width: auto;
    }

    .repair-form .item-editor-row.has-inventory-product .inventory-reference-grid {
        display: contents;
    }

    .repair-form .item-editor-row.has-inventory-product .inventory-reference-grid label:nth-of-type(1) {
        grid-column: 3;
        grid-row: 1;
        align-self: end;
    }

    .repair-form .item-editor-row.has-inventory-product .inventory-reference-grid label:nth-of-type(2) {
        grid-column: 4;
        grid-row: 1;
        align-self: end;
    }

    .repair-form .item-editor-row.has-inventory-product .item-inventory-apply-field {
        grid-column: 5 / 7;
        grid-row: 1;
        align-self: end;
        justify-self: stretch;
        justify-content: center;
        width: 100%;
    }

    .repair-form .item-editor-row.has-inventory-product > label.item-memo-field.item-full {
        grid-column: 7 / 9;
        grid-row: 1;
        align-self: end;
        margin-left: 0;
    }

    .repair-form .item-editor-row.has-inventory-product .remove-item-button {
        grid-column: 9;
        grid-row: 1;
        align-self: end;
    }

    .repair-form .item-editor-row.has-inventory-product.is-insurance > label.item-memo-field.item-full {
        grid-column: 5 / 9;
    }

    .repair-form .item-editor-row.has-inventory-product.is-warranty {
        grid-template-columns: minmax(260px, 2fr) 58px minmax(160px, 1fr) 42px;
    }

    .repair-form .item-editor-row.has-inventory-product.is-warranty > label.item-inventory-field.item-full {
        grid-column: 1;
    }

    .repair-form .item-editor-row.has-inventory-product.is-warranty .item-inventory-use-field {
        grid-column: 2;
    }

    .repair-form .item-editor-row.has-inventory-product.is-warranty > label.item-memo-field.item-full {
        grid-column: 3;
    }

    .repair-form .item-editor-row.has-inventory-product.is-warranty .remove-item-button {
        grid-column: 4;
    }
}

.sticky-form-actions {
    position: sticky;
    bottom: 18px;
    z-index: var(--z-sticky-actions);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sticky);
}

@media (min-width: 761px) {
    .record-form .sticky-form-actions {
        justify-content: space-between;
    }
}

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

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    background: rgba(15, 23, 42, 0.58);
}

.drawer-backdrop[hidden] {
    display: none;
}

.app-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-modal);
    width: min(360px, 86vw);
    height: 100dvh;
    overflow-y: auto;
    background: #fff;
    box-shadow: var(--shadow-drawer);
    transform: translateX(-105%);
    transition: transform 160ms ease;
}

.app-drawer.is-open {
    transform: translateX(0);
}

.drawer-account {
    display: grid;
    gap: 10px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.drawer-account-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.drawer-account strong {
    min-width: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-account-row a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.drawer-account select {
    width: 100%;
    height: 44px;
    min-height: 44px;
    display: block;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0 38px 0 12px;
    background: #fff;
    box-sizing: border-box;
    color: #0f172a;
    font-size: 16px;
    font-family: inherit;
    line-height: 44px;
    appearance: none;
    -webkit-appearance: none;
}

.logout-pill {
    justify-self: center;
    min-width: 132px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
}

.drawer-record-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 18px 6px;
}

.drawer-record-link,
.drawer-menu a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    border-radius: var(--radius);
    padding: 0 12px;
    border: 1px solid var(--line);
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.drawer-record-link .icon,
.drawer-menu a .icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.drawer-record-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-menu a span {
    min-width: 0;
    line-height: 1.25;
}

.drawer-record-link.is-active {
    border-color: rgba(37, 99, 235, 0.24);
    background: var(--blue-soft);
    color: var(--blue);
}

.drawer-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 18px 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
}

.drawer-drive-menu {
    margin-top: 8px;
    padding-top: 0;
    padding-bottom: 20px;
    border-top: 0;
}

.drawer-section-label {
    margin: 14px 18px 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.drawer-menu a {
    min-width: 0;
}

.drawer-menu a:hover {
    border-color: rgba(37, 99, 235, 0.32);
    background: var(--blue-soft);
    color: var(--blue);
}

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

.dashboard-card,
.settings-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.dashboard-card {
    position: relative;
    padding: 20px;
    min-width: 0;
    padding-left: 70px;
}

.dashboard-card p,
.dashboard-card strong,
.dashboard-card small {
    margin: 0;
}

.dashboard-card p {
    color: var(--muted);
    font-weight: 800;
}

.dashboard-card strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}

.dashboard-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.dashboard-card-icon {
    position: absolute;
    top: 50%;
    left: 20px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transform: translateY(-50%);
}

.dashboard-card-icon .icon {
    width: 20px;
    height: 20px;
}

.dashboard-icon-total,
.dashboard-icon-fuel {
    background: #2563eb;
}

.dashboard-icon-repair {
    background: #3b82f6;
}

.dashboard-icon-etc {
    background: #64748b;
}

.vehicle-summary-card {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

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

.vehicle-summary-head h2,
.vehicle-summary-head p {
    margin: 0;
}

.vehicle-summary-head h2 {
    font-size: 17px;
    color: var(--blue);
}

.vehicle-summary-head p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.vehicle-summary-head > span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px;
    background: var(--surface-soft);
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.vehicle-summary-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 12px;
}

.vehicle-metric {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    min-height: 102px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.vehicle-metric p,
.vehicle-metric strong,
.vehicle-metric small,
.vehicle-metric dl {
    margin: 0;
}

.vehicle-metric p {
    color: #475569;
    font-size: 13px;
    font-weight: 850;
}

.vehicle-metric strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    line-height: 1.2;
}

.vehicle-metric small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.vehicle-metric-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
}

.vehicle-metric-icon .icon {
    width: 20px;
    height: 20px;
}

.metric-blue {
    color: #2563eb;
    background: #eff6ff;
}

.metric-orange {
    color: #ea580c;
    background: #fff7ed;
}

.metric-green {
    color: #059669;
    background: #ecfdf5;
}

.mileage-metric dl {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.mileage-metric dl div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.mileage-metric dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mileage-metric dd {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
}

.vehicle-metric-split-card {
    grid-template-columns: 44px minmax(0, 1fr);
}

.vehicle-metric-split {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.vehicle-metric-split-item {
    min-width: 0;
}

.vehicle-metric-split-item + .vehicle-metric-split-item {
    border-left: 1px solid var(--line);
    padding-left: 12px;
}

.vehicle-metric-split .vehicle-metric-split-item strong {
    font-size: 18px;
    white-space: nowrap;
}

.record-add-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.record-add-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.record-add-card:hover {
    border-color: #93c5fd;
}

.record-add-card > span {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
}

.record-add-card strong {
    font-size: 22px;
}

.record-add-card small {
    color: var(--muted);
    line-height: 1.55;
}

.record-hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.record-hub-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.record-hub-card > span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
}

.record-hub-card strong {
    display: block;
    font-size: 18px;
}

.record-hub-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.recent-record-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.recent-record-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.recent-record-card h2 {
    margin: 0;
    font-size: 18px;
}

.recent-record-card header a {
    color: var(--blue);
    font-size: 13px;
    font-weight: 850;
}

.recent-record-list {
    display: grid;
}

.recent-record-item {
    min-height: 58px;
    display: grid;
    grid-template-columns: 52px 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line);
    color: #0f172a;
}

.recent-record-item time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.recent-record-type {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 850;
}

.recent-record-item strong {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-record-meta {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.text-link {
    color: var(--blue);
    font-weight: 800;
}

.form-card small {
    color: var(--muted);
    font-weight: 700;
}

.station-picker-field {
    position: relative;
    display: block;
    width: 100%;
}

.station-picker-field input {
    padding-right: 76px;
}

.station-picker-field .ghost-button.compact {
    position: absolute;
    top: 50%;
    right: 6px;
    width: auto;
    min-width: 0;
    min-height: 30px;
    height: 30px;
    padding: 0 10px;
    border-radius: 9px;
    background: #fff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    transform: translateY(-50%);
}

.native-hidden-select {
    position: absolute;
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.other-form-grid {
    align-items: end;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.other-form-grid .span-2,
.other-form-grid .fixed-cost-fields,
.other-form-grid .selected-place-preview {
    grid-column: 1 / -1;
}

.other-date-field,
.other-mileage-field {
    grid-column: span 6;
}

.other-place-field {
    grid-column: span 7;
}

.other-category-field {
    grid-column: span 5;
}

.other-form-grid .wash-type-field,
.other-form-grid .carwash-card-field {
    grid-column: span 4;
}

.other-form-grid .other-amount-field {
    grid-column: 1 / -1;
}

.other-form-grid.uses-wash-type .other-amount-field {
    grid-column: span 4;
}

.other-form-grid .wash-type-field {
    order: 10;
}

.other-form-grid .carwash-card-field {
    order: 20;
}

.other-form-grid .other-amount-field {
    order: 30;
}

.other-form-grid.uses-wash-type:not(.has-carwash-card) .wash-type-field:not([hidden]) {
    grid-column: span 5;
}

.other-form-grid.uses-wash-type:not(.has-carwash-card) .other-amount-field:not([hidden]) {
    grid-column: span 7;
}

.other-form-grid.is-self-detailing .other-place-field {
    grid-column: span 7;
}

.other-form-grid.is-self-detailing .other-category-field {
    grid-column: span 5;
}

.record-date-field,
.record-mileage-field,
.other-date-field,
.other-mileage-field {
    min-width: 0;
}

.input-icon-field {
    min-height: 42px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 12px;
    background: var(--surface);
}

.input-icon-field .icon {
    width: 18px;
    height: 18px;
    color: #475569;
}

.input-icon-field:focus-within {
    border-color: #93c5fd;
    background: #fff;
    box-shadow: var(--focus-ring);
}

.input-icon-field:focus-within .icon {
    color: var(--blue);
}

.form-card .input-icon-field input {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.form-card .input-icon-field input:focus {
    outline: 0;
}

.refuel-money-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.refuel-station-fuel-row {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, auto);
    gap: 16px;
    align-items: end;
}

.refuel-station-field {
    min-width: 0;
}

.refuel-fuel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 12px;
    align-items: end;
}

.refuel-fuel-row .segmented-options {
    flex-wrap: nowrap;
    gap: 6px;
}

.refuel-fuel-row .segmented-options span {
    min-height: 42px;
    padding-right: 10px;
    padding-left: 10px;
}

.refuel-price-field input {
    text-align: right;
}

.refuel-balance-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.refuel-receipt-field {
    margin-top: 14px;
}

.money-input-field .icon {
    color: var(--blue);
}

.money-input-field input {
    text-align: right;
}

.place-picker-field {
    display: block;
}

.place-select-button {
    min-width: 0;
}

.place-select-button .icon {
    width: 16px;
    height: 16px;
}

.other-category-field {
    display: grid;
    gap: 8px;
}

.other-category-field > span {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.other-category-picker {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.other-category-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.other-form-grid .other-category-primary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 6px;
}

.other-form-grid .other-category-primary .other-category-chip {
    width: 100%;
    min-width: 0;
    justify-content: center;
    gap: 5px;
    padding-right: 8px;
    padding-left: 8px;
}

.other-form-grid .other-category-primary .other-category-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.other-form-grid .other-category-primary .other-category-more {
    width: auto;
    min-width: 68px;
}

.other-category-extra {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.other-category-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 12px;
    background: #fff;
    color: #334155;
    font-family: inherit;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
    cursor: pointer;
}

.other-category-chip .icon {
    width: 17px;
    height: 17px;
}

.other-category-chip.is-active {
    border-color: #93c5fd;
    background: var(--blue-soft);
    color: var(--blue);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.other-category-more {
    color: #0f172a;
}

.more-caret {
    color: #475569;
    font-weight: 900;
}

.form-help-text {
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.carwash-process-editor {
    position: relative;
}

.carwash-quick-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.carwash-quick-button {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff;
    color: #0f172a;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.carwash-quick-button strong {
    font-size: 13px;
    font-weight: 850;
}

.carwash-quick-button small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.carwash-selected-panel {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.carwash-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.carwash-selected-header strong,
.carwash-selected-header span {
    font-size: 13px;
    font-weight: 850;
}

.carwash-selected-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.carwash-edit-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.carwash-chip-button {
    min-height: 30px;
    border: 1px solid #d1fae5;
    border-radius: 999px;
    padding: 0 10px;
    background: #f0fdf4;
    color: #15803d;
    font-family: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.carwash-chip-move {
    width: 26px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: #64748b;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.carwash-chip-move:disabled {
    opacity: 0.35;
    cursor: default;
}

.carwash-edit-layer {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
}

.carwash-edit-layer[hidden] {
    display: none;
}

.carwash-edit-card {
    width: min(520px, 100%);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    background: #fff;
    box-shadow: var(--shadow-modal);
}

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

.carwash-edit-header strong {
    font-size: 17px;
    font-weight: 900;
}

.inline-time-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.carwash-product-picker {
    display: grid;
    gap: 8px;
}

.carwash-product-picker > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.carwash-product-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.carwash-product-option {
    min-height: 28px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 6px 9px;
    background: #eff6ff;
    color: #2563eb;
    font-family: inherit;
    font-size: 12px;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
    max-width: 100%;
}

.carwash-product-option.is-selected {
    border-color: #60a5fa;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.carwash-product-option strong {
    display: block;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carwash-product-option small {
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
}

.carwash-inventory-picker {
    border-top: 0;
    padding-top: 0;
}

.carwash-inventory-empty {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

.carwash-remaining-field {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.segmented-field {
    display: grid;
    gap: 8px;
}

.segmented-field > span {
    color: #334155;
    font-weight: 800;
    font-size: 13px;
}

.segmented-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.segmented-options label {
    display: block;
}

.segmented-options input {
    position: absolute;
    width: 1px;
    min-width: 1px;
    max-width: 1px;
    height: 1px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.segmented-options span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 16px;
    background: #fff;
    color: #334155;
    font-weight: 850;
}

.segmented-options input:checked + span {
    border-color: #93c5fd;
    background: var(--blue-soft);
    color: var(--blue);
}

.carwash-card-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.carwash-card-options label {
    min-width: 0;
}

.carwash-card-options span {
    width: 100%;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    white-space: nowrap;
}

.carwash-card-options label:last-child span {
    border-right: 0;
}

.carwash-card-options input:checked + span {
    border-color: transparent;
    background: var(--surface-soft);
    color: var(--blue);
    box-shadow: inset 0 0 0 1px #dbeafe;
}

.carwash-card-options .is-disabled span,
.carwash-card-options input:disabled + span {
    color: var(--muted);
    background: #f8fafc;
    cursor: not-allowed;
}

.carwash-card-status {
    margin: 8px 0 0;
}

.carwash-card-toggle {
    position: relative;
    display: block;
    min-width: 0;
}

.carwash-card-toggle input {
    position: absolute;
    width: 1px;
    min-width: 1px;
    max-width: 1px;
    height: 1px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.carwash-card-toggle span {
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 7px 12px;
    background: #fff;
    color: #334155;
    font-weight: 850;
    line-height: 1.2;
    cursor: pointer;
}

.carwash-card-toggle strong {
    font-size: 13px;
}

.carwash-card-toggle small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.carwash-card-toggle input:checked + span,
.carwash-card-toggle.is-on span {
    border-color: #93c5fd;
    background: var(--blue-soft);
    color: var(--blue);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.carwash-card-toggle input:disabled + span {
    color: var(--muted);
    background: #f8fafc;
    cursor: not-allowed;
}

.other-entry-card .carwash-process-editor {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.other-entry-card .carwash-process-editor[hidden] {
    display: none;
}

.other-inventory-editor {
    container: other-inventory / inline-size;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.other-inventory-editor[hidden] {
    display: none;
}

.other-inventory-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.other-inventory-header h2 {
    margin: 0 0 4px;
}

.other-inventory-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.other-inventory-list {
    display: grid;
    gap: 10px;
}

.other-inventory-row {
    --other-inventory-name-width: minmax(280px, 1.8fr);
    --other-inventory-qty-width: 72px;
    --other-inventory-price-width: 104px;
    --other-inventory-total-width: 112px;
    --other-inventory-purchase-width: 150px;
    --other-inventory-action-width: 34px;
    min-width: 0;
    display: grid;
    align-items: end;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.other-inventory-row.is-stock-item,
.other-inventory-row.is-manual-item {
    grid-template-columns:
        var(--other-inventory-name-width)
        var(--other-inventory-qty-width)
        var(--other-inventory-price-width)
        var(--other-inventory-total-width)
        var(--other-inventory-purchase-width)
        minmax(140px, 1fr)
        var(--other-inventory-action-width);
}

.other-inventory-row label {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.other-inventory-row [hidden] {
    display: none !important;
}

.other-inventory-row label > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.other-inventory-row input,
.other-inventory-row select {
    min-width: 0;
}

.other-inventory-toggle {
    display: none;
    min-height: 42px;
    align-self: end;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 0 12px;
    background: var(--blue-soft);
    color: var(--blue);
    font-family: inherit;
    font-size: 13px;
    font-weight: 850;
}

.other-inventory-stock-field {
    width: 100%;
    min-height: 42px;
    align-self: end;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 10px;
    background: #f8fafc;
    white-space: nowrap;
}

.other-inventory-memo-field {
    min-width: 0;
}

.other-inventory-product-field.purchase-product-picker-field {
    grid-template-columns: minmax(0, 1fr);
}

.other-inventory-product-field .inventory-product-control {
    grid-column: 1 / -1;
}

.other-inventory-reference-grid {
    display: contents;
}

.other-inventory-memo-field input {
    width: 100%;
    min-width: 0;
}

.other-inventory-row.is-stock-item .other-inventory-product-field {
    grid-column: 1;
}

.other-inventory-row.is-stock-item .other-inventory-use-field {
    grid-column: 2;
}

.other-inventory-row.is-stock-item .other-inventory-reference-grid label:nth-of-type(1) {
    grid-column: 3;
}

.other-inventory-row.is-stock-item .other-inventory-reference-grid label:nth-of-type(2) {
    grid-column: 4;
}

.other-inventory-row.is-stock-item .other-inventory-stock-field {
    grid-column: 5;
}

.other-inventory-row.is-stock-item .other-inventory-memo-field {
    grid-column: 6;
}

.other-inventory-row .remove-item-button {
    align-self: end;
    grid-column: 7;
    grid-row: auto;
    justify-self: end;
}

@container other-inventory (max-width: 1120px) {
    .other-inventory-row.is-stock-item,
    .other-inventory-row.is-manual-item {
        grid-template-columns:
            minmax(240px, 1.45fr)
            68px
            96px
            104px
            140px
            minmax(130px, 0.9fr)
            var(--other-inventory-action-width);
    }

    .other-inventory-memo-field {
        grid-column: 6;
    }

    .other-inventory-row .remove-item-button {
        grid-column: 7;
    }
}

@container other-inventory (max-width: 980px) {
    .other-inventory-row.is-stock-item,
    .other-inventory-row.is-manual-item {
        grid-template-columns: repeat(6, minmax(0, 1fr)) var(--other-inventory-action-width);
    }

    .other-inventory-reference-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .other-inventory-product-field,
    .other-inventory-name-field,
    .other-inventory-reference-grid {
        grid-column: 1 / -1;
    }

    .other-inventory-row.is-stock-item .other-inventory-product-field,
    .other-inventory-row.is-stock-item .other-inventory-reference-grid {
        grid-column: 1 / -1;
    }

    .other-inventory-row.is-stock-item .other-inventory-use-field,
    .other-inventory-row.is-stock-item .other-inventory-reference-grid label:nth-of-type(1),
    .other-inventory-row.is-stock-item .other-inventory-reference-grid label:nth-of-type(2),
    .other-inventory-row.is-stock-item .other-inventory-stock-field {
        grid-column: span 2;
    }

    .other-inventory-use-field,
    .other-inventory-quantity-field,
    .other-inventory-price-field,
    .other-inventory-total-field,
    .other-inventory-stock-field {
        grid-column: span 2;
    }

    .other-inventory-purchase-field {
        grid-column: span 3;
    }

    .other-inventory-memo-field {
        grid-column: 1 / -2;
    }

    .other-inventory-row.is-stock-item .other-inventory-memo-field {
        grid-column: 1 / -2;
    }

    .other-inventory-row .remove-item-button {
        grid-column: -2 / -1;
    }

}

.other-tail-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    align-items: end;
    margin-top: 18px;
}

.other-memo-field,
.other-file-field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.other-memo-field textarea {
    min-height: 92px;
}

.station-search-bar {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.station-search-bar input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px 0 40px;
    background: #fff;
}

.fuel-select-inline {
    flex-wrap: nowrap;
}

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

.station-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    background: #fff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.station-card:hover {
    border-color: #93c5fd;
}

.station-card strong,
.station-card span {
    display: block;
}

.station-card strong {
    font-size: 17px;
}

.station-card span {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.45;
}

.station-card dl {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
    margin: 0;
}

.station-card dl div {
    display: grid;
    gap: 3px;
    text-align: right;
}

.station-card dt,
.station-card dd {
    margin: 0;
}

.station-card dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.station-card dd {
    font-weight: 850;
}

.station-error {
    margin-bottom: 14px;
}

.place-search-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.place-search-bar input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px 0 40px;
    background: #fff;
}

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

.place-result-title {
    margin: 12px 0 2px;
    color: var(--blue);
    font-size: 17px;
}

.place-card small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.place-side-card,
.selected-place-preview {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.place-side-card {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 12px;
}

.place-side-card h2 {
    margin: 0;
    color: var(--blue);
    font-size: 17px;
}

.place-side-card form {
    display: grid;
    gap: 10px;
}

.place-side-card label {
    display: grid;
    gap: 6px;
}

.place-side-card span {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.place-side-card input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 12px;
}

.place-side-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.selected-place-preview {
    display: grid;
    gap: 10px;
}

.selected-place-preview strong,
.selected-place-preview span {
    display: block;
}

.selected-place-preview span {
    margin-top: 4px;
    color: var(--muted);
}

.place-map-box {
    min-height: 210px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    color: var(--muted);
    overflow: hidden;
}

.record-type {
    display: inline-flex;
    min-width: 48px;
    justify-content: center;
}

.settings-stack {
    display: grid;
    gap: 18px;
}

.settings-card {
    padding: 22px;
}

.settings-card h2 {
    margin: 0 0 18px;
    color: var(--blue);
    font-size: 18px;
}

.settings-options {
    display: grid;
    gap: 12px;
}

.settings-options label {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    font-weight: 750;
}

.settings-link-list {
    display: grid;
    gap: 12px;
}

.settings-link-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.settings-link-card:hover {
    border-color: #bfdbfe;
    background: #fafdff;
    color: var(--blue);
}

.settings-link-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--blue);
    font-size: 20px;
    font-weight: 950;
}

.settings-link-card div {
    min-width: 0;
}

.settings-link-card h3,
.settings-link-card p {
    margin: 0;
}

.settings-link-card h3 {
    overflow: hidden;
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-link-card p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.settings-link-card > strong {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.car-edit-list {
    display: grid;
    gap: 14px;
}

.car-summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.car-summary-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #f8fafc;
}

.car-summary-card:hover {
    border-color: #bfdbfe;
    background: #fafdff;
}

.car-summary-card img {
    width: 112px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    background: #dbeafe;
}

.car-summary-card div {
    min-width: 0;
}

.car-summary-card h3,
.car-summary-card p {
    margin: 0;
}

.car-summary-card h3 {
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.car-summary-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.car-summary-card > strong {
    color: var(--blue);
    font-size: 13px;
}

.default-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-top: 8px;
    border-radius: 999px;
    padding: 0 9px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 850;
}

.car-edit-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: #f8fafc;
}

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

.car-edit-title h3 {
    margin: 0;
}

.car-edit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.car-edit-grid label {
    display: grid;
    gap: 6px;
}

.car-edit-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.car-edit-grid input,
.car-edit-grid select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 12px;
    background: #fff;
}

.car-form-hero {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.car-form-hero img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    background: #dbeafe;
}

.car-form-hero h2,
.car-form-hero p {
    margin: 0;
}

.car-form-hero p {
    margin-top: 8px;
    color: var(--muted);
    font-weight: 800;
}

.car-image-manager .section-title-row {
    margin-bottom: 16px;
}

.car-image-manager .section-title-row p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.car-image-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.car-image-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.car-image-item.is-primary {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.car-image-item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #dbeafe;
}

.car-image-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
}

.car-image-actions label {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.car-image-delete-button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.empty-image-box {
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 18px;
    background: #f8fafc;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.car-image-upload-box {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: #fff;
}

.car-image-upload-box > label:first-child {
    display: grid;
    gap: 8px;
}

.car-image-upload-box > label:first-child > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.car-default-options {
    margin-top: 16px;
}

.car-upload-options {
    margin-top: 0;
}

.car-default-options label,
.car-upload-options label {
    min-height: 48px;
}

.car-image-upload-box small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.inline-check {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 12px;
    background: #f8fafc;
    font-weight: 800;
}


.car-default-options input[type="checkbox"],
.car-upload-options input[type="checkbox"],
.car-image-actions input[type="radio"] {
    box-sizing: border-box;
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    accent-color: var(--primary);
}

.car-default-options label,
.car-upload-options label {
    justify-content: flex-start;
}

.car-default-options label span,
.car-upload-options label span,
.car-image-actions label span {
    min-width: 0;
    white-space: normal;
    word-break: keep-all;
}

.toast-message {
    margin-bottom: 14px;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 12px 14px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 800;
}

.mobile-record-card,
.mobile-amount-card,
.mobile-meta article,
.item-accordion {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card-soft);
}

.stats-titlebar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.stats-titlebar h1 {
    margin: 0;
    font-size: 28px;
}

.stats-titlebar > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

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

.stats-filter select {
    min-width: 118px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font-weight: 750;
}

.stats-overview {
    margin-bottom: 18px;
}

.stats-overview-title {
    margin-bottom: 12px;
}

.stats-filter-mobile {
    display: none;
}

.stats-overview-title span {
    color: var(--blue);
    font-size: 16px;
    font-weight: 900;
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stats-overview article {
    min-height: 86px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.stats-overview article.wide {
    grid-column: span 2;
}

.stats-overview article div > span {
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.stats-overview article strong {
    display: block;
    margin-top: 6px;
    color: #020617;
    font-size: 22px;
    line-height: 1.15;
}

.stats-overview article small {
    color: #475569;
    font-size: 14px;
}

.stats-metric-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    border-radius: 50%;
    background: #fff;
    color: var(--blue);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.stats-metric-icon .icon {
    width: 22px;
    height: 22px;
}

.stats-metric-icon.green {
    color: #10b981;
}

.stats-metric-icon.teal,
.stats-metric-icon.gauge {
    color: #14b8a6;
}

.stats-metric-icon.drop {
    color: #0ea5e9;
}

.stats-metric-icon.orange {
    color: #f97316;
}

.stats-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "spend composition"
        "efficiency distance";
    gap: 18px;
    margin-bottom: 18px;
}

.stats-chart-card,
.stats-table-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.stats-spend-card {
    grid-area: spend;
}

.stats-composition-card {
    grid-area: composition;
}

.stats-efficiency-card {
    grid-area: efficiency;
}

.stats-distance-card {
    grid-area: distance;
}

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

.chart-card-header h2 {
    margin: 0;
    font-size: 18px;
}

.chart-card-header span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-fuel,
.bar-fuel {
    background: #60a5fa;
}

.legend-repair,
.bar-repair {
    background: #2563eb;
}

.legend-other,
.bar-other {
    background: #94a3b8;
}

.legend-accident,
.bar-accident {
    background: #f97316;
}

.legend-fixed,
.bar-fixed {
    background: #f59e0b;
}

.chart-tabs {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3px;
    background: #f8fafc;
}

.chart-tabs button {
    min-width: 74px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.chart-tabs button.is-active {
    background: #fff;
    color: var(--blue);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.stacked-chart,
.simple-bar-chart {
    min-height: 280px;
    display: grid;
    grid-template-columns: repeat(12, minmax(28px, 1fr));
    gap: 10px;
    align-items: end;
}

.chart-month,
.simple-bar-month {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 6px;
    align-items: end;
    text-align: center;
}

.stacked-track,
.simple-track {
    position: relative;
    height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-bottom: 2px solid #cbd5e1;
    background:
        linear-gradient(to top, rgba(148, 163, 184, 0.18) 1px, transparent 1px) 0 0 / 100% 20%;
}

.stacked-bar {
    width: 58%;
    min-height: 0;
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
    background: #e2e8f0;
}

.stacked-bar span {
    display: block;
    min-height: 0;
}

.chart-month strong,
.simple-bar-month strong {
    color: #475569;
    font-size: 12px;
}

.chart-month small,
.simple-bar-month small {
    min-height: 17px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.simple-track .simple-bar {
    width: 62%;
    min-height: 0;
    border-radius: 6px 6px 0 0;
    background: #22c1f1;
}

.distance-chart .simple-track .simple-bar {
    background: #3b82f6;
}

.value-label {
    position: absolute;
    left: 50%;
    bottom: calc(var(--bar-height, 0%) + 5px);
    z-index: 2;
    min-height: 18px;
    transform: translateX(-50%);
    color: #0284c7;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.distance-chart .value-label {
    font-size: 10px;
}

.fuel-liter-chart .simple-track .simple-bar {
    background: #22c55e;
}

.composition-card {
    display: flex;
    flex-direction: column;
}

.donut-layout {
    min-height: 260px;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.donut-chart {
    position: relative;
    width: 188px;
    aspect-ratio: 1;
    border-radius: 50%;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 38px;
    border-radius: inherit;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--line);
}

.donut-chart > div {
    position: absolute;
    inset: 48px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.donut-chart span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.donut-chart strong {
    margin-top: 4px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.2;
}

.donut-legend {
    display: grid;
    gap: 18px;
}

.donut-legend-row {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(0, auto);
    gap: 14px;
    align-items: center;
}

.donut-legend-row span,
.donut-legend-row strong {
    display: inline-flex;
    align-items: center;
}

.donut-legend-row span {
    gap: 9px;
    color: #334155;
    font-weight: 850;
}

.donut-legend-row i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.donut-legend-row strong {
    justify-content: flex-end;
    gap: 5px;
    white-space: nowrap;
}

.donut-legend-row small {
    color: var(--muted);
    font-size: 12px;
}

.composition-row {
    display: grid;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

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

.composition-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-weight: 850;
}

.composition-row span {
    color: #334155;
}

.composition-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.composition-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.stats-table-wrap {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table th,
.stats-table td {
    padding: 12px 10px;
    border-top: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}

.stats-table th:first-child,
.stats-table td:first-child {
    text-align: left;
}

.stats-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.stats-summary-row {
    cursor: pointer;
}

.stats-summary-row:hover th,
.stats-summary-row:hover td,
.stats-summary-row.is-open th,
.stats-summary-row.is-open td {
    background: #f8fafc;
}

.stats-month-detail-row td {
    padding: 0;
    background: #fbfdff;
}

.month-detail-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.month-detail-list a {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) minmax(160px, auto) minmax(110px, auto);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.month-detail-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.month-detail-list small {
    color: var(--muted);
    font-size: 12px;
}

.month-detail-list em {
    justify-self: end;
    font-style: normal;
    font-weight: 900;
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: auto 210px 1fr auto;
    }

    .topnav {
        gap: 6px;
    }

    .filter-bar {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }

    .search-field {
        grid-column: span 2;
    }

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

    .dashboard-grid,
    .car-edit-grid,
    .record-add-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .vehicle-summary-grid .mileage-metric {
        grid-column: 1 / -1;
    }

    .stats-overview {
        grid-template-columns: 1fr;
    }

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

    .stats-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "spend composition"
            "efficiency distance";
    }

    .donut-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

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

    .summary-card:nth-child(2),
    .summary-card:nth-child(-n + 2) {
        border: 1px solid var(--line);
    }

    .item-editor-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) 42px;
    }

    .item-editor-row > label:nth-of-type(1),
    .item-editor-row > label:nth-of-type(3),
    .item-editor-row > label:nth-of-type(5),
    .item-editor-row > label:nth-of-type(7) {
        grid-column: 1;
    }

    .item-editor-row > label:nth-of-type(2),
    .item-editor-row > label:nth-of-type(4),
    .item-editor-row > label:nth-of-type(6) {
        grid-column: 2;
    }

    .item-editor-row > label.item-full,
    .item-editor-row > .item-full {
        grid-column: 1 / span 2;
    }

    .item-editor-row .wide {
        grid-column: 1 / span 2;
    }

    .remove-item-button {
        grid-column: 3;
        grid-row: 4;
    }
}

@media (max-width: 980px) {
    .detail-info-card .two-column-info {
        grid-template-columns: 1fr;
    }

    .insurance-detail-layout .two-column-info dl {
        grid-template-columns: 1fr;
    }

    .detail-info-card .two-column-info div {
        grid-template-columns: minmax(122px, 140px) minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    :root {
        --mobile-page-x: 10px;
    }

    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    body {
        background: #f8fafc;
        font-size: 14px;
        touch-action: manipulation;
    }

    button,
    a,
    select,
    input,
    textarea,
    .bottom-nav-item,
    .quick-add-link,
    .icon-button {
        -webkit-tap-highlight-color: transparent;
    }

    input,
    select,
    textarea {
        font-size: 15px;
    }

    select,
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    .filter-bar select,
    .form-card select,
    .drawer-account select,
    .stats-filter-mobile select,
    .car-edit-grid select,
    .form-card input[type="date"],
    .car-edit-grid input[type="date"] {
        width: 100%;
        max-width: 100%;
        height: 44px;
        min-height: 44px;
        line-height: normal;
        -webkit-appearance: none;
        appearance: none;
    }

    .form-card .input-icon-field input[type="date"],
    .form-card .input-icon-field input[type="text"] {
        height: 42px;
        min-height: 42px;
        border: 0;
        padding: 0;
        background: transparent;
    }

    select,
    .filter-bar select,
    .form-card select,
    .drawer-account select,
    .stats-filter-mobile select,
    .car-edit-grid select {
        padding-right: 32px;
        background-color: #fff;
        background-image:
            linear-gradient(45deg, transparent 50%, #475569 50%),
            linear-gradient(135deg, #475569 50%, transparent 50%);
        background-position:
            calc(100% - 17px) 50%,
            calc(100% - 11px) 50%;
        background-size: 6px 6px, 6px 6px;
        background-repeat: no-repeat;
    }

    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    .form-card input[type="date"],
    .car-edit-grid input[type="date"] {
        display: block;
        min-width: 0;
        padding-right: 12px;
        text-align: left;
        overflow: hidden;
    }

    input[type="date"]::-webkit-date-and-time-value,
    input[type="time"]::-webkit-date-and-time-value,
    input[type="datetime-local"]::-webkit-date-and-time-value {
        min-width: 0;
        width: 100%;
        margin: 0;
        text-align: left;
    }

    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator,
    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        margin: 0;
        padding: 0;
    }

    .desktop-only,
    .topbar,
    .sidebar {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: var(--z-mobile-topbar);
        width: 100%;
        min-height: calc(58px + env(safe-area-inset-top));
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        padding: env(safe-area-inset-top) calc(var(--mobile-page-x) + 6px) 0 var(--mobile-page-x);
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px);
    }

    .mobile-title {
        min-width: 0;
        overflow: hidden;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px;
        font-weight: 900;
    }

    .mobile-page-title {
        justify-self: end;
        max-width: 128px;
        overflow: hidden;
        color: #334155;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px;
        font-weight: 900;
    }

    .mobile-topbar > .icon-button {
        position: static;
        justify-self: start;
    }

    .mobile-actions .icon-button,
    .mobile-topbar > .icon-button {
        width: 42px;
        height: 42px;
        color: #0f172a;
    }

    .mobile-actions .icon-button .icon {
        display: block;
        color: #0f172a;
        stroke: currentColor;
    }

    .mobile-search-panel {
        position: fixed;
        top: calc(58px + env(safe-area-inset-top));
        left: 0;
        right: 0;
        z-index: var(--z-mobile-search);
        display: block;
        padding: 10px var(--mobile-page-x);
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px);
    }

    .mobile-search-panel[hidden] {
        display: none;
    }

    .mobile-search-panel form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .mobile-search-panel .search-field {
        min-width: 0;
    }

    .app-shell {
        display: block;
        min-height: 100dvh;
        margin: 0;
        padding-top: calc(58px + env(safe-area-inset-top));
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .main-content {
        width: auto;
        max-width: 100%;
        overflow-x: visible;
        padding: calc(env(safe-area-inset-top) + 16px) var(--mobile-page-x) calc(96px + env(safe-area-inset-bottom));
        background: transparent;
    }

    .page-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .page-header > div {
        display: block;
        min-width: 0;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header .count-text {
        display: block;
        margin-top: 4px;
        line-height: 1.45;
    }

    .record-count-header .count-text {
        display: inline-flex;
        margin-top: 0;
        line-height: 1;
    }

    .page-header .ghost-button {
        min-height: 38px;
        padding: 0 12px;
        font-size: 13px;
    }

    .filter-bar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin: 0 calc(var(--mobile-page-x) * -1) 14px;
        padding: 0 var(--mobile-page-x) 4px;
        scrollbar-width: none;
    }

    .filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-bar select,
    .filter-bar input,
    .filter-bar .ghost-button {
        min-width: 118px;
        border-radius: 999px;
        background: #fff;
    }

    .search-field {
        min-width: 220px;
    }

    .stats-titlebar {
        display: none;
    }

    .stats-overview {
        min-width: 0;
        max-width: 100%;
        margin-bottom: 12px;
        padding: 8px;
        border: 1px solid #c9eee1;
        border-radius: var(--radius);
        background: linear-gradient(180deg, #eefdf7, #f7fffb);
    }

    .stats-overview-title {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
        padding: 0 2px;
    }

    .stats-overview-title .stats-filter-mobile {
        display: flex;
    }

    .stats-filter-mobile select {
        min-width: 96px;
        min-height: 40px;
        line-height: 40px;
        border-radius: 8px;
        padding: 0 10px;
        font-size: 12px;
    }

    .stats-overview-title span {
        color: #047857;
        font-size: 15px;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        border: 1px solid #d6eee5;
        border-radius: 8px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.48);
    }

    .stats-overview article {
        min-height: 72px;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 9px;
        padding: 10px;
        border: 0;
        border-right: 1px solid #d6eee5;
        border-bottom: 1px solid #d6eee5;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .stats-overview article:nth-child(2n),
    .stats-overview article.wide {
        border-right: 0;
    }

    .stats-overview article.wide {
        grid-column: 1 / -1;
        justify-content: center;
        grid-template-columns: 36px auto;
    }

    .stats-metric-icon {
        width: 34px;
        height: 34px;
    }

    .stats-metric-icon .icon {
        width: 18px;
        height: 18px;
    }

    .stats-overview article div > span {
        font-size: 11px;
    }

    .stats-overview article strong {
        font-size: 15px;
    }

    .stats-chart-grid {
        min-width: 0;
        max-width: 100%;
        grid-template-columns: 1fr;
        grid-template-areas:
            "spend"
            "composition"
            "efficiency"
            "distance";
        gap: 12px;
        margin-bottom: 12px;
    }

    .stats-chart-card,
    .stats-table-card {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        padding: 16px;
    }

    .chart-card-header {
        display: block;
        margin-bottom: 12px;
    }

    .chart-card-header h2 {
        font-size: 18px;
    }

    .chart-card-header span {
        font-size: 12px;
    }

    .chart-legend {
        justify-content: flex-start;
        gap: 8px;
        margin-top: 10px;
        font-size: 11px;
    }

    .chart-tabs {
        margin-top: 10px;
    }

    .donut-layout {
        min-height: 0;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
    }

    .donut-chart {
        width: 178px;
    }

    .donut-chart::after {
        inset: 35px;
    }

    .donut-chart > div {
        inset: 44px;
    }

    .donut-chart strong {
        font-size: 15px;
    }

    .donut-legend {
        width: 100%;
        gap: 12px;
    }

    .donut-legend-row {
        grid-template-columns: minmax(78px, max-content) minmax(0, 1fr);
        gap: 8px;
    }

    .donut-legend-row span {
        gap: 7px;
        font-size: 13px;
    }

    .donut-legend-row strong {
        min-width: 0;
        justify-content: flex-end;
        white-space: normal;
        text-align: right;
        font-size: 13px;
        line-height: 1.2;
    }

    .donut-legend-row small {
        font-size: 11px;
    }

    .stacked-chart,
    .simple-bar-chart {
        width: 100%;
        min-height: 202px;
        display: flex;
        align-items: end;
        gap: 2px;
        /* transform: scaleX(0.88); */
        transform-origin: left bottom;
    }

    .chart-month,
    .simple-bar-month {
        flex: 1 1 0;
    }

    .stacked-track,
    .simple-track {
        height: 148px;
    }

    .stacked-bar,
    .simple-track .simple-bar {
        width: 64%;
    }

    .chart-month strong,
    .simple-bar-month strong {
        font-size: 11px;
    }

    .chart-month small,
    .simple-bar-month small {
        display: none;
    }

    .value-label {
        bottom: calc(var(--bar-height, 0%) + 4px);
        min-height: 12px;
        transform: translateX(-50%) scale(0.9);
        font-size: 10px;
        line-height: 1;
    }

    .distance-chart .value-label,
    .fuel-liter-chart .value-label {
        transform: translateX(-50%) scale(0.82);
        font-size: 9px;
    }

    .stats-table-wrap {
        overflow-x: visible;
    }

    .stats-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        font-size: 12px;
    }

    .stats-table thead {
        display: none;
    }

    .stats-table tbody {
        display: grid;
    }

    .stats-summary-row {
        display: grid;
        grid-template-columns: 44px repeat(3, minmax(0, 1fr));
        border-top: 1px solid var(--line);
    }

    .stats-summary-row:first-child {
        border-top: 0;
    }

    .stats-summary-row th,
    .stats-summary-row td {
        display: block;
        min-width: 0;
        padding: 8px 3px;
        border-top: 0;
        background: #fff;
        text-align: right;
        white-space: nowrap;
    }

    .stats-summary-row th {
        grid-row: 1 / span 2;
        align-self: center;
        text-align: left;
        font-size: 14px;
        font-weight: 900;
    }

    .stats-summary-row td {
        font-size: 12px;
        line-height: 1.2;
    }

    .stats-summary-row td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        font-size: 10px;
        font-weight: 850;
    }

    .stats-summary-row td:nth-of-type(1) {
        grid-column: 2;
        grid-row: 1;
    }

    .stats-summary-row td:nth-of-type(2) {
        grid-column: 3;
        grid-row: 1;
    }

    .stats-summary-row td:nth-of-type(3) {
        grid-column: 4;
        grid-row: 1;
    }

    .stats-summary-row td:nth-of-type(4) {
        grid-column: 2;
        grid-row: 2;
    }

    .stats-summary-row td:nth-of-type(5) {
        grid-column: 3;
        grid-row: 2;
    }

    .stats-summary-row td:nth-of-type(6) {
        display: none;
    }

    .stats-summary-row td:nth-of-type(7) {
        grid-column: 4;
        grid-row: 2;
    }

    .stats-month-detail-row {
        display: block;
    }

    .stats-month-detail-row[hidden] {
        display: none !important;
    }

    .stats-month-detail-row td {
        display: block;
        width: 100%;
        padding: 0;
    }

    .month-detail-list a {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px;
    }

    .month-detail-list strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
    }

    .month-detail-list em {
        font-size: 12px;
        white-space: nowrap;
    }

    .month-detail-list small {
        display: none;
    }

    .summary-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        padding: 0;
        margin-bottom: 14px;
    }

    .summary-card {
        min-height: 96px;
        min-width: 0;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 12px;
        column-gap: 10px;
        grid-template-columns: 36px minmax(0, 1fr);
        background: #fff;
        box-shadow: var(--shadow-card);
    }

    .summary-grid .summary-card:last-child {
        border-right: 1px solid var(--line);
    }

    .summary-card p,
    .summary-card strong,
    .summary-card small {
        min-width: 0;
    }

    .summary-icon {
        width: 36px;
        height: 36px;
    }

    .summary-card strong {
        font-size: 18px;
        overflow-wrap: anywhere;
    }

    .summary-card p {
        overflow-wrap: anywhere;
        word-break: break-all;
        font-size: 13px;
    }

    .timeline-list {
        border: 0;
        background: transparent;
        display: grid;
        gap: 8px;
    }

    .timeline-row {
        grid-template-columns: 52px 12px minmax(0, 1fr);
        min-height: auto;
    }

    .timeline-date {
        padding: 16px 0 0;
        font-size: 13px;
    }

    .timeline-card,
    .timeline-row.is-featured .timeline-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
        box-shadow: var(--shadow-card-soft);
    }

    .timeline-card > .icon {
        display: none;
    }

    .timeline-card h2 {
        font-size: 16px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .timeline-card p {
        margin-top: 6px;
        font-size: 13px;
    }

    .timeline-amount span {
        display: none;
    }

    .timeline-amount {
        text-align: left;
    }

    .timeline-amount strong {
        font-size: 16px;
    }

    .mobile-detail-header {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: -4px 0 12px;
    }

    .mobile-detail-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .mobile-detail-actions form {
        margin: 0;
    }

    .mobile-detail-action-button {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fff;
        color: #1e293b;
        font-size: 14px;
        font-weight: 850;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-detail-action-button .icon {
        width: 16px;
        height: 16px;
    }

    .mobile-detail-action-button.is-danger {
        border-color: #fecaca;
        color: #dc2626;
    }

    .mobile-detail-action-button:focus-visible {
        outline: 3px solid rgba(37, 99, 235, .28);
        outline-offset: 2px;
    }

    .mobile-record-card,
    .mobile-amount-card,
    .mobile-meta article {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        overflow: hidden;
        padding: 20px;
        margin-bottom: 10px;
    }

    .mobile-record-card > div {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: flex-start;
        gap: 0;
        min-width: 0;
    }

    .mobile-record-card h2 {
        margin: 0;
        min-width: 0;
        max-width: none;
        font-size: 22px;
        line-height: 1.28;
        overflow-wrap: anywhere;
        word-break: break-all;
    }

    .mobile-record-card > div > .badge {
        display: none;
    }

    .mobile-record-card ul {
        list-style: none;
        display: grid;
        gap: 12px;
        margin: 18px 0 0;
        padding: 0;
    }

    .mobile-record-card li {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #111827;
    }

    .mobile-record-card .mobile-inline-summary {
        margin-top: 18px;
        padding: 14px;
        box-shadow: none;
    }

    .mobile-record-card .mobile-inline-summary h2 {
        margin-bottom: 10px;
        font-size: 16px;
    }

    .mobile-record-card .mobile-inline-summary dl {
        padding: 6px 10px;
    }

    .mobile-record-card .mobile-inline-summary dl div {
        padding: 8px 0;
    }

    .mobile-record-card .mobile-inline-summary dt,
    .mobile-record-card .mobile-inline-summary dd {
        font-size: 13.5px;
    }

    .mobile-amount-card h2,
    .mobile-section-title h2,
    .mobile-meta h2 {
        margin: 0 0 16px;
        color: var(--blue);
        font-size: 18px;
    }

    .mobile-amount-card dl {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        margin: 0;
    }

    .mobile-amount-card dt,
    .mobile-amount-card dd {
        margin: 0;
        min-width: 0;
        font-weight: 850;
        overflow-wrap: anywhere;
    }

    .mobile-amount-card dd {
        justify-self: start;
        max-width: 100%;
        margin-bottom: 7px;
        text-align: left;
        font-size: 18px;
    }

    .mobile-amount-card p {
        margin: 18px 0 0;
        color: var(--muted);
        line-height: 1.7;
    }

    .mobile-section-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin: 18px 0 8px;
    }

    .item-accordion {
        margin-bottom: 8px;
        overflow: hidden;
    }

    .item-accordion summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 78px;
        padding: 16px;
        list-style: none;
        cursor: pointer;
    }

    .item-accordion summary::-webkit-details-marker {
        display: none;
    }

    .item-accordion summary b {
        white-space: nowrap;
    }

    .accordion-body {
        display: grid;
        gap: 8px;
        padding: 0 10px 10px;
    }

    .mobile-item-card {
        position: relative;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
    }

    .mobile-item-card > div {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
    }

    .mobile-item-card h3 {
        margin: 0;
        font-size: 15px;
    }

    .mobile-item-card p {
        margin: 8px 0 0;
        color: #475569;
        font-size: 13px;
    }

    .mobile-item-card strong {
        display: block;
        margin-top: 8px;
        text-align: right;
        font-size: 16px;
    }

    .group-total {
        display: flex;
        justify-content: space-between;
        padding: 12px 6px 4px;
        color: var(--blue);
        font-weight: 850;
    }

    .mobile-meta {
        display: grid;
        gap: 8px;
        margin-top: 8px;
    }

    .mobile-meta p {
        margin: 0;
        line-height: 1.8;
    }

    .mobile-meta dl {
        margin: 0;
        display: grid;
        gap: 10px;
    }

    .mobile-meta dl div {
        display: grid;
        grid-template-columns: 80px 1fr;
    }

    .mobile-meta dt,
    .mobile-meta dd {
        margin: 0;
    }

    .mobile-record-card .mobile-segment-summary {
        margin-top: 10px;
    }

    .mobile-record-card .mobile-segment-summary .fuel-segment-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .mobile-record-card .mobile-segment-summary .fuel-segment-grid .fuel-segment-metric {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
        min-width: 0;
        padding: 11px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #f8fafc;
    }

    .mobile-record-card .mobile-segment-summary .fuel-segment-grid .fuel-segment-metric.is-wide {
        grid-column: 1 / -1;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

    .mobile-record-card .mobile-segment-summary .fuel-segment-grid dt {
        color: #64748b;
        font-size: 12px;
        font-weight: 850;
        line-height: 1.25;
    }

    .mobile-record-card .mobile-segment-summary .fuel-segment-grid dd {
        min-width: 0;
        color: #0f172a;
        font-size: 15px;
        font-weight: 900;
        line-height: 1.25;
        font-variant-numeric: tabular-nums;
    }

    .mobile-record-card .mobile-segment-summary .fuel-segment-grid .is-wide dd {
        justify-self: end;
        text-align: right;
    }

    .mobile-button-pair {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 12px;
        width: 100%;
        max-width: none;
        margin: 10px 0 0;
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: var(--z-bottom-nav);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: calc(72px + env(safe-area-inset-bottom));
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(16px);
    }

    .quick-add-backdrop {
        position: fixed;
        inset: 0;
        z-index: var(--z-mobile-backdrop);
        background: rgba(15, 23, 42, 0.08);
    }

    .mobile-quick-add-menu {
        position: fixed;
        top: auto;
        right: 50%;
        bottom: calc(82px + env(safe-area-inset-bottom));
        z-index: var(--z-mobile-quick-add);
        min-width: min(340px, calc(100vw - 40px));
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 0;
        border: 0;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        transform: translateX(50%);
        transform-origin: bottom center;
        animation: mobileQuickAddIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .mobile-quick-add-menu.is-closing {
        pointer-events: none;
        animation: mobileQuickAddOut 160ms ease-in forwards;
    }

    .mobile-quick-add-menu .quick-add-insurance {
        grid-column: 1;
        grid-row: 1;
    }

    .mobile-quick-add-menu .quick-add-product {
        grid-column: 2;
        grid-row: 1;
    }

    .mobile-quick-add-menu .quick-add-purchase {
        grid-column: 3;
        grid-row: 1;
    }

    .mobile-quick-add-menu .quick-add-fuel {
        grid-column: 1;
        grid-row: 2;
    }

    .mobile-quick-add-menu .quick-add-repair {
        grid-column: 2;
        grid-row: 2;
    }

    .mobile-quick-add-menu .quick-add-etc {
        grid-column: 3;
        grid-row: 2;
    }

    .mobile-quick-add-menu .quick-add-drive {
        grid-column: 4;
        grid-row: 2;
    }

    .mobile-quick-add-menu .quick-add-link {
        min-height: 56px;
        flex-direction: column;
        gap: 5px;
        border-color: rgba(226, 232, 240, 0.82);
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(12px);
        box-shadow: var(--shadow-sticky);
        font-size: 12px;
    }

    .bottom-nav-item {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #64748b;
        font-size: 11px;
        font-weight: 750;
        border: 0;
        background: transparent;
        font-family: inherit;
        appearance: none;
        touch-action: manipulation;
        user-select: none;
    }

    .bottom-nav-item:active,
    .bottom-nav-item:focus,
    .bottom-nav-item:focus-visible {
        outline: 0;
        background: transparent;
        box-shadow: none;
    }

    .bottom-nav-item .icon {
        width: 22px;
        height: 22px;
    }

    .bottom-nav-item.is-active {
        color: var(--blue);
    }

    .bottom-nav-item.is-primary .icon {
        width: 56px;
        height: 56px;
        padding: 15px;
        border-radius: 50%;
        background: var(--blue);
        color: #fff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
        transform: translateY(-14px);
        transition: transform 160ms ease;
    }

    .bottom-nav-item.is-primary.is-open .icon {
        transform: translateY(-14px) rotate(45deg);
    }

    .bottom-nav-item.is-primary span {
        display: none;
    }

    .form-grid,
    .repair-form-top-grid,
    .repair-total-summary,
    .inline-total-preview {
        grid-template-columns: 1fr;
    }

    .repair-total-card {
        padding: 16px;
    }

    .repair-total-list {
        padding: 11px 12px;
    }

    .inline-total-preview div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .inline-total-preview div:last-child {
        border-bottom: 0;
    }

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

    .refuel-top-preview div {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .refuel-top-preview div:last-child {
        border-right: 0;
    }

    .span-2 {
        grid-column: auto;
    }

    .form-card {
        padding: 16px;
    }

    .item-category-group {
        padding: 12px;
    }

    .item-category-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
    }

    .item-category-heading {
        gap: 8px;
        min-height: 34px;
    }

    .item-category-index,
    .item-category-group-summary {
        font-size: 12px;
    }

    .item-category-actions {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .item-category-actions .ghost-button {
        width: 34px;
        min-width: 0;
        height: 34px;
        min-height: 34px;
        padding: 0;
        font-size: 0;
    }

    .item-category-actions .ghost-button svg {
        width: 17px;
        height: 17px;
        margin: 0;
    }

    .item-category-actions .ghost-button span {
        display: none;
    }

    .item-category-controls {
        grid-template-columns: minmax(84px, 1fr) auto;
        gap: 5px;
        align-items: center;
    }

    .item-category-group.has-accident-link .item-category-controls {
        grid-template-columns: minmax(84px, 1fr) auto;
    }

    .repair-accident-link-field {
        grid-column: 1 / -1;
    }

    .item-category-select-field {
        padding: 0;
    }

    .item-category-meta {
        display: grid;
        grid-template-columns: auto 1px auto;
        gap: 3px;
        align-items: center;
        justify-content: start;
    }

    .item-category-choice-divider {
        display: block;
        width: 1px;
        height: 26px;
        background: #cbd5e1;
    }

    .item-editor-list {
        order: 4;
    }

    .repair-choice-box {
        padding: 12px;
    }

    .repair-choice-box legend {
        margin-bottom: 8px;
    }

    .repair-choice-title {
        font-size: 13px;
    }

    .repair-choice-subtitle {
        font-size: 11px;
    }

    .item-category-meta .repair-choice-button {
        flex: 0 0 auto;
        min-width: 0;
        min-height: 34px;
        height: 34px;
        padding: 0 6px;
        font-size: 11px;
    }

    .item-editor-row {
        grid-template-columns: 1fr 42px;
        align-items: start;
    }

    .item-editor-row label,
    .item-editor-row fieldset,
    .item-editor-row .item-full,
    .item-editor-row .item-half,
    .item-amount-row {
        grid-column: 1 / -1;
    }

    .item-editor-row > label.item-full,
    .item-editor-row > .item-full {
        grid-column: 1 / -1;
    }

    .item-editor-row > label.item-name-field.item-full {
        grid-column: 1;
        grid-row: 1;
    }

    .item-cost-vat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .item-cost-vat-row > *,
    .item-amount-row > label {
        grid-column: auto;
    }

    .item-cost-vat-row .repair-choice-buttons {
        gap: 4px;
    }

    .item-cost-vat-row .repair-choice-button {
        width: 100%;
        min-height: 34px;
        padding: 0 5px;
        font-size: 12px;
        letter-spacing: 0;
    }

    .item-amount-row {
        grid-template-columns: 58px minmax(0, 1fr) minmax(98px, 112px);
        gap: 6px;
    }

    .item-editor-row.is-warranty .item-amount-row {
        grid-template-columns: 58px;
    }

    .repair-form .item-editor-row.is-warranty {
        grid-template-columns: 66px minmax(0, 1fr) 42px;
    }

    .repair-form .item-editor-row.is-warranty > label.item-name-field.item-full {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .repair-form .item-editor-row.is-warranty .remove-item-button {
        grid-column: 3;
        grid-row: 1;
    }

    .repair-form .item-editor-row.is-warranty .item-amount-row {
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: 1fr;
    }

    .repair-form .item-editor-row.is-warranty > label.item-memo-field.item-full {
        grid-column: 2 / 4;
        grid-row: 2;
    }

    .item-amount-row input {
        padding-left: 7px;
        padding-right: 7px;
        font-size: 13px;
    }

    .repair-choice-buttons {
        flex-wrap: nowrap;
    }

    .repair-choice-button {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 8px;
    }

    .remove-item-button {
        grid-column: 2;
        grid-row: 1;
    }

    .repair-form .item-editor-row.has-inventory-product {
        grid-template-columns: minmax(0, 1fr) 42px;
        row-gap: 8px;
        align-items: end;
    }

    .repair-form .item-editor-row.has-inventory-product > label.item-inventory-field.item-full {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .repair-form .item-editor-row.has-inventory-product .item-inventory-use-field {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        width: 58px;
    }

    .repair-form .item-editor-row.has-inventory-product .item-inventory-use-field input {
        width: 58px;
        min-width: 48px;
    }

    .repair-form .item-editor-row.has-inventory-product .item-inventory-apply-field {
        grid-column: 2;
        grid-row: auto;
        justify-self: end;
        min-width: 0;
        padding: 0 8px;
    }

    .repair-form .item-editor-row.has-inventory-product > label.item-memo-field.item-full {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .repair-form .item-editor-row.has-inventory-product .remove-item-button {
        grid-column: 2;
        grid-row: auto;
        justify-self: end;
    }

        .sticky-form-actions {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: calc(72px + env(safe-area-inset-bottom) + 10px);
        z-index: var(--z-sticky-actions);
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 10px;
        width: calc(100% - 28px);
        max-width: 390px;
        margin-left: auto;
        margin-right: auto;
        padding: 10px;
        transform: translateX(-50%);
    }

    .sticky-form-actions .ghost-button,
    .sticky-form-actions .primary-button {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
    }

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

    .dashboard-grid,
    .car-edit-grid,
    .record-add-grid {
        grid-template-columns: 1fr;
    }

    .record-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
    }

    .record-hub-card {
        min-height: 84px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .record-hub-card > span {
        width: 34px;
        height: 34px;
    }

    .record-hub-card strong {
        font-size: 15px;
    }

    .record-hub-card small {
        margin-top: 3px;
        font-size: 11px;
        line-height: 1.32;
    }

    .recent-record-card {
        padding: 14px;
    }

    .recent-record-card h2 {
        font-size: 16px;
    }

    .recent-record-item {
        min-height: 64px;
        grid-template-columns: 42px 40px minmax(0, 1fr);
        gap: 8px;
        padding: 8px 0;
    }

    .recent-record-type {
        min-height: 22px;
        font-size: 11px;
    }

    .recent-record-item strong {
        font-size: 13px;
    }

    .recent-record-meta {
        grid-column: 3;
        margin-top: -6px;
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .car-summary-list {
        grid-template-columns: 1fr;
    }

    .car-summary-card {
        grid-template-columns: 92px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 10px;
    }

    .car-summary-card img {
        width: 92px;
    }

    .car-summary-card h3 {
        font-size: 15px;
    }

    .car-summary-card p {
        font-size: 12px;
    }

    .settings-link-card {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 12px;
    }

    .settings-link-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .settings-link-card h3 {
        font-size: 15px;
    }

    .settings-link-card p {
        font-size: 12px;
    }

    .car-form-hero {
        grid-template-columns: 1fr;
    }

    .car-form-hero img {
        max-width: 260px;
    }

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

    .car-image-actions {
        padding: 8px;
    }

    .car-image-actions label,
    .car-image-delete-button {
        min-height: 34px;
        font-size: 12px;
    }

    .car-default-options input[type="checkbox"],
    .car-upload-options input[type="checkbox"],
    .car-image-actions input[type="radio"] {
        flex-basis: 15px;
        width: 15px;
        min-width: 15px;
        max-width: 15px;
        height: 15px;
        min-height: 15px;
    }


    .station-picker-field,
    .station-search-bar,
    .place-search-bar,
    .place-layout,
    .station-card {
        grid-template-columns: 1fr;
    }

    .place-side-card {
        position: static;
    }

    .station-card dl {
        justify-content: flex-start;
    }

    .station-card dl div {
        text-align: left;
    }

    .fuel-select-inline {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .app-drawer {
        width: min(314px, 86vw);
    }

    .drawer-record-menu {
        gap: 8px;
        padding: 12px 16px 6px;
    }

    .drawer-account {
        padding: 14px 16px 12px;
    }

    .drawer-account select {
        height: 42px;
        min-height: 42px;
        line-height: 42px;
    }

    .drawer-record-link,
    .drawer-menu a {
        min-height: 42px;
        padding: 0 10px;
        font-size: 13px;
    }

    .drawer-menu {
        margin: 10px 16px 0;
        padding: 12px 0 0;
    }

    .drawer-section-label {
        margin: 12px 16px 0;
        padding-top: 10px;
    }

    .drawer-drive-menu {
        margin-top: 8px;
        padding-top: 0;
        padding-bottom: 18px;
        border-top: 0;
    }

    .login-copy {
        min-height: 220px;
        padding: 28px;
    }

    .login-form {
        padding: 28px;
    }
}

@media (max-width: 760px) {
    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 14px;
    }

    .dashboard-summary-grid .dashboard-card {
        min-height: 66px;
        padding: 10px 10px 10px 52px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-card-soft);
    }

    .dashboard-summary-grid .dashboard-total-card {
        grid-column: 1 / -1;
        min-height: 92px;
        padding: 14px 14px 14px 60px;
    }

    .dashboard-summary-grid .dashboard-card-icon {
        left: 12px;
        width: 34px;
        height: 34px;
    }

    .dashboard-summary-grid .dashboard-total-card .dashboard-card-icon {
        left: 14px;
        width: 38px;
        height: 38px;
    }

    .dashboard-summary-grid .dashboard-card-icon .icon {
        width: 18px;
        height: 18px;
    }

    .dashboard-summary-grid .dashboard-card p {
        font-size: 13px;
        line-height: 1.25;
    }

    .dashboard-summary-grid .dashboard-card strong {
        margin-top: 2px;
        font-size: 17px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .dashboard-summary-grid .dashboard-total-card strong {
        font-size: 26px;
    }

    .dashboard-summary-grid .dashboard-card small {
        margin-top: 3px;
        font-size: 12px;
        line-height: 1.3;
    }

    .vehicle-summary-card {
        margin-bottom: 14px;
        padding: 14px;
    }

    .vehicle-summary-head {
        gap: 10px;
        margin-bottom: 10px;
    }

    .vehicle-summary-head h2 {
        font-size: 15px;
    }

    .vehicle-summary-head p {
        font-size: 12px;
        line-height: 1.35;
    }

    .vehicle-summary-head > span {
        min-height: 26px;
        padding: 0 8px;
        font-size: 11px;
    }

    .vehicle-summary-grid {
        grid-template-columns: minmax(0, 1.28fr) minmax(128px, 0.92fr);
        gap: 8px;
    }

    .vehicle-summary-grid .mileage-metric {
        grid-column: 1 / -1;
    }

    .vehicle-metric {
        min-height: 74px;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .vehicle-metric-icon {
        width: 34px;
        height: 34px;
    }

    .vehicle-metric-icon .icon {
        width: 17px;
        height: 17px;
    }

    .vehicle-metric p {
        font-size: 12px;
    }

    .vehicle-metric strong {
        font-size: 18px;
    }

    .vehicle-metric small {
        margin-top: 4px;
        font-size: 11px;
    }

    .mileage-metric dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mileage-metric dl div {
        display: block;
    }

    .mileage-metric dd {
        margin-top: 2px;
        font-size: 17px;
    }

    .vehicle-summary-grid .vehicle-metric:not(.mileage-metric) {
        min-height: 84px;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 7px;
        padding: 11px;
    }

    .vehicle-summary-grid .vehicle-metric:not(.mileage-metric) .vehicle-metric-icon {
        width: 28px;
        height: 28px;
    }

    .vehicle-summary-grid .vehicle-metric:not(.mileage-metric) .vehicle-metric-icon .icon {
        width: 15px;
        height: 15px;
    }

    .vehicle-summary-grid .vehicle-metric:not(.mileage-metric) p {
        font-size: 11px;
    }

    .vehicle-summary-grid .vehicle-metric:not(.mileage-metric) strong {
        margin-top: 3px;
        font-size: 15px;
    }

    .vehicle-summary-grid .vehicle-metric:not(.mileage-metric) small {
        margin-top: 3px;
        font-size: 10px;
        line-height: 1.3;
    }

    .vehicle-summary-grid .vehicle-metric:not(.mileage-metric) small {
        white-space: nowrap;
    }

    .vehicle-metric-split {
        width: 100%;
        gap: 8px;
    }

    .vehicle-metric-split-item + .vehicle-metric-split-item {
        padding-left: 8px;
    }

    .vehicle-metric-split .vehicle-metric-split-item strong {
        font-size: 13px;
    }

    .dashboard-timeline {
        gap: 10px;
    }

    .dashboard-timeline .timeline-row {
        grid-template-columns: 64px 22px minmax(0, 1fr);
        min-height: auto;
    }

    .dashboard-timeline .timeline-date {
        padding: 15px 0 0 8px;
        font-size: 13px;
    }

    .dashboard-timeline .timeline-marker::after {
        top: 17px;
        width: 26px;
        height: 26px;
    }

    .dashboard-timeline .timeline-marker > img {
        top: 17px;
        width: 26px;
        height: 26px;
    }

    .dashboard-timeline .timeline-marker > .icon {
        top: 23px;
        width: 14px;
        height: 14px;
    }

    .dashboard-timeline .timeline-marker > span {
        top: 24px;
        font-size: 7px;
    }

    .dashboard-timeline .timeline-card,
    .dashboard-timeline .timeline-row.is-featured .timeline-card {
        border: 1px solid var(--line);
        box-shadow: var(--shadow-card-soft);
    }

    .dashboard-timeline .timeline-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 16px;
    }

    .dashboard-timeline .timeline-card > .icon {
        display: none;
    }

    .dashboard-timeline .timeline-card h2 {
        font-size: 17px;
        line-height: 1.35;
    }

    .timeline-meta-line {
        gap: 5px;
    }

    .timeline-card p .timeline-meta-pill {
        min-height: 24px;
        max-width: 100%;
        padding: 0 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-timeline .timeline-amount {
        text-align: left;
    }

    .dashboard-timeline .timeline-amount span {
        display: none;
    }

    .dashboard-record-list {
        gap: 9px;
    }

    .dashboard-record-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .dashboard-record-left {
        padding-top: 1px;
    }

    .dashboard-record-left::after {
        min-height: 18px;
        margin-top: 5px;
    }

    .dashboard-record-icon {
        width: 31px;
        height: 31px;
    }

    .dashboard-record-icon img {
        width: 22px;
        height: 22px;
    }

    .dashboard-record-date strong {
        font-size: 12px;
    }

    .dashboard-record-date span {
        font-size: 11px;
    }

    .dashboard-record-card {
        border-radius: 7px;
        padding: 9px 10px;
    }

    .dashboard-record-header {
        gap: 9px;
    }

    .dashboard-record-title {
        font-size: 15px;
    }

    .dashboard-repair-lines {
        gap: 4px;
    }

    .dashboard-repair-line {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 5px;
        font-size: 13px;
        line-height: 1.35;
    }

    .dashboard-record-chip {
        min-height: 18px;
        padding: 0 5px;
        font-size: 10px;
    }

    .dashboard-record-chip + .dashboard-record-chip,
    .dashboard-record-title .dashboard-record-chip {
        margin-left: 3px;
    }

    .dashboard-record-title-group-purchase {
        gap: 4px;
    }

    .dashboard-record-purchase-chip-row {
        gap: 4px;
    }

    .dashboard-record-purchase-chip {
        min-height: 18px;
        padding: 0 6px;
        font-size: 10px;
    }

    .dashboard-record-purchase-items {
        gap: 7px;
        margin-top: 8px;
        padding-top: 8px;
    }

    .dashboard-record-purchase-item {
        padding-left: 12px;
    }

    .dashboard-record-purchase-item strong {
        font-size: 13px;
    }

    .dashboard-record-purchase-item span {
        font-size: 11px;
    }

    .inventory-purchase-detail-section-header {
        align-items: flex-start;
    }

    .inventory-purchase-detail-item {
        padding: 13px;
    }

    .inventory-purchase-detail-item-header {
        display: grid;
        gap: 7px;
    }

    .inventory-purchase-detail-item-header > strong {
        text-align: left;
    }

    .inventory-purchase-detail-title-group h3 {
        font-size: 15px;
    }

    .inventory-purchase-detail-item-info {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .inventory-purchase-detail-item-info div {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .dashboard-repair-chips {
        gap: 3px;
    }

    .dashboard-record-badges {
        margin-top: 7px;
    }

    .dashboard-record-info-badge,
    .dashboard-record-paid-badge,
    .dashboard-record-discount-badge,
    .dashboard-record-mileage-badge {
        min-height: 22px;
        padding: 0 8px;
        font-size: 11px;
    }

    .dashboard-record-place {
        font-size: 12px;
    }

    .dashboard-record-meta-line {
        font-size: 12px;
    }

    .dashboard-record-amount {
        min-width: 74px;
    }

    .dashboard-record-amount strong {
        font-size: 15px;
    }

    .dashboard-record-amount small {
        font-size: 11px;
    }

    .dashboard-record-info {
        margin-top: 7px;
        gap: 8px;
        font-size: 12px;
    }

    .dashboard-record-info-line {
        gap: 5px;
    }

    .dashboard-record-memo {
        margin-top: 7px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .carwash-process-chip-list {
        gap: 4px;
    }

    .carwash-process-chip {
        min-height: 22px;
        padding: 0 8px;
        font-size: 11px;
    }

    .carwash-quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .carwash-quick-button {
        min-height: 52px;
        padding: 8px;
    }

    .carwash-quick-button strong {
        font-size: 12px;
    }

    .carwash-quick-button small {
        font-size: 10px;
    }

    .carwash-selected-panel {
        padding: 10px;
    }

    .carwash-chip-button {
        max-width: calc(100vw - 150px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .carwash-edit-layer {
        align-items: end;
        place-items: end center;
        padding: 12px;
    }

    .carwash-edit-card {
        max-height: calc(100dvh - 110px);
        overflow: auto;
        border-radius: 12px 12px 0 0;
    }
}

@media (max-width: 760px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
        overscroll-behavior-x: none;
    }

    .app-shell,
    .main-content,
    .repair-form,
    .record-form,
    .form-card,
    .form-grid,
    .totals-editor,
    .refuel-money-row,
    .refuel-station-fuel-row,
    .refuel-fuel-row,
    .refuel-balance-row,
    .carwash-process-editor,
    .carwash-selected-panel,
    .inline-total-preview,
    .station-picker-field,
    .segmented-field,
    .segmented-options,
    .carwash-quick-grid,
    .carwash-selected-list,
    .sticky-form-actions {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .repair-form,
    .record-form,
    .form-card {
        overflow-x: clip;
    }

    @supports not (overflow: clip) {
        .repair-form,
        .record-form,
        .form-card {
            overflow-x: hidden;
        }
    }

    .record-form {
        padding-bottom: calc(116px + env(safe-area-inset-bottom));
    }

    .form-card,
    .form-grid,
    .station-picker-field,
    .segmented-options,
    .other-category-picker,
    .other-category-chip-row,
    .carwash-card-options,
    .refuel-money-row,
    .refuel-fuel-row,
    .refuel-balance-row,
    .carwash-quick-grid,
    .carwash-selected-panel,
    .carwash-selected-list {
        width: 100%;
    }

    .form-grid > *,
    .station-picker-field > *,
    .segmented-options > *,
    .other-category-chip-row > *,
    .carwash-card-options > *,
    .refuel-money-row > *,
    .refuel-station-fuel-row > *,
    .refuel-fuel-row > *,
    .refuel-balance-row > *,
    .carwash-quick-grid > *,
    .carwash-selected-list > * {
        min-width: 0;
    }

    .station-picker-field input,
    .station-picker-field .ghost-button,
    .station-picker-field a {
        min-width: 0;
        max-width: 100%;
    }

    .refuel-money-row {
        gap: 10px;
    }

    .refuel-station-fuel-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .refuel-fuel-row {
        grid-template-columns: minmax(0, 1fr) 104px;
        gap: 8px;
    }

    .refuel-fuel-row .segmented-options {
        gap: 5px;
    }

    .refuel-fuel-row .segmented-options span {
        min-height: 42px;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 13px;
    }

    .refuel-balance-row {
        gap: 10px;
    }

    .place-picker-field {
        display: block;
    }

    .place-select-button {
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 13px;
    }

    .other-category-chip-row {
        gap: 7px;
    }

    .other-category-chip {
        min-height: 40px;
        flex: 0 1 auto;
        max-width: 100%;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 13px;
    }

    .other-category-chip span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .carwash-card-options span {
        min-height: 44px;
        padding-right: 8px;
        padding-left: 8px;
        white-space: nowrap;
    }

    .other-form-grid {
        grid-template-columns: repeat(10, minmax(0, 1fr));
        column-gap: 10px;
        row-gap: 16px;
    }

    .record-basic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 10px;
        row-gap: 16px;
    }

    .record-basic-grid > * {
        grid-column: 1 / -1;
    }

    .record-basic-grid > .record-date-field {
        grid-column: 1;
    }

    .record-basic-grid > .record-mileage-field {
        grid-column: 2;
    }

    .other-form-grid .span-2,
    .other-form-grid .fixed-cost-fields,
    .other-form-grid .selected-place-preview,
    .other-form-grid .other-place-field,
    .other-form-grid .other-category-field,
    .other-form-grid .other-amount-field,
    .other-form-grid.uses-wash-type .other-amount-field,
    .other-form-grid.uses-wash-type:not(.has-carwash-card) .other-amount-field:not([hidden]),
    .other-form-grid.uses-wash-type.has-carwash-card .other-amount-field:not([hidden]),
    .other-form-grid.is-self-detailing .other-place-field,
    .other-form-grid.is-self-detailing .other-category-field {
        grid-column: 1 / -1;
    }

    .other-form-grid .other-date-field,
    .other-form-grid .other-mileage-field {
        grid-column: span 5;
    }

    .record-date-field .input-icon-field,
    .record-mileage-field .input-icon-field,
    .other-date-field .input-icon-field,
    .other-mileage-field .input-icon-field {
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 6px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .record-date-field input[type="date"],
    .record-mileage-field input,
    .other-date-field input[type="date"],
    .other-mileage-field input {
        font-size: 16px;
    }

    .record-date-field input[type="date"],
    .other-date-field input[type="date"] {
        letter-spacing: 0;
    }

    .record-mileage-field input,
    .other-mileage-field input {
        text-align: left;
    }

    .other-category-extra {
        gap: 7px;
        padding: 9px;
    }

    .other-category-primary,
    .other-form-grid .other-category-primary {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: hidden;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .other-category-primary::-webkit-scrollbar,
    .other-form-grid .other-category-primary::-webkit-scrollbar {
        display: none;
    }

    .other-category-primary .other-category-chip,
    .other-form-grid .other-category-primary .other-category-chip {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        min-height: 38px;
        gap: 4px;
        justify-content: center;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    .other-category-primary .other-category-chip.is-active,
    .other-form-grid .other-category-primary .other-category-chip.is-active {
        flex: 0 0 auto;
        min-width: 0;
    }

    .other-category-primary .other-category-chip .icon,
    .other-form-grid .other-category-primary .other-category-chip .icon {
        width: 14px;
        height: 14px;
    }

    .other-category-primary .other-category-more,
    .other-form-grid .other-category-primary .other-category-more {
        flex: 0 0 auto;
        width: auto;
        min-width: 68px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .segmented-options {
        overflow-x: clip;
    }

    .segmented-options span {
        max-width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .carwash-quick-button {
        min-width: 0;
        overflow: hidden;
    }

    .carwash-quick-button strong,
    .carwash-quick-button small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .carwash-chip-button {
        max-width: 100%;
    }

    .other-inventory-header {
        display: grid;
        gap: 10px;
    }

    .other-inventory-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .other-inventory-row {
        gap: 8px;
        padding: 9px;
    }

    .other-inventory-row.is-stock-item {
        grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    }

    .other-inventory-row.is-manual-item {
        grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    }

    .other-inventory-product-field,
    .other-inventory-name-field {
        grid-column: 1 / -1;
    }

    .other-inventory-use-field {
        grid-column: span 2;
    }

    .other-inventory-stock-field {
        grid-column: span 2;
    }

    .other-inventory-quantity-field,
    .other-inventory-price-field,
    .other-inventory-total-field {
        grid-column: span 2;
    }

    .other-inventory-toggle {
        grid-column: span 2;
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
    }

    .other-inventory-purchase-field {
        grid-column: span 3;
    }

    .other-inventory-memo-field {
        grid-column: 1 / -2;
    }

    .other-inventory-row .remove-item-button {
        grid-column: -2 / -1;
    }

    .sticky-form-actions {
        max-width: min(390px, calc(100vw - 28px));
        box-sizing: border-box;
    }

    input,
    select,
    textarea {
        font-size: 15px;
    }

    select,
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    .filter-bar select,
    .form-card select,
    .drawer-account select,
    .stats-filter-mobile select,
    .car-edit-grid select,
    .form-card input[type="date"],
    .car-edit-grid input[type="date"] {
        display: block;
        width: 100%;
        max-width: 100%;
        height: 44px;
        min-height: 44px;
        line-height: normal;
        -webkit-appearance: none;
        appearance: none;
    }

    select,
    .filter-bar select,
    .form-card select,
    .drawer-account select,
    .stats-filter-mobile select,
    .car-edit-grid select {
        padding-right: 32px;
        background-color: #fff;
        background-image:
            linear-gradient(45deg, transparent 50%, #475569 50%),
            linear-gradient(135deg, #475569 50%, transparent 50%);
        background-position:
            calc(100% - 17px) 50%,
            calc(100% - 11px) 50%;
        background-size: 6px 6px, 6px 6px;
        background-repeat: no-repeat;
    }

    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    .form-card input[type="date"],
    .car-edit-grid input[type="date"] {
        min-width: 0;
        line-height: 44px;
        overflow: hidden;
    }

    input[type="file"],
    .form-card input[type="file"],
    .car-edit-grid input[type="file"] {
        height: auto;
        min-height: 44px;
        padding-top: 7px;
        padding-bottom: 7px;
        line-height: 28px;
    }

    input[type="date"]::-webkit-date-and-time-value,
    input[type="time"]::-webkit-date-and-time-value,
    input[type="datetime-local"]::-webkit-date-and-time-value {
        display: flex;
        align-items: center;
        height: 100%;
        width: 100%;
        min-width: 0;
        margin: 0;
        text-align: left;
    }

    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator,
    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        margin: 0;
        padding: 0;
    }
}

.dashboard-record-row.is-return-highlight .dashboard-record-card {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18), 0 14px 32px rgba(15, 23, 42, 0.12);
    transition: box-shadow 0.25s ease;
}

/* ==========================================================
   Merged restore: record search layout, year separators, fixed-cost fields
   ========================================================== */
.record-filter-panel {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
}

.record-filter-form {
    display: grid;
    gap: 8px;
    margin: 0;
}

.record-search-row {
    display: grid;
    grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.record-year-select {
    width: 100%;
    min-width: 0;
    height: var(--control-height);
    min-height: var(--control-height);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    padding: 0 28px 0 10px;
    background-color: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    line-height: var(--control-height);
}

.record-year-select:focus {
    border-color: #93c5fd;
    outline: 0;
    box-shadow: var(--focus-ring);
}

.record-search-field {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--control-height);
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fff;
}

.record-search-field:focus-within {
    border-color: #93c5fd;
    box-shadow: var(--focus-ring);
}

.record-search-field input {
    width: 100%;
    min-width: 0;
    height: var(--control-height);
    min-height: var(--control-height);
    border: 0;
    padding: 0 6px 0 14px;
    background: transparent;
    color: var(--text);
}

.record-search-field:focus-within input {
    outline: 0;
}

.record-search-button {
    width: var(--control-height);
    min-width: var(--control-height);
    height: var(--control-height);
    display: grid;
    place-items: center;
    border: 0;
    border-left: 1px solid var(--line);
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
}

.record-search-button .icon {
    width: 18px;
    height: 18px;
}

.record-search-button:hover {
    background: #eff6ff;
    color: var(--blue);
}

.record-result-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin: 0 0 0 2px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
}

.record-result-count-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: #64748b;
}

.record-result-count-icon .icon {
    width: 16px;
    height: 16px;
}

.dashboard-record-row {
    column-gap: 4px;
}

.dashboard-record-year-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 4px;
    align-items: center;
    margin: 8px 0 2px;
}

.dashboard-record-year-row:first-child {
    margin-top: 0;
}

.dashboard-record-year-label {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    margin-left: 10px;
    color: #64748b;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.dashboard-record-year-spacer {
    grid-column: 1;
}

.fixed-cost-fields {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbe5f5;
    border-radius: 12px;
    background: #f8fbff;
}

.fixed-cost-fields[hidden] {
    display: none !important;
}

.fixed-cost-fields > span {
    color: #1e40af;
    font-size: 13px;
    font-weight: 900;
}

.fixed-cost-inline-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.fixed-cost-tax-fields .fixed-cost-inline-grid {
    grid-template-columns: 96px minmax(0, 1fr);
}

.fixed-cost-insurance-fields .fixed-cost-inline-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.fixed-cost-period-field {
    gap: 7px;
}

.fixed-cost-period-field .segmented-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

.fixed-cost-period-field .segmented-options label {
    min-width: 0;
}

.fixed-cost-period-field .segmented-options span {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 0 5px;
    font-size: 12px;
    white-space: nowrap;
}

.fixed-cost-insurance-fields .fixed-cost-date-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.fixed-cost-date-row label {
    min-width: 0;
}

.fixed-cost-date-row label > span:first-child {
    font-size: 12px;
}

.fixed-cost-date-row .input-icon-field {
    min-width: 0;
    height: 40px;
    min-height: 40px;
    font-size: 13px;
}

.fixed-cost-date-row .input-icon-field .icon {
    width: 15px;
    height: 15px;
}

.form-card .fixed-cost-date-row .input-icon-field input[type="date"] {
    height: 40px;
    min-height: 40px;
    font-size: 13px;
}

@media (max-width: 760px) {
    .record-filter-panel {
        gap: 6px;
        margin-bottom: 14px;
    }

    .record-search-row {
        grid-template-columns: minmax(92px, 106px) minmax(0, 1fr);
        gap: 8px;
    }

    .record-year-select {
        height: var(--control-height);
        min-height: var(--control-height);
        font-size: 13px;
        line-height: var(--control-height);
        border-radius: var(--control-radius);
    }

    .record-search-field {
        min-width: 0;
        border-radius: var(--control-radius);
    }

    .record-search-field input {
        height: var(--control-height);
        min-height: var(--control-height);
        font-size: 16px;
    }

    .record-search-button {
        height: var(--control-height);
    }

    .record-result-count {
        margin-left: 2px;
        font-size: 13px;
    }

    .dashboard-record-row {
        grid-template-columns: 42px minmax(0, 1fr);
        column-gap: 4px;
    }

    .dashboard-record-year-row {
        grid-template-columns: 42px minmax(0, 1fr);
        column-gap: 4px;
        margin: 8px 0 1px;
    }

    .dashboard-record-year-label {
        margin-left: 8px;
        font-size: 14px;
    }

    .other-form-grid .fixed-cost-fields {
        grid-column: 1 / -1;
    }

    .fixed-cost-inline-grid,
    .fixed-cost-insurance-fields .fixed-cost-inline-grid,
    .fixed-cost-insurance-fields .fixed-cost-date-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .fixed-cost-period-field .segmented-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
    }

    .fixed-cost-period-field .segmented-options span {
        min-height: 36px;
        padding: 0 3px;
        font-size: 12px;
    }

    .other-form-grid {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }

    .other-form-grid .span-2,
    .other-form-grid .fixed-cost-fields,
    .other-form-grid .selected-place-preview,
    .other-form-grid .other-place-field,
    .other-form-grid .other-category-field,
    .other-form-grid .other-amount-field,
    .other-form-grid.uses-wash-type .other-amount-field,
    .other-form-grid.uses-wash-type:not(.has-carwash-card) .other-amount-field:not([hidden]),
    .other-form-grid.uses-wash-type.has-carwash-card .other-amount-field:not([hidden]) {
        grid-column: 1 / -1;
    }

    .other-form-grid .other-date-field,
    .other-form-grid .other-mileage-field {
        grid-column: span 5;
    }

    .other-form-grid .wash-type-field:not([hidden]) {
        grid-column: 1 / -1;
    }

    .other-form-grid.has-carwash-card .wash-type-field:not([hidden]) {
        grid-column: span 7;
    }

    .other-form-grid.has-carwash-card .carwash-card-field:not([hidden]) {
        grid-column: span 3;
    }

    .other-form-grid .wash-type-field .segmented-options {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
    }

    .other-form-grid .wash-type-field .segmented-options label,
    .other-form-grid .wash-type-field .segmented-options span {
        width: 100%;
    }

    .other-form-grid .wash-type-field .segmented-options span {
        min-height: 42px;
        padding-right: 4px;
        padding-left: 4px;
        font-size: 12px;
    }

    .carwash-card-toggle span {
        min-height: 42px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .carwash-card-toggle strong {
        font-size: 12px;
    }

    .carwash-card-toggle small {
        font-size: 10px;
    }

    .other-tail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .other-memo-field textarea {
        min-height: 84px;
    }
}

@media (max-width: 360px) {
    .record-search-row {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .record-year-select {
        padding-left: 8px;
        padding-right: 24px;
        font-size: 11px;
    }
}

.user-summary-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: #f8fafc;
}

.user-summary-card:hover {
    border-color: #bfdbfe;
    background: #fafdff;
    color: var(--blue);
}

.user-summary-card h3,
.user-summary-card p {
    margin: 0;
}

.user-summary-card h3 {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
}

.user-summary-card p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.user-summary-avatar,
.profile-image-preview {
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 950;
    border: 1px solid #bfdbfe;
}

.user-summary-avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

.user-summary-avatar img,
.profile-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-image-editor {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.profile-image-preview {
    width: 112px;
    height: 112px;
    font-size: 42px;
}

.profile-image-controls {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.profile-upload-field {
    display: grid;
    gap: 8px;
    font-weight: 850;
}

.profile-upload-field span {
    color: var(--muted);
    font-size: 13px;
}

.profile-image-controls p,
.settings-help-text {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

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

.user-edit-grid label {
    display: grid;
    gap: 7px;
    min-width: 0;
    font-weight: 850;
}

.user-edit-grid label span {
    color: var(--muted);
    font-size: 13px;
}

.user-edit-full {
    grid-column: 1 / -1;
}

.user-form-error {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 850;
}

.user-password-form {
    margin-top: 18px;
}

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

.settings-inline-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

@media (max-width: 760px) {
    .user-summary-card {
        grid-template-columns: 54px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 12px;
    }

    .user-summary-avatar {
        width: 54px;
        height: 54px;
        font-size: 21px;
    }

    .profile-image-editor {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 14px;
    }

    .profile-image-preview {
        width: 76px;
        height: 76px;
        font-size: 30px;
    }

    .user-edit-grid,
    .password-grid {
        grid-template-columns: 1fr;
    }

    .settings-inline-actions .primary-button {
        width: 100%;
    }
}

.user-profile-form input:not([type="checkbox"]):not([type="radio"]),
.user-password-form input:not([type="checkbox"]):not([type="radio"]),
.user-edit-grid textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
}

.user-edit-grid textarea {
    padding-top: 10px;
    resize: vertical;
}

.user-profile-form input[type="file"] {
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 26px;
}

.user-profile-form input:focus,
.user-password-form input:focus,
.user-edit-grid textarea:focus {
    border-color: #93c5fd;
    outline: 0;
    background: #fff;
    box-shadow: var(--focus-ring);
}

@media (max-width: 760px) {
    .repair-form .item-category-controls {
        grid-template-columns: minmax(84px, 1fr) auto;
        gap: 5px;
        align-items: center;
    }

    .repair-form .item-category-group.has-accident-link .item-category-controls {
        grid-template-columns: minmax(84px, 1fr) auto;
    }

    .repair-form .repair-accident-link-field {
        grid-column: 1 / -1;
    }

    .repair-form .item-category-select-field select {
        height: 34px;
        min-height: 34px;
        padding-left: 8px;
        padding-right: 24px;
        font-size: 12px;
        font-weight: 850;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        background-position:
            calc(100% - 14px) 50%,
            calc(100% - 8px) 50%;
        background-size: 5px 5px, 5px 5px;
    }

    .repair-form .item-category-meta {
        display: grid;
        grid-template-columns: auto 1px auto;
        gap: 3px;
        align-items: center;
        justify-content: start;
    }

    .repair-form .item-category-choice-divider {
        display: block;
        width: 1px;
        height: 26px;
        background: #cbd5e1;
    }

    .repair-form .item-category-meta .repair-choice-buttons {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .repair-form .item-category-meta .repair-choice-button {
        flex: 0 0 auto;
        min-width: 0;
        min-height: 34px;
        height: 34px;
        padding: 0 6px;
        border-radius: 9px;
        font-size: 11px;
        font-weight: 900;
        white-space: nowrap;
    }

    .repair-form .item-editor-row.is-warranty {
        grid-template-columns: 66px minmax(0, 1fr) 42px;
    }

    .repair-form .item-editor-row.is-warranty > label.item-name-field.item-full {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .repair-form .item-editor-row.is-warranty .remove-item-button {
        grid-column: 3;
        grid-row: 1;
    }

    .repair-form .item-editor-row.is-warranty .item-amount-row {
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: 1fr;
    }

    .repair-form .item-editor-row.is-warranty > label.item-memo-field.item-full {
        grid-column: 2 / 4;
        grid-row: 2;
    }
}

@media (max-width: 380px) {
    .repair-form .item-category-controls {
        grid-template-columns: minmax(72px, 1fr) auto;
        gap: 3px;
    }

    .repair-form .item-category-select-field select {
        padding-left: 7px;
        padding-right: 20px;
        font-size: 11px;
    }

    .repair-form .item-category-meta .repair-choice-buttons {
        gap: 2px;
    }

    .repair-form .item-category-meta .repair-choice-button {
        padding: 0 4px;
        font-size: 10px;
    }
}

.inventory-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.inventory-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.inventory-product-filter-form {
    gap: 10px;
}

.inventory-product-filter-row {
    display: grid;
    grid-template-columns:
        minmax(118px, 132px)
        minmax(132px, 152px)
        minmax(108px, 124px)
        minmax(136px, 168px)
        minmax(260px, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.inventory-product-filter-select {
    width: 100%;
    min-width: 0;
    height: var(--control-height);
    min-height: var(--control-height);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    padding: 0 28px 0 10px;
    background-color: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    line-height: var(--control-height);
}

.inventory-product-filter-select:focus {
    border-color: #93c5fd;
    outline: 0;
    box-shadow: var(--focus-ring);
}

.inventory-product-filter-search {
    width: 100%;
}

.inventory-product-filter-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    min-width: 0;
}

.inventory-product-filter-summary {
    width: auto;
    max-width: 100%;
}

.inventory-hide-inactive-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 11px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}

.inventory-hide-inactive-toggle input[type="checkbox"] {
    width: 15px;
    min-width: 15px;
    height: 15px;
    min-height: 15px;
    accent-color: var(--blue);
}

.inventory-summary-grid {
    margin-top: 12px;
}

.inventory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.inventory-layout-single {
    grid-template-columns: minmax(0, 1fr);
}

.inventory-panel {
    padding: 18px;
}

.inventory-section-head {
    margin-bottom: 14px;
}

.inventory-variant-card .form-help-text {
    margin-bottom: 14px;
}

.inventory-stock-fieldset {
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.inventory-simple-stock-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.inventory-simple-stock-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    font-weight: 850;
}

.inventory-simple-stock-grid label > span:first-child {
    color: var(--muted);
    font-size: 12px;
}

.inventory-simple-stock-grid input,
.inventory-simple-stock-grid select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.inventory-simple-stock-grid input {
    padding: 0 10px;
}

.inventory-simple-stock-grid input[inputmode="numeric"],
.inventory-simple-stock-grid input[inputmode="decimal"] {
    text-align: right;
}

.inventory-variant-list {
    display: grid;
    gap: 10px;
}

.inventory-variant-row {
    display: grid;
    grid-template-columns:
        minmax(150px, 1.1fr)
        minmax(96px, 0.65fr)
        minmax(96px, 0.65fr)
        minmax(84px, 0.55fr)
        minmax(92px, 0.55fr)
        minmax(108px, 0.65fr)
        auto
        42px;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    background: #f8fbff;
}

.inventory-variant-row label {
    display: grid;
    gap: 6px;
    min-width: 0;
    font-weight: 850;
}

.inventory-variant-row label > span:first-child {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-variant-row input:not([type="radio"]),
.inventory-variant-row select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.inventory-variant-row input:not([type="radio"]) {
    padding: 0 10px;
}

.inventory-variant-row input[inputmode="numeric"],
.inventory-variant-row input[inputmode="decimal"] {
    text-align: right;
}

.variant-default-field {
    justify-content: center;
    align-self: end;
    min-height: 40px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    color: #1e40af;
    font-size: 12px;
    white-space: nowrap;
}

.variant-default-field input[type="radio"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
}

.variant-remove-button {
    align-self: end;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border: 1px solid #fee2e2;
    background: #fff;
    color: var(--red);
}

.variant-remove-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.inventory-product-list,
.inventory-purchase-list {
    display: grid;
    gap: 10px;
}

.inventory-product-card,
.inventory-purchase-row {
    display: grid;
    gap: 5px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 14px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.inventory-product-card:hover,
.inventory-purchase-row:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.inventory-product-card.is-return-highlight,
.inventory-purchase-row.is-return-highlight {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.inventory-product-card.is-inactive {
    border-color: #fecaca;
    background: #fff7f7;
}

.inventory-product-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.inventory-product-kind {
    width: fit-content;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 900;
}

.inventory-product-vehicle-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #166534;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
}

.inventory-product-vehicle-chip.is-common {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.inventory-product-record-chip,
.inventory-product-inactive-chip,
.inventory-product-deleted-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #fde68a;
    border-radius: 999px;
    background: #fffbeb;
    color: #92400e;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
}

.inventory-product-record-chip.is-unused {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.inventory-product-record-chip.is-purchase {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.inventory-product-record-chip.is-usage {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.inventory-product-record-chip.is-zero {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.inventory-product-deleted-chip {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.inventory-product-inactive-chip {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.inventory-product-record-summary {
    gap: 8px;
}

.inventory-product-record-summary-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.inventory-product-record-summary-head h2,
.inventory-product-record-summary p {
    margin: 0;
}

.inventory-product-record-summary p {
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.5;
}

.inventory-product-record-summary small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.inventory-purchase-detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inventory-purchase-detail-section-header span,
.inventory-purchase-detail-count {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    white-space: nowrap;
}

.inventory-purchase-detail-item-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.detail-items-card .inventory-purchase-detail-item-list {
    margin-top: 0;
}

.inventory-purchase-detail-item-list.mobile-only {
    display: none;
}

.inventory-purchase-detail-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.inventory-purchase-detail-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: fixed;
}

.inventory-purchase-detail-table th,
.inventory-purchase-detail-table td {
    border-bottom: 1px solid #edf2f7;
    padding: 10px 12px;
    vertical-align: middle;
}

.inventory-purchase-detail-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
}

.inventory-purchase-detail-table tbody tr:last-child td {
    border-bottom: 0;
}

.inventory-purchase-detail-table tbody tr:hover {
    background: #f8fafc;
}

.inventory-purchase-detail-table th:first-child,
.inventory-purchase-detail-table td:first-child {
    width: 43%;
}

.inventory-purchase-detail-table .number-column {
    color: #303030;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.inventory-purchase-detail-table .discount-column {
    color: #dc2626;
}

.inventory-purchase-detail-table .total-column {
    color: #111827;
    font-weight: 950;
}

.inventory-purchase-detail-product-cell {
    min-width: 0;
}

.inventory-purchase-detail-table-title {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.inventory-purchase-detail-table-title strong {
    min-width: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.inventory-purchase-detail-table-chip-row {
    flex: 0 1 auto;
    gap: 4px;
}

.inventory-purchase-detail-table-chip-row .inventory-product-kind,
.inventory-purchase-detail-table-chip-row .inventory-product-vehicle-chip {
    min-height: 20px;
    padding: 0 7px;
    font-size: 10px;
}

.inventory-purchase-detail-product-cell small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.inventory-purchase-detail-product-cell .inventory-purchase-detail-table-memo {
    color: #475569;
}

.inventory-purchase-detail-item {
    min-width: 0;
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.inventory-purchase-detail-item-header {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.inventory-purchase-detail-title-group {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.inventory-purchase-detail-title-group h3 {
    margin: 0;
    color: #303030;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.inventory-purchase-detail-item-header > strong {
    flex: 0 0 auto;
    color: #303030;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
}

.inventory-purchase-detail-chip-row {
    align-items: flex-start;
}

.inventory-purchase-detail-item-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
}

.inventory-purchase-detail-item-info div {
    min-width: 0;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    overflow: hidden;
}

.inventory-purchase-detail-item-info dt,
.inventory-purchase-detail-item-info dd {
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    line-height: 1.35;
}

.inventory-purchase-detail-item-info dt {
    align-self: stretch;
    display: flex;
    align-items: center;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.inventory-purchase-detail-item-info dd {
    color: #303030;
    font-size: 13px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.inventory-purchase-detail-item-info dd strong {
    font-weight: 900;
}

.inventory-purchase-detail-item-memo {
    margin-top: 0;
}

@media (max-width: 760px) {
    .inventory-purchase-detail-item-list.mobile-only {
        display: grid;
    }
}

.inventory-product-card strong,
.inventory-purchase-row strong {
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-product-card small,
.inventory-purchase-row small {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-product-card em {
    color: var(--green);
    font-size: 14px;
    font-style: normal;
    font-weight: 900;
}

.purchase-product-picker-field {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    min-width: 0;
}

.form-card .purchase-product-picker-field > .form-field-label {
    grid-column: 1 / -1;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.purchase-product-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.purchase-product-select-button,
.purchase-product-picker-option {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.purchase-product-select-button {
    display: flex;
    align-items: center;
    min-height: var(--control-height);
    padding: 0 14px;
    line-height: 1.35;
}

.purchase-product-select-button > span {
    width: 100%;
    min-width: 0;
}

.purchase-product-select-button:hover,
.purchase-product-picker-option:hover,
.purchase-product-picker-option.is-selected {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.purchase-product-select-button.is-empty {
    border-style: dashed;
    background: #f8fafc;
}

.purchase-product-empty-summary,
.purchase-product-selected-summary,
.purchase-product-picker-card {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.purchase-product-picker-card strong,
.purchase-product-selected-summary strong,
.purchase-product-empty-summary strong {
    min-width: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.purchase-product-select-button .purchase-product-empty-summary,
.purchase-product-select-button .purchase-product-selected-summary {
    display: block;
}

.purchase-product-select-button .purchase-product-empty-summary strong,
.purchase-product-select-button .purchase-product-selected-summary strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 850;
}

.purchase-product-picker-card small,
.purchase-product-empty-summary small {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.purchase-product-picker-card em {
    min-width: 0;
    color: var(--green);
    font-size: 14px;
    font-style: normal;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.inventory-usage-picker-card .inventory-product-chip-row {
    flex-wrap: wrap;
}

.inventory-picker-clear-button {
    min-height: var(--control-height);
    justify-self: start;
    align-self: end;
}

.inventory-reference-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(120px, 0.8fr));
    gap: 8px;
    min-width: 0;
}

.inventory-reference-grid.is-compact {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.inventory-reference-grid[hidden] {
    display: none !important;
}

.inventory-reference-grid label {
    min-width: 0;
}

.inventory-reference-grid input,
.inventory-reference-grid select {
    width: 100%;
    min-width: 0;
}

.other-inventory-row .other-inventory-reference-grid {
    display: contents;
}

.purchase-product-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.purchase-product-picker-layer {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.38);
    overflow: auto;
}

.purchase-product-picker-layer[hidden] {
    display: none;
}

.purchase-product-picker-dialog {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    width: min(760px, 100%);
    max-height: min(760px, calc(100dvh - 36px));
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-modal);
    padding: 16px;
}

.purchase-product-picker-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.purchase-product-picker-header h3 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.purchase-product-picker-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.purchase-product-picker-search {
    max-width: none;
}

.purchase-product-picker-results {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.purchase-product-picker-option {
    display: block;
    padding: 13px;
}

.form-field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.purchase-items-card {
    --purchase-item-product-width: minmax(440px, 3fr);
    --purchase-item-quantity-width: 72px;
    --purchase-item-unit-width: 104px;
    --purchase-item-line-width: 118px;
    --purchase-item-memo-width: minmax(140px, 1fr);
    --purchase-item-delete-width: 38px;
    --purchase-item-column-gap: 10px;
    display: grid;
    gap: 10px;
}

.purchase-basic-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.purchase-basic-date-field,
.purchase-basic-car-field {
    grid-column: span 4;
}

.purchase-basic-vendor-field,
.purchase-basic-shipping-field,
.purchase-basic-discount-field,
.purchase-basic-total-field {
    grid-column: span 2;
}

.purchase-basic-memo-field {
    grid-column: 1 / -1;
}

.purchase-item-list {
    display: grid;
    gap: 8px;
}

.purchase-item-column-header {
    display: grid;
    grid-template-columns:
        var(--purchase-item-product-width)
        var(--purchase-item-quantity-width)
        var(--purchase-item-unit-width)
        var(--purchase-item-line-width)
        var(--purchase-item-memo-width)
        var(--purchase-item-delete-width);
    gap: var(--purchase-item-column-gap);
    align-items: center;
    padding: 0 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.purchase-item-column-header span:last-child {
    text-align: center;
}

.purchase-item-row {
    display: grid;
    gap: 0;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px 12px;
}

.purchase-item-grid {
    display: grid;
    grid-template-columns:
        var(--purchase-item-product-width)
        var(--purchase-item-quantity-width)
        var(--purchase-item-unit-width)
        var(--purchase-item-line-width)
        var(--purchase-item-memo-width)
        var(--purchase-item-delete-width);
    align-items: center;
    gap: var(--purchase-item-column-gap);
    min-width: 0;
}

.purchase-item-grid label,
.purchase-item-grid .purchase-product-picker-field {
    min-width: 0;
}

.purchase-item-product-field {
    grid-column: 1;
}

.purchase-item-product-field.purchase-product-picker-field {
    grid-template-columns: minmax(0, 1fr);
}

.purchase-item-product-control {
    min-width: 0;
}

.purchase-item-product-control .purchase-product-select-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
    min-height: 42px;
    padding-right: 8px;
}

.purchase-item-product-control .purchase-product-select-button > span {
    min-width: 0;
}

.purchase-cost-category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0 7px;
    background: #f0fdf4;
    color: #166534;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.purchase-cost-category-chip.is-repair {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.purchase-cost-category-chip[hidden] {
    display: none !important;
}

.purchase-item-variant-field {
    grid-column: 1;
}

.purchase-item-quantity-field {
    grid-column: 2;
}

.purchase-item-unit-field {
    grid-column: 3;
}

.purchase-item-line-field {
    grid-column: 4;
}

.purchase-item-memo-field {
    grid-column: 5;
}

.purchase-item-remove-button {
    grid-column: 6;
    align-self: center;
    justify-self: end;
}

@media (min-width: 768px) {
    .purchase-item-product-field > .form-field-label,
    .purchase-item-grid > label > span {
        display: none;
    }
}

.purchase-item-empty {
    margin: 0;
}

.inventory-purchase-row {
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
}

.inventory-purchase-row.is-hidden {
    background: #fff7f7;
    border-color: #fecaca;
    border-left: 4px solid #fca5a5;
}

.inventory-purchase-row time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.inventory-purchase-row b {
    color: var(--text);
    font-size: 15px;
    white-space: nowrap;
}

.inventory-car-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.inventory-car-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    min-width: 112px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 15px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.inventory-car-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.inventory-car-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-car-chip:has(input:checked) {
    border-color: #93c5fd;
    background: #eff6ff;
    color: var(--blue);
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.inventory-car-chip:focus-within {
    outline: 2px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.checkbox-line {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 9px !important;
    min-height: 42px;
    font-weight: 850;
}

.checkbox-line input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
}

.form-help-text {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

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

@media (max-width: 760px) {
    .accident-linked-repair-header {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 13px;
    }

    .accident-linked-repair-header > strong {
        align-self: flex-start;
    }

    .accident-linked-repair-table-wrap {
        overflow: visible;
    }

    .accident-linked-repair-table,
    .accident-linked-repair-table tbody,
    .accident-linked-repair-table tr,
    .accident-linked-repair-table td {
        display: block;
        width: 100%;
    }

    .accident-linked-repair-table thead {
        display: none;
    }

    .accident-linked-repair-table tr {
        padding: 12px 13px;
        border-bottom: 1px solid var(--line);
    }

    .accident-linked-repair-table tbody tr:last-child {
        border-bottom: 0;
    }

    .accident-linked-repair-table td {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 8px;
        border-bottom: 0;
        padding: 4px 0;
        overflow-wrap: anywhere;
    }

    .accident-linked-repair-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 850;
    }

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

    .accident-cost-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        padding: 10px;
    }

    .accident-cost-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .accident-cost-memo-field {
        grid-column: 1 / -1;
    }

    .accident-cost-form .chip-checkbox,
    .accident-cost-form .ghost-button,
    .accident-cost-form .primary-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .accident-cost-summary {
        grid-template-columns: 1fr;
    }

    .accident-cost-row {
        grid-template-columns: 1fr;
    }

    .accident-cost-row > form:last-child {
        justify-self: end;
    }

    .accident-cost-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .inventory-toolbar,
    .inventory-layout {
        grid-template-columns: 1fr;
    }

    .inventory-product-filter-row {
        grid-template-columns:
            minmax(110px, 130px)
            minmax(124px, 150px)
            minmax(104px, 118px)
            minmax(124px, 150px)
            minmax(220px, 1fr);
    }
}

@media (max-width: 760px) {
    .inventory-toolbar {
        gap: 10px;
    }

    .inventory-product-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .inventory-product-filter-search {
        grid-column: 1 / -1;
    }

    .inventory-product-filter-meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .inventory-product-filter-summary {
        width: 100%;
    }

    .inventory-hide-inactive-toggle {
        width: fit-content;
        max-width: 100%;
    }

    .inventory-panel {
        padding: 14px;
    }

    .inventory-purchase-row {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .inventory-purchase-row b {
        grid-column: 2;
        justify-self: start;
    }

    .inventory-car-checks {
        gap: 8px;
    }

    .inventory-car-chip {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        padding: 0 11px;
        font-size: 12px;
    }

    .inventory-simple-stock-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .inventory-variant-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding: 11px;
    }

    .variant-name-field {
        grid-column: 1 / -1;
    }

    .variant-default-field {
        justify-content: flex-start;
    }

    .variant-remove-button {
        justify-self: end;
    }
}

@media (max-width: 1200px) {
    .insurance-roadside-form {
        grid-template-columns: minmax(116px, .9fr) minmax(96px, .65fr) minmax(106px, .75fr) minmax(90px, .55fr) minmax(120px, 1fr) minmax(112px, auto);
        gap: 8px;
    }

    .insurance-roadside-form button {
        min-width: 112px;
    }

    .insurance-coverage-head,
    .insurance-coverage-row {
        grid-template-columns: minmax(140px, 1.1fr) minmax(170px, 1.3fr) 116px 38px;
        gap: 8px;
    }
}

@media (max-width: 760px) {
    .insurance-type-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insurance-type-options span {
        min-height: 42px;
        padding-right: 8px;
        padding-left: 8px;
        white-space: nowrap;
    }

    .insurance-premium-panel {
        padding: 14px;
    }

    .insurance-premium-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .insurance-standard-panel,
    .insurance-coverage-panel {
        padding: 14px;
    }

    .insurance-standard-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .insurance-coverage-panel .section-title-row {
        display: grid;
    }

    .insurance-coverage-panel .section-title-row .small-button {
        width: 100%;
        justify-content: center;
    }

    .insurance-coverage-group {
        padding: 9px;
    }

    .insurance-coverage-group-title {
        align-items: stretch;
    }

    .insurance-coverage-group-title .small-button {
        min-width: 112px;
    }

    .insurance-coverage-head {
        display: none;
    }

    .insurance-coverage-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 9px;
    }

    .insurance-coverage-row--special {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
    }

    .insurance-coverage-row--special label {
        gap: 7px;
    }

    .insurance-coverage-row--special label > .sr-only {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
        border: 0;
        color: #334155;
        font-size: 12px;
        font-weight: 850;
    }

    .insurance-coverage-remove {
        width: 44px;
        justify-self: end;
    }

    .insurance-standard-summary {
        gap: 6px;
    }

    .insurance-standard-summary span,
    .insurance-standard-detail span {
        min-height: 28px;
        padding: 5px 9px;
        font-size: 12px;
    }

    .insurance-coverage-detail-card {
        gap: 12px;
    }

    .insurance-coverage-detail-group {
        padding: 10px;
    }

    .insurance-coverage-detail-row {
        grid-template-columns: 1fr;
    }

    .insurance-coverage-detail-row--vehicle {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .insurance-coverage-detail-limit {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        line-height: 1.5;
    }

    .insurance-coverage-detail-limit--mobile-empty {
        display: none;
    }

    .insurance-coverage-detail-premium {
        justify-content: flex-start;
        text-align: left;
    }

    .insurance-coverage-detail-row--vehicle .insurance-coverage-detail-premium {
        justify-content: flex-end;
        text-align: right;
    }

    .insurance-date-pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .insurance-date-pair .input-icon-field {
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 5px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .insurance-date-pair input[type="date"] {
        min-width: 0;
        font-size: 14px;
    }

    .insurance-roadside-card {
        max-width: none;
        margin-right: 0;
        margin-left: 0;
    }

    .insurance-roadside-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
    }

    .insurance-roadside-form label:nth-of-type(4),
    .insurance-roadside-form label:nth-of-type(5),
    .insurance-roadside-form button {
        grid-column: 1 / -1;
    }

    .insurance-roadside-item {
        grid-template-columns: minmax(0, 1fr) 40px;
        padding: 12px;
    }

    .insurance-roadside-item > div {
        gap: 5px 7px;
    }

    .insurance-roadside-item p {
        grid-column: 1 / -1;
        margin-right: 0;
    }

    .insurance-roadside-item form {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }
}

.washcard-page {
    display: grid;
    gap: 18px;
}

.washcard-page-header {
    margin-bottom: 0;
}

.page-header .washcard-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.page-header .washcard-header-actions .ghost-button,
.page-header .washcard-header-actions .primary-button {
    height: 36px;
    min-height: 36px;
    line-height: 1;
}

.page-header .washcard-header-actions .icon {
    width: 18px;
    height: 18px;
}

.washcard-notice {
    width: fit-content;
    padding: 10px 13px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
}

.washcard-form {
    display: grid;
    gap: 18px;
}

.washcard-form-grid {
    align-items: end;
}

.washcard-place-field.is-locked input,
.washcard-balance-readonly input {
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
}

.washcard-balance-readonly input {
    color: var(--blue);
}

.washcard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.washcard-summary-grid.is-detail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.washcard-grid {
    display: grid;
    gap: 12px;
}

.washcard-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 28px;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 16px;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.washcard-card:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
    transform: translateY(-1px);
}

.washcard-card-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--blue);
    background: var(--blue-soft);
}

.washcard-card-body {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.washcard-card-body strong {
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.washcard-card-body small {
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.washcard-card-body em {
    width: fit-content;
    padding: 4px 9px;
    color: #2563eb;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    border-radius: 999px;
    background: #eff6ff;
}

.washcard-card-meta,
.washcard-selected-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    min-width: 0;
    width: 100%;
}

.washcard-card-balance,
.washcard-selected-meta strong {
    color: var(--blue);
    font-size: 17px;
    font-weight: 850;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.washcard-card-arrow {
    color: #94a3b8;
}

.washcard-selected-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.washcard-selected-main {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.washcard-selected-main > div {
    min-width: 0;
}

.washcard-selected-main h2,
.washcard-selected-main p {
    margin: 0;
}

.washcard-selected-main h2 {
    color: var(--text);
    font-size: 19px;
}

.washcard-selected-main p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 14px;
}

.washcard-selected-meta span {
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

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

.washcard-section-header h2,
.washcard-section-header span {
    margin: 0;
}

.washcard-section-header span {
    color: var(--muted);
    font-weight: 700;
}

.washcard-log-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.washcard-log-row {
    display: grid;
    grid-template-columns: 120px 92px minmax(0, 1fr) 128px 128px;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    font-size: 14px;
}

.washcard-log-row:last-child {
    border-bottom: 0;
}

.washcard-log-heading {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    background: #f8fafc;
}

.washcard-action {
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.washcard-action.is-charge {
    color: #1d4ed8;
    background: #dbeafe;
}

.washcard-action.is-use {
    color: #b91c1c;
    background: #fee2e2;
}

.washcard-log-memo {
    overflow: hidden;
    color: #475569;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.washcard-amount {
    justify-self: end;
    white-space: nowrap;
}

.washcard-amount.is-charge {
    color: #2563eb;
}

.washcard-amount.is-use {
    color: #dc2626;
}

.washcard-balance-after {
    justify-self: end;
    color: #475569;
    font-weight: 700;
    white-space: nowrap;
}

.washcard-empty {
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 1024px) {
    .washcard-summary-grid,
    .washcard-summary-grid.is-detail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .washcard-log-row {
        grid-template-columns: 110px 84px minmax(0, 1fr) 110px;
    }

    .washcard-log-row > :nth-child(5) {
        display: none;
    }
}

@media (max-width: 767px) {
    .purchase-basic-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-basic-date-field,
    .purchase-basic-car-field,
    .purchase-basic-vendor-field,
    .purchase-basic-shipping-field,
    .purchase-basic-discount-field,
    .purchase-basic-total-field,
    .purchase-basic-memo-field {
        grid-column: 1;
    }

    .purchase-item-row {
        gap: 10px;
        padding: 12px;
    }

    .purchase-item-column-header {
        display: none;
    }

    .purchase-item-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)) 38px;
        gap: 12px;
    }

    .purchase-item-product-field,
    .purchase-item-variant-field {
        grid-column: 1 / -1;
    }

    .purchase-item-product-control {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-item-product-control .purchase-product-select-button {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .purchase-item-quantity-field,
    .purchase-item-unit-field,
    .purchase-item-line-field {
        grid-column: span 3;
    }

    .purchase-item-memo-field {
        grid-column: 1 / -2;
    }

    .purchase-item-remove-button {
        grid-column: -2 / -1;
    }

    .purchase-product-select-button {
        min-height: var(--control-height);
        padding: 0 12px;
    }

    .purchase-product-picker-dialog {
        width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 14px;
    }

    .inventory-reference-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .attachment-preview-list {
        grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
        gap: 8px;
    }

    .attachment-preview-card {
        padding: 6px;
    }

    .attachment-delete-button {
        width: 28px;
        height: 28px;
    }

    .attachment-name {
        font-size: 11px;
    }

    .washcard-page {
        gap: 12px;
    }

    .washcard-page-header {
        align-items: flex-start;
    }

    .washcard-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .washcard-summary-grid,
    .washcard-summary-grid.is-detail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .washcard-card {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 11px;
        padding: 13px;
    }

    .washcard-card-icon {
        width: 40px;
        height: 40px;
    }

    .washcard-card-balance {
        font-size: 16px;
    }

    .washcard-selected-meta strong {
        font-size: 16px;
    }

    .washcard-card-arrow {
        display: none;
    }

    .washcard-selected-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .washcard-selected-card > strong {
        font-size: 19px;
    }

    .washcard-log-heading {
        display: none;
    }

    .washcard-log-row {
        grid-template-columns: 1fr auto;
        gap: 8px 10px;
        padding: 13px;
    }

    .washcard-log-row > :first-child {
        color: #475569;
        font-weight: 700;
    }

    .washcard-log-memo {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .washcard-amount {
        justify-self: start;
    }

    .washcard-balance-after {
        display: none;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fuel-price-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fuel-price-status {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.fuel-price-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card-soft);
}

.fuel-price-collect-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fbff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.fuel-price-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.fuel-price-tabs {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding: 4px 2px 2px;
    scrollbar-width: thin;
}

.fuel-price-tabs-row > .fuel-price-collect-pill {
    flex: 0 0 auto;
}

.fuel-price-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.fuel-price-tab:hover,
.fuel-price-tab:focus-visible {
    border-color: #bfdbfe;
    color: var(--blue);
    outline: none;
}

.fuel-price-tab.is-active {
    border-color: #93c5fd;
    background: #eff6ff;
    color: var(--blue);
}

.fuel-price-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

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

.fuel-price-summary-lead {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    background: #f8fbff;
}

.fuel-price-summary-lead span {
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
}

.fuel-price-summary-lead strong {
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.fuel-price-summary-lead p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
}

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

.fuel-price-average-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card-soft);
}

.fuel-price-average-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.fuel-price-average-card header div {
    min-width: 0;
}

.fuel-price-average-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.3;
}

.fuel-price-average-card header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.fuel-price-average-card header span {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fuel-price-best-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.fuel-price-best-badge {
    flex: 0 0 auto;
    padding: 0 10px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.fuel-price-fuel-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.fuel-price-fuel-row {
    display: grid;
    grid-template-columns: minmax(86px, .7fr) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fuel-price-fuel-row dt,
.fuel-price-fuel-row dd {
    margin: 0;
}

.fuel-price-fuel-row dt {
    color: #475569;
    font-size: 13px;
    font-weight: 850;
}

.fuel-price-fuel-row dd {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

.fuel-price-fuel-row dd strong {
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
    white-space: nowrap;
}

.fuel-price-favorite-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card-soft);
}

.fuel-price-favorite-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 14px;
}

.fuel-price-favorite-table th,
.fuel-price-favorite-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.fuel-price-favorite-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

.fuel-price-favorite-table th.is-default {
    background: #eff6ff;
    color: var(--blue);
}

.fuel-price-favorite-table tr:last-child td {
    border-bottom: 0;
}

.fuel-price-favorite-table tr.is-empty td {
    background: #f8fafc;
}

.fuel-price-favorite-station {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fuel-price-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: contain;
}

.fuel-price-favorite-station-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.fuel-price-favorite-name-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.fuel-price-favorite-name-line strong {
    min-width: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-price-favorite-station-main > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-price-favorite-price {
    min-width: 118px;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fuel-price-favorite-price.is-default {
    background: #f8fbff;
}

.fuel-price-favorite-price strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
}

.fuel-price-table-empty {
    color: #94a3b8;
    font-weight: 900;
}

.fuel-price-diff {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.fuel-price-diff.is-up {
    background: #fef2f2;
    color: #dc2626;
}

.fuel-price-diff.is-down {
    background: #eff6ff;
    color: #2563eb;
}

.fuel-price-diff.is-same {
    background: #f1f5f9;
    color: #64748b;
}

.fuel-price-diff.is-empty {
    background: #f8fafc;
    color: #94a3b8;
}

.fuel-price-empty-action {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.fuel-price-empty-action strong,
.fuel-price-empty-action span {
    display: block;
}

.fuel-price-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.fuel-price-panel-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
}

.fuel-price-panel-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.fuel-price-panel-header > strong {
    color: var(--blue);
    font-weight: 900;
    white-space: nowrap;
}

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

.fuel-price-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.fuel-price-filter-grid select,
.fuel-price-search-form select,
.fuel-price-search-form input {
    width: 100%;
    min-height: var(--control-height);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fff;
    padding: 0 12px;
    color: var(--text);
    font-weight: 800;
}

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

.fuel-price-metric-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card-soft);
}

.fuel-price-metric-card div {
    min-width: 0;
}

.fuel-price-metric-card p {
    margin: 0 0 4px;
    color: #334155;
    font-weight: 850;
}

.fuel-price-metric-card strong {
    display: block;
    font-size: 22px;
    font-weight: 950;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fuel-price-metric-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 750;
}

.fuel-price-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 14px;
    align-items: start;
}

.fuel-price-panel {
    min-width: 0;
    padding: 18px;
}

.fuel-price-top10-filter {
    display: grid;
    grid-template-columns: minmax(150px, .24fr) minmax(150px, .24fr);
    gap: 10px;
    margin-top: 16px;
}

.fuel-price-top10-filter label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.fuel-price-top10-filter select {
    width: 100%;
    min-height: var(--control-height);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fff;
    padding: 0 12px;
    color: #0f172a;
    font: inherit;
    font-weight: 800;
}

.fuel-price-trend-filter {
    display: grid;
    grid-template-columns: minmax(190px, .42fr) minmax(150px, .22fr);
    gap: 10px;
    margin-top: 16px;
}

.fuel-price-trend-filter label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.fuel-price-trend-filter select {
    width: 100%;
    min-height: var(--control-height);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fff;
    padding: 0 12px;
    color: #0f172a;
    font: inherit;
    font-weight: 800;
}

.fuel-price-trend-periods {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 520px;
    margin-top: 12px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.fuel-price-trend-periods a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-right: 1px solid #cbd5e1;
    color: #475569;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.fuel-price-trend-periods a:last-child {
    border-right: 0;
}

.fuel-price-trend-periods a:hover,
.fuel-price-trend-periods a:focus-visible {
    background: #f8fafc;
    color: #0f172a;
    outline: none;
}

.fuel-price-trend-periods a.is-active {
    background: #475569;
    color: #fff;
}

.fuel-price-trend-subsection {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.fuel-price-trend-subheader h3 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
    font-weight: 950;
    line-height: 1.25;
}

.fuel-price-trend-filter-secondary {
    grid-template-columns: minmax(190px, .42fr);
}

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

.fuel-price-trend-metric {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.fuel-price-trend-metric span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.fuel-price-trend-metric strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fuel-price-trend-metric strong.fuel-price-diff {
    justify-self: start;
    font-size: 13px;
}

.fuel-price-trend-chart-wrap {
    overflow-x: auto;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card-soft);
}

.fuel-price-trend-chart {
    display: block;
    width: 100%;
    min-width: 680px;
    height: auto;
}

.fuel-price-chart-grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.fuel-price-chart-base {
    stroke: #64748b;
    stroke-width: 3;
}

.fuel-price-chart-axis {
    color: #64748b;
    fill: #64748b;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.fuel-price-chart-xaxis {
    font-size: 12px;
}

.fuel-price-chart-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fuel-price-chart-line.is-national,
.fuel-price-chart-point.is-national circle {
    stroke: #60a5fa;
}

.fuel-price-chart-line.is-selected,
.fuel-price-chart-point.is-selected circle {
    stroke: #f59e0b;
}

.fuel-price-chart-line.is-premium,
.fuel-price-chart-point.is-premium circle {
    stroke: #f59e0b;
}

.fuel-price-chart-line.is-gasoline,
.fuel-price-chart-point.is-gasoline circle {
    stroke: #2563eb;
}

.fuel-price-chart-line.is-diesel,
.fuel-price-chart-point.is-diesel circle {
    stroke: #16a34a;
}

.fuel-price-chart-point circle {
    fill: #fff;
    stroke-width: 3;
}

.fuel-price-chart-point:hover circle {
    stroke-width: 4;
}

.fuel-price-chart-tooltip {
    opacity: 0;
    pointer-events: none;
}

.fuel-price-chart-point:hover .fuel-price-chart-tooltip,
.fuel-price-chart-point:focus .fuel-price-chart-tooltip {
    opacity: 1;
}

.fuel-price-chart-tooltip rect {
    fill: #fff;
    stroke: #93c5fd;
    filter: url(#fuel-price-chart-tooltip-shadow);
}

.fuel-price-chart-tooltip text {
    fill: #475569;
    font-size: 12px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.fuel-price-trend-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 10px;
}

.fuel-price-trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 850;
}

.fuel-price-trend-legend i {
    display: inline-block;
    width: 18px;
    height: 0;
    border-top: 2px solid currentColor;
}

.fuel-price-trend-legend span.is-national i {
    border-color: #60a5fa;
}

.fuel-price-trend-legend span.is-selected i {
    border-color: #f59e0b;
}

.fuel-price-trend-legend span.is-premium i {
    border-color: #f59e0b;
}

.fuel-price-trend-legend span.is-gasoline i {
    border-color: #2563eb;
}

.fuel-price-trend-legend span.is-diesel i {
    border-color: #16a34a;
}

.fuel-price-empty-message {
    margin: 14px 0 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
}

.fuel-price-lowtop-table-wrap {
    overflow-x: auto;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card-soft);
}

.fuel-price-lowtop-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
}

.fuel-price-lowtop-table th,
.fuel-price-lowtop-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.fuel-price-lowtop-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

.fuel-price-lowtop-table tr:last-child td {
    border-bottom: 0;
}

.fuel-price-lowtop-rank {
    width: 68px;
    color: var(--blue);
    font-size: 16px;
    font-weight: 950;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.fuel-price-lowtop-station {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fuel-price-lowtop-station-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.fuel-price-lowtop-station-main strong,
.fuel-price-lowtop-station-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-price-lowtop-station-main strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.35;
}

.fuel-price-lowtop-station-main span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

.fuel-price-lowtop-price {
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fuel-price-lowtop-diff {
    text-align: right;
    white-space: nowrap;
}

.fuel-price-table-wrap {
    overflow-x: auto;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.fuel-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fuel-price-table th,
.fuel-price-table td {
    padding: 12px 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.fuel-price-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.fuel-price-table th:last-child,
.fuel-price-table td:last-child {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fuel-price-table tr:last-child td {
    border-bottom: 0;
}

.fuel-price-station-list,
.fuel-price-search-results {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.fuel-price-station-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.fuel-price-station-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.fuel-price-station-main strong {
    overflow: hidden;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-price-station-main span,
.fuel-price-station-main small {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-price-station-side {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
}

.fuel-price-station-side > strong {
    color: var(--blue);
    font-size: 18px;
    font-weight: 950;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fuel-price-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 14px;
}

.settings-fuel-price-search-form {
    grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr) auto;
}

.fuel-price-empty {
    margin: 14px 0 0;
    padding: 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.fuel-price-notify-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.fuel-price-notify-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: grab;
    user-select: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.fuel-price-notify-card:hover,
.fuel-price-notify-card:focus-visible {
    border-color: #bfdbfe;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    outline: none;
}

.fuel-price-notify-card:active {
    cursor: grabbing;
}

.fuel-price-notify-card.is-dragging {
    opacity: .58;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.fuel-price-drag-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 15px;
    font-weight: 950;
    line-height: 1;
}

.fuel-price-notify-list.is-saving .fuel-price-notify-card {
    cursor: progress;
}

.fuel-price-notify-list.is-sort-failed .fuel-price-notify-card {
    border-color: #fecaca;
}

.fuel-price-sort-status.is-visible {
    position: static;
    width: auto;
    height: auto;
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff7f7;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 850;
    clip: auto;
    clip-path: none;
    overflow: visible;
    white-space: normal;
}

.fuel-price-notify-main {
    display: grid;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.fuel-price-notify-main span {
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.fuel-price-notify-main strong,
.fuel-price-notify-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-price-notify-main strong {
    font-size: 15px;
    font-weight: 950;
}

.fuel-price-notify-main small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.fuel-price-notify-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.fuel-price-notify-actions form {
    margin: 0;
}

.fuel-price-notify-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fff7f7;
    color: #dc2626;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.fuel-price-notify-delete-button:hover,
.fuel-price-notify-delete-button:focus-visible {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #b91c1c;
}

.fuel-price-notify-delete-button:active {
    transform: translateY(1px);
}

.fuel-price-notify-form {
    display: grid;
    grid-template-columns: minmax(104px, .72fr) minmax(136px, .9fr) minmax(96px, .62fr) minmax(136px, .9fr) minmax(206px, 1.16fr) minmax(104px, auto);
    gap: 8px;
    align-items: end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.fuel-price-notify-form label,
.fuel-price-notify-fuels {
    min-width: 0;
}

.fuel-price-notify-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.fuel-price-notify-form input[type="text"],
.fuel-price-notify-form select {
    width: 100%;
    min-height: var(--control-height);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fff;
    padding: 0 12px;
    color: var(--text);
    font-weight: 800;
}

.fuel-price-notify-form .notify-field {
    display: none;
}

.fuel-price-notify-form[data-notify-type-value="avg_price"] .notify-field-avg,
.fuel-price-notify-form[data-notify-type-value="station_detail"] .notify-field-station,
.fuel-price-notify-form[data-notify-type-value="lowtop"] .notify-field-lowtop {
    display: flex;
}

.fuel-price-notify-submit {
    width: 100%;
    min-width: 112px;
    white-space: nowrap;
}

.fuel-price-notify-fuels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
}

.fuel-price-notify-fuels legend {
    width: 100%;
    margin: 0 0 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.fuel-price-notify-fuels label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.fuel-price-notify-fuels input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fuel-price-notify-fuels span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.fuel-price-notify-fuels input:checked + span {
    border-color: #93c5fd;
    background: #eff6ff;
    color: var(--blue);
}

.fuel-price-notify-fuels input:focus-visible + span {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}

.fuel-price-notify-fuels label:hover span {
    border-color: #bfdbfe;
    color: var(--blue);
}

.telegram-preview-box {
    margin: 16px 0 0;
    max-height: 520px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: anywhere;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    background: #f8fbff;
    color: #0f172a;
    padding: 16px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.7;
    font-family: var(--font-family);
    font-variant-numeric: tabular-nums;
}

.telegram-preview-box:focus {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}

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

    .fuel-price-main-grid {
        grid-template-columns: 1fr;
    }

    .fuel-price-placeholder-grid {
        grid-template-columns: 1fr;
    }

    .fuel-price-average-grid {
        grid-template-columns: 1fr;
    }

    .fuel-price-notify-form {
        grid-template-columns: minmax(96px, .7fr) minmax(118px, .82fr) minmax(90px, .58fr) minmax(118px, .82fr) minmax(188px, 1fr) minmax(96px, auto);
    }
}

@media (max-width: 767px) {
    .fuel-price-page {
        gap: 12px;
    }

    .fuel-price-panel {
        padding: 14px;
    }

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

    .fuel-price-collect-pill {
        justify-self: start;
        max-width: 100%;
        justify-content: center;
        white-space: normal;
        line-height: 1.35;
    }

    .fuel-price-tabs {
        width: 100%;
        margin-right: -14px;
        padding-right: 14px;
    }

    .fuel-price-tab {
        min-height: 36px;
        padding: 0 13px;
        font-size: 13px;
    }

    .fuel-price-summary-lead {
        padding: 14px;
    }

    .fuel-price-summary-lead strong {
        font-size: 19px;
    }

    .fuel-price-top10-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .fuel-price-trend-filter {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .fuel-price-trend-chart {
        min-width: 620px;
    }

    .fuel-price-lowtop-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .fuel-price-lowtop-table {
        min-width: 0;
    }

    .fuel-price-lowtop-table,
    .fuel-price-lowtop-table tbody,
    .fuel-price-lowtop-table tr,
    .fuel-price-lowtop-table td {
        display: block;
    }

    .fuel-price-lowtop-table thead {
        display: none;
    }

    .fuel-price-lowtop-table tbody {
        display: grid;
        gap: 10px;
    }

    .fuel-price-lowtop-table tr {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 4px 10px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
        box-shadow: var(--shadow-card-soft);
    }

    .fuel-price-lowtop-table td {
        padding: 0;
        border-bottom: 0;
    }

    .fuel-price-lowtop-rank {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        grid-row: 1 / 4;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: #eff6ff;
        font-size: 14px;
    }

    .fuel-price-lowtop-price,
    .fuel-price-lowtop-diff {
        grid-column: 2;
        text-align: left;
    }

    .fuel-price-lowtop-station {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .fuel-price-lowtop-price {
        margin-top: 4px;
        font-size: 16px;
    }

    .fuel-price-average-card {
        padding: 14px;
    }

    .fuel-price-average-card header {
        flex-direction: column;
        gap: 4px;
    }

    .fuel-price-fuel-row {
        grid-template-columns: minmax(74px, .62fr) minmax(0, 1fr);
        gap: 8px;
    }

    .fuel-price-fuel-row dd {
        gap: 6px;
    }

    .fuel-price-fuel-row dd strong {
        font-size: 16px;
    }

    .fuel-price-diff {
        min-width: 48px;
        padding: 0 7px;
    }

    .fuel-price-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .fuel-price-filter-grid label {
        font-size: 12px;
    }

    .fuel-price-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .fuel-price-trend-metrics {
        gap: 8px;
    }

    .fuel-price-trend-metric {
        padding: 12px;
    }

    .fuel-price-trend-metric strong {
        font-size: 16px;
    }

    .fuel-price-metric-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 13px;
    }

    .fuel-price-metric-card strong {
        font-size: 18px;
    }

    .fuel-price-panel-header h2 {
        font-size: 18px;
    }

    .fuel-price-station-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .fuel-price-station-side {
        width: 100%;
        justify-content: space-between;
    }

    .fuel-price-search-form {
        grid-template-columns: 1fr;
    }

    .fuel-price-table th,
    .fuel-price-table td {
        padding: 10px;
    }

    .fuel-price-favorite-table {
        min-width: 640px;
    }

    .fuel-price-favorite-table th,
    .fuel-price-favorite-table td {
        padding: 10px;
    }

    .fuel-price-brand-icon {
        width: 30px;
        height: 30px;
    }

    .fuel-price-notify-card {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: flex-start;
    }

    .fuel-price-notify-actions {
        grid-column: 1 / -1;
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
    }

    .fuel-price-notify-form {
        grid-template-columns: 1fr;
    }

    .fuel-price-notify-fuels span {
        min-height: 36px;
    }
}

@media (max-width: 430px) {
    .fuel-price-filter-grid {
        grid-template-columns: 1fr;
    }
}
