/* =========================================================
 *  CARKEEP — MIDNIGHT GARAGE
 *  ========================================================= */

:root {
    color-scheme: dark;

    --bg: #0b1120;
    --bg-raised: #101a2d;
    --surface: #141f33;
    --surface-hover: #1a2941;
    --surface-input: #0c1526;

    --border: #263650;
    --border-light: #334765;

    --text: #edf3ff;
    --text-secondary: #a3b2ca;
    --text-muted: #7587a3;

    --accent: #4d8dff;
    --accent-hover: #72a5ff;
    --accent-soft: rgba(77, 141, 255, 0.12);

    --success: #40d6a0;
    --danger: #ff6b7a;
    --warning: #ffc66d;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* ---------- Reset and global styles ---------- */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;

    background:
    radial-gradient(
        ellipse at 50% -15%,
        rgba(49, 91, 157, 0.18),
                    transparent 55%
    ),
    var(--bg);

    color: var(--text);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-hover);
    text-decoration: none;
    transition: color 160ms ease;
}

a:hover {
    color: #a6c7ff;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    color: var(--text);
    line-height: 1.3;
    letter-spacing: -0.035em;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
}

h2 {
    margin-bottom: 16px;
    font-size: 21px;
    font-weight: 700;
}

h3 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
}

p {
    color: var(--text-secondary);
}

::selection {
    color: white;
    background: #356fd0;
}

/* ---------- Navigation ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(11, 17, 32, 0.88);
    border-bottom: 1px solid rgba(51, 71, 101, 0.6);
    backdrop-filter: blur(18px);
}

.topbar-inner {
    width: min(1200px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;

    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.brand:hover {
    color: white;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;

    border-radius: 11px;
    background: linear-gradient(135deg, #6ca5ff, #3672e8);
    box-shadow: 0 4px 16px rgba(77, 141, 255, 0.25);

    color: white;
    font-size: 20px;
    font-weight: 800;
}

.brand-accent {
    color: var(--accent-hover);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.main-nav a {
    padding: 9px 13px;
    border-radius: var(--radius-sm);

    color: var(--text-secondary);
    font-weight: 600;
}

.main-nav a:hover {
    background: var(--surface);
    color: var(--text);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user form {
    margin: 0;
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;

    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: var(--surface);

    color: var(--accent-hover);
    font-weight: 700;
}

.nav-username {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ---------- Main layout ---------- */

.page-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 64px;
    flex: 1;
}

.page-header {
    margin-bottom: 30px;
}

.page-header p {
    max-width: 680px;
    margin-top: 8px;
    font-size: 15px;
}

.section {
    margin-top: 36px;
}

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

.section-header h2 {
    margin-bottom: 0;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--accent-hover);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

/* ---------- Cards and panels ---------- */

.card,
.panel {
    min-width: 0;
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(
        145deg,
        rgba(20, 31, 51, 0.98),
                                rgba(16, 26, 45, 0.98)
    );

    box-shadow: var(--shadow);
}

.card {
    transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.card:hover {
    border-color: var(--border-light);
}

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

.card-title {
    margin-bottom: 6px;
    font-size: 18px;
}

.card-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.stat-value {
    margin-top: 8px;
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

/* ---------- Vehicle cards ---------- */

.vehicle-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vehicle-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.vehicle-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;

    border: 1px solid rgba(77, 141, 255, 0.22);
    border-radius: 13px;
    background: var(--accent-soft);

    color: var(--accent-hover);
    font-size: 23px;
}

.vehicle-card-details {
    flex: 1;
    min-width: 0;
}

.vehicle-card-details h2 {
    margin-bottom: 5px;
    font-size: 18px;
}

.plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--surface-input);

    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.vehicle-mileage {
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.vehicle-mileage .label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
}

.vehicle-mileage .value {
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

/* ---------- Buttons ---------- */

button,
.button {
    min-height: 42px;
    padding: 10px 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #528fff, #3675e9);

    color: white;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;

    box-shadow: 0 4px 12px rgba(44, 105, 220, 0.15);

    transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

button:hover,
.button:hover {
    background: linear-gradient(135deg, #76aaff, #4d8dff);
    color: white;
    box-shadow: 0 6px 18px rgba(44, 105, 220, 0.25);
    transform: translateY(-1px);
}

button:active,
.button:active {
    transform: translateY(0);
}

.button-secondary {
    border-color: var(--border-light);
    background: var(--surface-hover);
    color: var(--text);
    box-shadow: none;
}

.button-secondary:hover {
    border-color: #506687;
    background: #243650;
    color: white;
}

.button-ghost {
    border-color: var(--border);
    background: transparent;
    color: var(--text-secondary);
    box-shadow: none;
}

.button-ghost:hover {
    border-color: var(--border-light);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.button-danger {
    border-color: rgba(255, 107, 122, 0.25);
    background: rgba(255, 107, 122, 0.09);
    color: #ff929d;
    box-shadow: none;
}

.button-danger:hover {
    border-color: rgba(255, 107, 122, 0.5);
    background: rgba(255, 107, 122, 0.17);
    color: #ffb1b9;
    box-shadow: none;
}

.button-small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
}

/* ---------- Forms ---------- */

form {
    margin: 0;
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--surface-input);

    color: var(--text);
    font: inherit;

    transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input::placeholder,
textarea::placeholder {
    color: #62748e;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--border-light);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.13);
    background: #0f1b30;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

select {
    cursor: pointer;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.form-hint {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ---------- Flash messages ---------- */

.flash-list {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;
    border: 1px solid rgba(77, 141, 255, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(77, 141, 255, 0.09);

    color: #c9dcff;
}

.flash-message p {
    margin: 0;
    color: inherit;
}

.flash-indicator {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- Tables ---------- */

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

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

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--surface);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

td {
    color: var(--text-secondary);
}

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

tbody tr:hover {
    background: rgba(77, 141, 255, 0.035);
}

/* ---------- Maintenance history ---------- */

.maintenance-timeline {
    display: grid;
    gap: 16px;
}

.maintenance-event {
    position: relative;
    padding: 22px 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);

    transition: border-color 160ms ease;
}

.maintenance-event:hover {
    border-color: var(--border-light);
}

.maintenance-event h3 {
    margin-bottom: 12px;
    font-size: 17px;
}

.maintenance-event p {
    margin: 8px 0;
}

.maintenance-event strong {
    color: var(--text);
    font-weight: 600;
}

.event-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.event-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

/* ---------- Vehicle detail layout ---------- */

.vehicle-overview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

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

.spec-item {
    min-width: 0;
}

.spec-label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.spec-value {
    overflow-wrap: anywhere;
    color: var(--text);
    font-weight: 600;
}

/* ---------- Empty states ---------- */

.empty-state {
    padding: 44px 24px;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(20, 31, 51, 0.45);
    text-align: center;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    max-width: 420px;
    margin: 0 auto 20px;
}

/* ---------- Authentication ---------- */

.auth-container {
    width: min(440px, 100%);
    margin: 30px auto;
}

.auth-card {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #152139, #101a2d);
    box-shadow: var(--shadow);
}

.auth-brand {
    margin-bottom: 30px;
    text-align: center;
}

.auth-brand .brand {
    justify-content: center;
}

.auth-brand p {
    margin-top: 12px;
}

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

.auth-form button {
    width: 100%;
    margin-top: 5px;
}

.auth-footer {
    margin-top: 24px;
    color: var(--text-muted);
    text-align: center;
}

.auth-footer a {
    font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0;

    display: flex;
    justify-content: space-between;
    gap: 16px;

    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
}

.site-footer span:first-child {
    color: var(--text-secondary);
    font-weight: 700;
}

/* ---------- Keyboard accessibility ---------- */

:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
}

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

/* ---------- Responsive layout ---------- */

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vehicle-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        width: calc(100% - 28px);
        min-height: 66px;
        gap: 14px;
    }

    .brand {
        gap: 8px;
        font-size: 18px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
    }

    .main-nav {
        display: none;
    }

    .nav-user {
        gap: 8px;
        margin-left: auto;
    }

    .nav-username {
        display: none;
    }

    .page-container {
        width: calc(100% - 28px);
        padding-top: 28px;
    }

    .card-grid,
    .stat-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .card,
    .panel {
        padding: 19px;
    }

    .form-field.full-width {
        grid-column: auto;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .auth-card {
        padding: 24px;
    }

    .site-footer {
        width: calc(100% - 28px);
        flex-direction: column;
        gap: 4px;
    }
}


.license-plate {
    display: inline-flex;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
    min-height: 58px;
    overflow: hidden;

    background: #f8f8f5;
    border: 2px solid #b8bdc4;
    border-radius: 6px;

    box-shadow:
    0 3px 0 #858b94,
    0 6px 12px rgba(0, 0, 0, 0.25);

    color: #17191d;
    font-family: Arial, Helvetica, sans-serif;
}

.license-plate-country {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 34px;
    flex-shrink: 0;

    background: #174a9c;
    color: white;

    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0;
}

.eu-stars {
    font-size: 0.7rem;
    line-height: 1;
    margin-bottom: 3px;
}

.license-plate-number {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 8px 14px;

    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    white-space: nowrap;
}


/* Garage dashboard summary */

.garage-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;

    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

.summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    flex-shrink: 0;

    background: rgba(59, 130, 246, 0.12);
    border-radius: 12px;
    font-size: 1.4rem;
}

.summary-label {
    margin: 0 0 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.summary-value {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.6rem;
    font-weight: 800;
}

/* Vehicle collection */

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

.vehicle-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;

    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;

    transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.vehicle-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.vehicle-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.vehicle-category {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;

    border: 1px solid var(--border-color);
    border-radius: 999px;

    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.role-owner {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.role-editor {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.3);
}

.vehicle-card-main {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.vehicle-card-main h3 {
    margin: 0 0 18px;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 800;
}

/* Vehicle specifications */

.vehicle-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
    padding: 24px 0;
}

.vehicle-detail {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.vehicle-detail:first-child {
    grid-column: 1 / -1;
}

.vehicle-detail .spec-value {
    overflow-wrap: anywhere;
}

/* Vehicle actions */

.vehicle-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.vehicle-card-actions > a {
    flex: 1;
    justify-content: center;
}

.vehicle-card-actions form {
    margin: 0;
}

.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px;
}

/* Add vehicle section */

#add-car {
scroll-margin-top: 100px;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 8px;
}

.form-field small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Responsive layout */

@media (max-width: 900px) {
    .garage-grid {
        grid-template-columns: 1fr;
    }

    .garage-summary {
        gap: 12px;
    }

    .summary-card {
        padding: 16px;
    }
}

@media (max-width: 600px) {
    .garage-summary {
        grid-template-columns: 1fr;
    }

    .summary-card {
        padding: 18px;
    }

    .vehicle-card {
        padding: 18px;
    }

    .vehicle-card-top {
        align-items: flex-start;
    }

    .vehicle-card-main h3 {
        font-size: 1.2rem;
    }

    .vehicle-card-actions {
        flex-wrap: wrap;
    }
}


/* Vehicle photo area */

.vehicle-card {
    overflow: hidden;
    padding: 0;
}

.vehicle-card-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;

    background: #111827;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
}

.vehicle-card-image img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition: transform 0.35s ease;
}

.vehicle-card:hover .vehicle-card-image img {
    transform: scale(1.04);
}

.vehicle-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    height: 100%;

    background:
    radial-gradient(
        ellipse at center,
        rgba(59, 130, 246, 0.12),
                    transparent 70%
    ),
    #111827;

    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.placeholder-text {
    font-size: 0.85rem;
}

.image-view-label {
    position: absolute;
    right: 12px;
    bottom: 12px;

    padding: 7px 11px;

    background: rgba(10, 15, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;

    color: white;
    font-size: 0.8rem;
    font-weight: 600;

    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.vehicle-card:hover .image-view-label,
.vehicle-card-image:focus-visible .image-view-label {
    opacity: 1;
    transform: translateY(0);
}

.vehicle-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.vehicle-card-body .vehicle-card-actions {
    margin-top: auto;
}

@media (max-width: 600px) {
    .vehicle-card-body {
        padding: 18px;
    }
}


/* Edit vehicle page */

.edit-car-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.edit-vehicle-preview {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
    padding: 18px;

    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.edit-vehicle-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 180px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    overflow: hidden;

    background: #111827;
    border-radius: 8px;
}

.edit-vehicle-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-vehicle-image .placeholder-icon {
    font-size: 2rem;
}

.edit-vehicle-image .placeholder-text {
    font-size: 0.75rem;
    text-align: center;
}

.edit-vehicle-preview-info h3 {
    margin: 8px 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.edit-vehicle-preview-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.plate-preview-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
}

.edit-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;

    padding: 20px 0 36px;
}

@media (max-width: 600px) {
    .edit-vehicle-preview {
        align-items: flex-start;
        flex-direction: column;
    }

    .edit-vehicle-image {
        width: 100%;
    }

    .edit-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .edit-form-actions .button {
        justify-content: center;
        text-align: center;
    }
}

/* ========================================
 *  Authentication pages
 *  ======================================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 220px);
    padding: 48px 16px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 36px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}

.auth-brand h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.auth-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--accent-color);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.2);
}

.auth-heading {
    margin-bottom: 28px;
    text-align: center;
}

.auth-heading .eyebrow {
    margin-bottom: 10px;
}

.auth-heading h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 1.65rem;
    letter-spacing: -0.04em;
}

.auth-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
    font-size: 0.98rem;
}

.auth-submit span {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.auth-submit:hover span {
    transform: translateX(3px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 18px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-register {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    text-align: center;
}

.auth-footer {
    margin: 28px 0 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
}

/* Authentication pages on smaller screens */

@media (max-width: 480px) {
    .auth-container {
        min-height: auto;
        padding: 28px 0;
    }

    .auth-card {
        padding: 26px 20px;
        border-radius: 14px;
    }

    .auth-brand {
        margin-bottom: 28px;
    }

    .auth-heading h2 {
        font-size: 1.45rem;
    }
}


/* Registration form helper text */

.field-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}
