:root {
    color-scheme: light;
    --ink: #1c2024;
    --muted: #777d82;
    --line: #e9e8e4;
    --paper: #f5f4f1;
    --white: #fff;
    --gold: #e6b900;
    --gold-dark: #bd9700;
    --dark: #151719;
    --green: #397b5d;
    --green-pale: #eaf4ee;
    --shadow: 0 12px 36px rgb(30 32 34 / 5%);
    font-family: "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(5.4vw, 24px);
    color: var(--white);
    background: var(--dark);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: inherit;
    text-decoration: none;
}

.brand img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 11px;
    background: #000;
}

.brand-copy,
.brand-copy span {
    display: block;
}

.brand-copy strong {
    font-family: Manrope, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.brand-copy span {
    margin-top: 2px;
    color: #a3a6a8;
    font-size: 11px;
    letter-spacing: .035em;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c3c5c6;
    font-size: 12px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #72bd8f;
    box-shadow: 0 0 0 4px rgb(114 189 143 / 12%);
}

.page {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 42px 0 25px;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--gold-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2,
.metric-value,
.service-value {
    font-family: "Segoe UI", Arial, sans-serif;
}

h1 {
    margin-bottom: 7px;
    font-size: clamp(27px, 3.3vw, 36px);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.2;
}

.welcome-copy {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

.today {
    padding: 0 0 3px;
    text-align: right;
}

.today-label {
    display: block;
    margin-bottom: 5px;
    color: #9a9b97;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
}

.today time {
    color: #555a5c;
    font-size: 12px;
    text-transform: capitalize;
}

.metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr;
    gap: 13px;
    margin-bottom: 18px;
}

.metric-card {
    min-height: 117px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 17px 20px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.metric-label {
    color: #747a7d;
    font-size: 11px;
    font-weight: 500;
}

.metric-value {
    margin-top: 3px;
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -.06em;
    line-height: 1.25;
}

.metric-note {
    margin-top: auto;
    color: #a0a3a2;
    font-size: 10px;
}

.metric-card-accent {
    position: relative;
    overflow: hidden;
}

.metric-card-accent::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: var(--gold);
    content: "";
}

.metric-card-brand {
    color: #f7f7f5;
    border-color: #242628;
    background: #1e2123;
}

.metric-card-brand .metric-label,
.metric-card-brand .metric-note {
    color: #aeb1b0;
}

.service-value {
    margin-top: 9px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.035em;
}

.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    min-width: 0;
    padding: 23px 24px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 21px;
}

.heading-icon {
    width: 36px;
    height: 36px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    color: #252313;
    background: #f9edbc;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
}

.heading-icon-dark {
    color: #fff;
    background: #25282a;
    font-size: 22px;
}

.panel-heading .eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
}

h2 {
    margin-bottom: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.035em;
}

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

.field {
    min-width: 0;
    margin-bottom: 13px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    color: #4d5355;
    font-size: 11px;
    font-weight: 600;
}

.field input,
.table-search input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 11px;
    border: 1px solid #e5e5e1;
    border-radius: 5px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 12px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field input::placeholder,
.table-search input::placeholder {
    color: #b0b2b1;
}

.field input:focus,
.table-search input:focus {
    border-color: #c8a72e;
    box-shadow: 0 0 0 3px rgb(230 185 0 / 12%);
}

.button {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
    opacity: .65;
    transform: none;
}

.button-primary {
    width: 100%;
    min-height: 42px;
    justify-content: space-between;
    padding: 0 14px;
    color: #171716;
    background: var(--gold);
}

.button-primary:hover {
    background: #f0c717;
}

.button-primary span:last-child {
    font-size: 17px;
}

.form-footnote {
    margin: 9px 0 0;
    color: #999d9d;
    font-size: 10px;
}

.panel-intro {
    max-width: 360px;
    margin: -4px 0 19px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.search-control {
    display: flex;
    gap: 8px;
}

.search-control input {
    flex: 1;
}

.button-dark {
    flex: 0 0 82px;
    color: #fff;
    background: #202325;
}

.button-dark:hover {
    background: #363a3c;
}

.search-result {
    min-height: 80px;
    margin-top: 5px;
}

.result-placeholder {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px dashed #e6e5df;
    border-radius: 6px;
    color: #9b9f9e;
    font-size: 11px;
}

.placeholder-mark {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #848987;
    background: #f3f3f0;
    font-size: 20px;
}

.vehicle-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e8e8e2;
    border-radius: 6px;
    background: #fcfcfa;
}

.vehicle-result-main {
    min-width: 0;
}

.vehicle-result-main strong {
    display: block;
    overflow: hidden;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-result-main span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.button-exit {
    flex: 0 0 auto;
    padding: 0 12px;
    color: #fff;
    background: #292c2d;
}

.button-exit:hover {
    background: #101213;
}

.search-error {
    padding: 11px 12px;
    border-radius: 5px;
    color: #914d35;
    background: #fbf0e9;
    font-size: 11px;
}

.vehicle-panel {
    padding: 22px 24px 7px;
}

.table-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}

.table-heading .eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
}

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

.table-search {
    width: 175px;
    position: relative;
}

.table-search > span {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1;
    color: #969a99;
    font-size: 17px;
    transform: translateY(-52%);
}

.table-search input {
    height: 34px;
    padding-left: 30px;
    font-size: 10px;
}

.button-outline {
    min-height: 34px;
    padding: 0 10px;
    border-color: #e4e4df;
    color: #525758;
    background: #fff;
    font-size: 10px;
}

.button-outline:hover {
    border-color: #c9c8c0;
    background: #fafaf8;
}

.button-outline span {
    font-size: 15px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

th {
    padding: 10px 12px;
    border-top: 1px solid #efefec;
    border-bottom: 1px solid #efefec;
    color: #929795;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .055em;
    text-transform: uppercase;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f0f0ed;
    color: #53595a;
    font-size: 11px;
}

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

tbody tr:hover {
    background: #fdfcf8;
}

.code-cell {
    color: #313637;
    font-weight: 700;
}

.plate-cell {
    color: #222729;
    font-weight: 600;
    letter-spacing: .025em;
}

.vehicle-detail {
    display: block;
    margin-top: 2px;
    color: #999e9d;
    font-size: 9px;
}

.state-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 20px;
    color: var(--green);
    background: var(--green-pale);
    font-size: 9px;
    font-weight: 600;
}

.state-pill::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #53a173;
    content: "";
}

.table-message {
    min-height: 22px;
    margin: 0;
    padding: 8px 12px 12px;
    color: #909593;
    font-size: 10px;
}

.table-message:empty {
    display: none;
}

.footer {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #929694;
    font-size: 10px;
}

.footer img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 5px;
    background: #151719;
}

.footer-separator {
    color: #c0b99e;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 5;
    max-width: min(360px, calc(100vw - 44px));
    padding: 13px 16px;
    border: 1px solid #34383a;
    border-radius: 6px;
    color: #fff;
    background: #202325;
    box-shadow: 0 8px 24px rgb(0 0 0 / 17%);
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast.is-error {
    border-color: #9a5e49;
    background: #713d2d;
}

@media (max-width: 760px) {
    .topbar {
        min-height: 68px;
        padding: 0 20px;
    }

    .brand img {
        width: 44px;
        height: 44px;
    }

    .topbar-status {
        font-size: 0;
    }

    .page {
        width: min(100% - 32px, 600px);
    }

    .welcome {
        align-items: flex-start;
        padding-top: 30px;
    }

    .today {
        padding-top: 7px;
    }

    .metrics {
        grid-template-columns: 1fr 1fr;
    }

    .metric-card-brand {
        grid-column: span 2;
        min-height: 90px;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 20px;
    }

    .vehicle-panel {
        padding: 19px 16px 5px;
    }

    .table-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-actions {
        width: 100%;
    }

    .table-search {
        flex: 1;
    }
}

@media (max-width: 450px) {
    .welcome {
        gap: 10px;
    }

    .welcome-copy {
        max-width: 245px;
        font-size: 12px;
    }

    .today time {
        max-width: 100px;
        display: block;
        font-size: 10px;
    }

    .metrics {
        gap: 9px;
    }

    .metric-card {
        min-height: 105px;
        padding: 14px;
    }

    .metric-value {
        font-size: 25px;
    }

    .metric-label {
        font-size: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
