:root {
    color-scheme: light;
    --ink: #333333;
    --muted: #666a70;
    --line: #e0dede;
    --field: #f8f8f8;
    --accent: #2ba0a3;
    --accent-dark: #24272d;
    --danger: #b42318;
    --ok: #087443;
    --dark: #24272d;
}

* {
    box-sizing: border-box;
}

body {
    color: var(--ink);
}

.parking-shell {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(44px, 7vw, 82px) 0;
}

.parking-shell.narrow {
    width: min(560px, calc(100% - 32px));
}

.parking-admin-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: -24px 0 36px;
    padding: 12px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.parking-admin-nav-title {
    color: var(--dark);
    font-weight: 700;
}

.parking-admin-nav a {
    color: var(--muted);
    text-decoration: none;
}

.parking-admin-nav a:hover,
.parking-admin-nav a[aria-current="page"] {
    color: var(--accent-dark);
    text-decoration: underline;
}

.panel {
    background: white;
    border: 0;
    border-radius: 0;
    padding: 0;
}

h1 {
    margin: 0 0 8px;
    color: var(--dark);
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: 0;
}

h2 {
    margin: 24px 0 12px;
    font-size: 20px;
}

p {
    line-height: 1.5;
}

.muted {
    color: var(--muted);
}

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

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

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #b8c2cc;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 16px;
    background: var(--field);
}

select {
    appearance: none;
}

.registration-input {
    text-transform: uppercase;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 4px;
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

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

.summary-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permit-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    margin: 20px 0;
    padding: 2px;
    background: var(--line);
    border-radius: 5px;
}

.permit-switcher-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 10px 14px;
    color: var(--muted);
    background: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.permit-switcher-option[aria-current="page"] {
    color: #ffffff;
    background: var(--accent-dark);
}

.permit-switcher-option:hover,
.permit-switcher-option:focus {
    color: #ffffff;
    background: var(--accent);
}

.stat {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px;
    background: #fbfcfd;
}

.stat strong {
    display: block;
    font-size: 22px;
    margin-top: 4px;
}

.notice {
    border-left: 4px solid var(--accent);
    background: #ecfdf8;
    padding: 12px 14px;
    margin: 18px 0;
}

.discount-quote {
    margin: 12px 0;
    color: #087443;
    font-weight: 700;
}

.permit-hours-diagram {
    margin: 24px 0;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.permit-hours-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.permit-hours-heading h2 {
    margin: 0;
}

.permit-hours-heading p {
    max-width: 470px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.permit-hours-rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.single-permit-limit {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 4px solid var(--accent);
    background: #ecfdf8;
    line-height: 1.45;
}

.permit-hours-rule {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fbfcfd;
}

.permit-hours-rule h3 {
    margin: 0 0 14px;
    color: var(--dark);
    font-size: 16px;
}

.permit-timebar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    min-height: 50px;
    overflow: hidden;
    border: 1px solid #c7d1d7;
    border-radius: 4px;
    background: #ffffff;
}

.permit-timebar-overnight {
    grid-template-columns: 1fr;
}

.permit-time {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px 7px;
    border-right: 1px solid #c7d1d7;
    color: #9f2823;
    background: #fff1ef;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.permit-timebar-overnight .permit-time {
    min-height: 42px;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid #c7d1d7;
}

.permit-timebar-overnight .permit-time:last-child {
    min-height: 36px;
    border-bottom: 0;
}

.permit-time:last-child {
    border-right: 0;
}

.permit-time.active {
    color: #ffffff;
    background: #087443;
}

.permit-time.inactive {
    color: #9f2823;
    background: #fff1ef;
}

.permit-time-status {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    align-self: center;
    margin-bottom: 2px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
    background: #b42318;
}

.permit-timebar-overnight .permit-time-status {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.permit-time.active .permit-time-status {
    color: #087443;
    background: #ffffff;
}

.permit-time-full {
    grid-column: 1 / -1;
}

.parking-explainer {
    margin: 28px 0 18px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.parking-explainer h2 {
    margin: 0 0 6px;
}

.parking-explainer p {
    max-width: 680px;
    margin: 0;
}

.permit-form-note {
    max-width: 720px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.permit-hours-details {
    margin-top: 26px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.permit-hours-details > summary {
    padding: 16px 0;
    color: var(--dark);
    font-weight: 700;
    cursor: pointer;
}

.permit-hours-details[open] > summary {
    border-bottom: 1px solid var(--line);
}

.permit-hours-details .permit-hours-diagram {
    margin: 0;
    border: 0;
}

.parking-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 28px 0 8px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.parking-route h2 {
    margin: 0 0 4px;
}

.parking-route p {
    margin: 0;
    color: var(--muted);
}

.primary-cta {
    min-height: 52px;
    padding: 12px 22px;
    font-size: 17px;
    white-space: nowrap;
}

.parking-return {
    margin-top: 32px;
}

.terms-box {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 16px;
    margin-top: 18px;
    background: #fbfcfd;
}

.terms-gate {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 24px 0 12px;
}

.terms-consent {
    margin: 20px 0 12px;
}

.terms-consent .check-row {
    margin: 0;
}

.terms-link {
    min-height: auto;
    margin: 8px 0 0 32px;
    padding: 0;
    border: 0;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    background: transparent;
}

.terms-link:hover,
.terms-link:focus {
    color: var(--accent-dark);
    background: transparent;
}

.terms-dialog {
    width: min(680px, calc(100% - 32px));
    max-height: min(720px, calc(100vh - 32px));
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: var(--ink);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.terms-dialog::backdrop {
    background: rgba(18, 21, 26, 0.7);
}

.terms-dialog-content {
    overflow: auto;
    max-height: inherit;
    padding: 28px;
}

.terms-dialog-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.terms-dialog h2 {
    margin: 0;
}

.terms-dialog li {
    margin: 0 0 12px;
}

.dialog-close {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--dark);
    font-size: 26px;
    line-height: 1;
    background: #ffffff;
}

.dialog-close:hover,
.dialog-close:focus {
    color: #ffffff;
    background: var(--dark);
}

.terms-dialog-actions {
    display: flex;
    justify-content: end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.button-secondary {
    border: 1px solid var(--line);
    color: var(--ink);
    background: #ffffff;
}

.button-secondary:hover,
.button-secondary:focus {
    color: #ffffff;
    background: var(--dark);
}

button:disabled,
button:disabled:hover {
    cursor: not-allowed;
    opacity: 0.55;
    background: var(--accent);
}

.terms-box h2 {
    margin-top: 0;
}

.terms-box li {
    margin-bottom: 8px;
}

.check-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 14px;
}

.check-row input {
    width: 18px;
    min-height: 18px;
    margin-top: 2px;
}

.fixture-terms {
    grid-column: 1 / -1;
}

.error {
    border-left-color: var(--danger);
    background: #fff3f0;
}

.permit {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 24px;
    align-items: start;
}

.permit-code {
    font-family: "Courier New", monospace;
    font-size: 24px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.qr {
    width: 100%;
    max-width: 240px;
    border: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.status-active {
    color: var(--ok);
    font-weight: 700;
}

.status-expired,
.status-pending {
    color: var(--danger);
    font-weight: 700;
}

.lookup-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.lookup-action {
    padding-bottom: 0;
}

.result {
    border-radius: 8px;
    margin: 22px 0 8px;
    padding: 18px;
}

.result strong,
.result span {
    display: block;
}

.result strong {
    font-size: 24px;
}

.result span {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
}

.result-active {
    border: 1px solid #8fd9b6;
    background: #ecfdf8;
}

.result-warning {
    border: 1px solid #f7c35f;
    background: #fff8e6;
}

.result-inactive {
    border: 1px solid #f2a29b;
    background: #fff3f0;
}

.permit-check-result {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 116px;
}

.permit-check-result .result-symbol {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
}

.result-active .result-symbol {
    background: var(--ok);
}

.result-warning .result-symbol {
    background: #b7791f;
}

.result-inactive .result-symbol {
    background: var(--danger);
}

.fixture-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: end;
    border-top: 1px solid var(--line);
    padding: 18px 0;
}

@media (max-width: 720px) {
    .grid,
    .lookup-grid,
    .fixture-row,
    .summary,
    .permit {
        grid-template-columns: 1fr;
    }

    .parking-route {
        align-items: stretch;
        flex-direction: column;
    }

    .permit-hours-heading {
        display: block;
    }

    .permit-hours-heading p {
        margin-top: 6px;
        text-align: left;
    }

    .permit-hours-rules {
        grid-template-columns: 1fr;
    }

    .parking-route .primary-cta {
        width: 100%;
    }

    .permit-switcher-option {
        min-height: 54px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .permit-check-result {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .permit-check-result .result-symbol {
        width: 52px;
        height: 52px;
        font-size: 38px;
    }
}

@media print {
    body {
        background: white;
    }

    .parking-shell {
        width: 100%;
        padding: 0;
    }

    .panel {
        border: 0;
    }

    .no-print {
        display: none;
    }
}
.discount-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.discount-actions form {
    margin: 0;
}

.button-danger {
    background: #b42318;
}

.button-danger:hover,
.button-danger:focus-visible {
    background: #8c1d18;
}

.email-test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
