/* -----------------------------------------------------
   RESET
----------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

/* -----------------------------------------------------
   BODY
----------------------------------------------------- */

body {
    background: #0f1115;
    color: #e8ecf1;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.5;
}

/* -----------------------------------------------------
   LINKS
----------------------------------------------------- */

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

/* -----------------------------------------------------
   APP SHELL
----------------------------------------------------- */

.garage-app-shell {
    min-height: 100vh;
}

.garage-main {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;
    padding: 32px;
}

/* -----------------------------------------------------
   TOPBAR
----------------------------------------------------- */

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

    background:
        rgba(15, 17, 21, 0.92);

    backdrop-filter: blur(12px);

    border-bottom:
        1px solid rgba(255,255,255,0.06);
}

.garage-topbar-inner {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;
    padding: 18px 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.garage-logo {
    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 1.2rem;
    font-weight: 700;
}

.garage-logo-icon {
    font-size: 1.5rem;
}

.garage-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.garage-nav a {
    color: #c8d0db;
    font-size: 0.95rem;
    font-weight: 500;

    transition: 0.15s ease;
}

.garage-nav a:hover {
    color: white;
}

/* -----------------------------------------------------
   PAGE HEADER
----------------------------------------------------- */

.garage-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 32px;
}

.garage-page-header h1 {
    margin: 0;

    font-size: 2rem;
    font-weight: 700;
}

.muted {
    color: #8b97a8;
}

/* -----------------------------------------------------
   BUTTONS
----------------------------------------------------- */

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

    padding: 12px 18px;

    border-radius: 12px;

    background: #2d6cdf;
    color: white;

    font-weight: 600;

    transition: 0.15s ease;
}

.button:hover {
    background: #3d7cf0;
}

.button-secondary {
    background: #242933;
}

.button-secondary:hover {
    background: #313844;
}

/* -----------------------------------------------------
   SECTION
----------------------------------------------------- */

.garage-section {
    margin-bottom: 40px;
}

.garage-section-header {
    margin-bottom: 18px;
}

.garage-section-header h2 {
    margin: 0;

    font-size: 1.2rem;
}

/* -----------------------------------------------------
   STATS
----------------------------------------------------- */

.garage-stats-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 18px;

    margin-bottom: 40px;
}

.garage-stat-card {
    background: #171b22;

    border:
        1px solid rgba(255,255,255,0.05);

    border-radius: 18px;

    padding: 24px;
}

.garage-stat-label {
    color: #8e99a8;
    font-size: 0.9rem;

    margin-bottom: 10px;
}

.garage-stat-value {
    font-size: 2rem;
    font-weight: 700;
}

/* -----------------------------------------------------
   VEHICLE GRID
----------------------------------------------------- */

.garage-vehicle-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: 20px;
}

.garage-vehicle-card {
    background: #171b22;

    border:
        1px solid rgba(255,255,255,0.05);

    border-radius: 20px;

    overflow: hidden;

    transition: 0.18s ease;
}

.garage-vehicle-card:hover {
    transform: translateY(-2px);

    border-color:
        rgba(255,255,255,0.12);
}

.garage-vehicle-photo-wrap {
    aspect-ratio: 16 / 9;

    background: #0b0d11;
}

.garage-vehicle-photo {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.garage-vehicle-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 3rem;

    color: #556070;
}

.garage-vehicle-body {
    padding: 20px;
}

.garage-vehicle-title {
    font-size: 1.1rem;
    font-weight: 700;

    margin-bottom: 6px;
}

.garage-vehicle-subtitle {
    color: #94a0b0;
    font-size: 0.92rem;
}

/* -----------------------------------------------------
   VEHICLE HEADER
----------------------------------------------------- */

.garage-vehicle-header {
    display: grid;

    grid-template-columns:
        420px 1fr;

    gap: 32px;

    margin-bottom: 42px;
}

.garage-vehicle-header-photo {
    background: #171b22;

    border-radius: 24px;

    overflow: hidden;

    aspect-ratio: 16 / 10;
}

.garage-vehicle-header-photo img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.garage-vehicle-header-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    font-size: 5rem;
}

.garage-vehicle-header-content h1 {
    margin-top: 0;
    margin-bottom: 18px;

    font-size: 2.4rem;
}

.garage-meta-row {
    color: #a2acb9;

    margin-bottom: 10px;
}

.garage-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;

    margin-top: 28px;
}

/* -----------------------------------------------------
   TIMELINE
----------------------------------------------------- */

.garage-timeline {
    display: flex;
    flex-direction: column;

    gap: 18px;
}

.garage-timeline-item {
    display: grid;

    grid-template-columns:
        140px 1fr;

    gap: 22px;

    padding: 22px;

    background: #171b22;

    border-radius: 18px;

    border:
        1px solid rgba(255,255,255,0.05);
}

.garage-timeline-date {
    color: #8f9aab;
    font-size: 0.92rem;
}

.garage-timeline-title {
    font-size: 1.05rem;
    font-weight: 700;

    margin-bottom: 6px;
}

.garage-timeline-meta {
    color: #97a3b2;
    font-size: 0.92rem;

    margin-bottom: 10px;
}

.garage-timeline-description {
    color: #d6dce5;
}

/* -----------------------------------------------------
   TABLES
----------------------------------------------------- */

.data-table {
    width: 100%;
    border-collapse: collapse;

    background: #171b22;

    border-radius: 18px;

    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 16px 18px;

    text-align: left;
}

.data-table thead {
    background: #1e232d;
}

.data-table th {
    color: #93a0b0;
    font-size: 0.85rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody tr {
    border-top:
        1px solid rgba(255,255,255,0.05);
}

/* -----------------------------------------------------
   FORMS
----------------------------------------------------- */

.garage-form {
    max-width: 1000px;
}

.garage-form h1 {
    margin-top: 0;
    margin-bottom: 32px;
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(260px, 1fr));

    gap: 20px;

    margin-bottom: 24px;
}

label {
    display: flex;
    flex-direction: column;

    gap: 8px;

    color: #cbd3df;
    font-size: 0.95rem;
}

input,
textarea,
select {
    width: 100%;

    padding: 14px 16px;

    border:
        1px solid rgba(255,255,255,0.08);

    border-radius: 14px;

    background: #171b22;
    color: white;

    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;

    border-color: #2d6cdf;
}

/* -----------------------------------------------------
   ERRORS
----------------------------------------------------- */

.form-errors {
    margin-bottom: 24px;

    padding: 18px;

    border-radius: 16px;

    background: rgba(255, 80, 80, 0.12);

    border:
        1px solid rgba(255, 80, 80, 0.28);

    color: #ffb6b6;
}

/* -----------------------------------------------------
   EMPTY STATE
----------------------------------------------------- */

.empty-state {
    padding: 32px;

    border-radius: 18px;

    background: #171b22;

    color: #93a0b0;
}

/* -----------------------------------------------------
   RESPONSIVE
----------------------------------------------------- */

@media (max-width: 900px) {

    .garage-main {
        padding: 24px;
    }

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

    .garage-timeline-item {
        grid-template-columns: 1fr;
    }

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

/* -----------------------------------------------------
   LOGIN PAGE SPECIFIC
----------------------------------------------------- */

.garage-login-body {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at top,
            #1a2230 0%,
            #0f1115 45%
        );
}

.garage-login-shell {
    width: 100%;
    max-width: 480px;

    padding: 32px;
}

.garage-login-card {
    background: #171b22;

    border:
        1px solid rgba(255,255,255,0.06);

    border-radius: 28px;

    padding: 42px;
}

.garage-login-header {
    text-align: center;

    margin-bottom: 32px;
}

.garage-login-icon {
    font-size: 3rem;

    margin-bottom: 18px;
}

.garage-login-header h1 {
    margin: 0 0 10px;

    font-size: 2rem;
}

.garage-login-header p {
    margin: 0;

    color: #8d99aa;
}

.garage-login-form {
    display: flex;
    flex-direction: column;

    gap: 22px;
}

.garage-login-button {
    width: 100%;

    margin-top: 8px;
}

/* -----------------------------------------------------
   CURRENT PHOTO
----------------------------------------------------- */

.garage-current-photo-card {
    margin-bottom: 28px;

    padding: 20px;

    background: #171b22;

    border:
        1px solid rgba(255,255,255,0.05);

    border-radius: 20px;
}

.garage-current-photo-label {
    margin-bottom: 14px;

    color: #9aa6b5;
    font-size: 0.92rem;
    font-weight: 600;
}

.garage-current-photo {
    display: block;

    width: 100%;
    max-width: 520px;

    border-radius: 16px;
}

.garage-form-actions {
    margin-top: 28px;
}

/* -----------------------------------------------------
   MAINTENANCE FORM
----------------------------------------------------- */

.garage-form textarea {
    min-height: 140px;
}

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

/* -----------------------------------------------------
   STATUS BUTTONS
----------------------------------------------------- */

.button-danger {
    background: #7a2e2e;
}

.button-danger:hover {
    background: #944040;
}

.button-success {
    background: #2f6b45;
}

.button-success:hover {
    background: #3d8757;
}