﻿.garage-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.garage-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.garage-content {
    display: block;
}
.garage-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.garage-summary {
    position: relative;
}

.garage-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.garage-summary-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.4rem 1.6rem;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 22px 45px rgba(8, 15, 30, 0.3);
    overflow: hidden;
    transition: border 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.garage-summary-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 65%);
    pointer-events: none;
}

.garage-summary-card .summary-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    flex-shrink: 0;
}

.garage-summary-card .summary-icon svg {
    width: 24px;
    height: 24px;
}

.garage-summary-card .summary-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.summary-label {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.8);
}

.summary-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-helper {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.garage-summary-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 32px 60px rgba(7, 12, 24, 0.35),
                0 0 40px rgba(59, 130, 246, 0.15),
                0 0 80px rgba(59, 130, 246, 0.08);
}

.garage-summary-primary {
    border-color: rgba(59, 130, 246, 0.25);
}

.garage-summary-success {
    border-color: rgba(34, 197, 94, 0.25);
}

.garage-summary-warning {
    border-color: rgba(250, 204, 21, 0.25);
}

.garage-summary-danger {
    border-color: rgba(248, 113, 113, 0.3);
}

.garage-summary-success .summary-icon {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-green);
}

.garage-summary-warning .summary-icon {
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
}

.garage-summary-danger .summary-icon {
    background: rgba(248, 113, 113, 0.12);
    color: var(--accent-red);
}

.garage-summary-neutral .summary-icon {
    background: rgba(148, 163, 184, 0.12);
    color: rgba(148, 163, 184, 0.9);
}

.garage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.vehicle-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.vehicle-card-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vehicle-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vehicle-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.vehicle-name {
    color: var(--text-primary);
}

.vehicle-nickname-chip {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.vin-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px dashed rgba(148, 163, 184, 0.4);
    color: var(--text-secondary);
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vin-chip:hover {
    border-color: rgba(59, 130, 246, 0.5);
    color: var(--accent-blue);
}

.vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.divider-dot {
    opacity: 0.5;
}

.vehicle-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.vehicle-card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vehicle-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.vehicle-spec {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 80px;
}

.vehicle-spec span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.vehicle-spec strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.vehicle-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vehicle-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

.vehicle-card-footer {
    display: flex;
    justify-content: flex-end;
}

.garage-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 12, 22, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    padding: 1.5rem;
}

.garage-modal {
    width: min(640px, 100%);
    background: rgba(14, 22, 36, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 24px 60px rgba(8, 12, 22, 0.6);
}

.garage-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.garage-modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.garage-modal-header p {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.garage-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.garage-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.garage-modal-spec {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.garage-modal-spec span {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.garage-modal-spec strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.garage-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.garage-form-grid input[type="number"],
.input-field[type="number"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.garage-form-grid input[type="number"]:focus,
.input-field[type="number"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.garage-form-grid input[type="number"]::placeholder,
.input-field[type="number"]::placeholder,
.form-group input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.garage-form-grid input[type="number"]::-webkit-inner-spin-button,
.garage-form-grid input[type="number"]::-webkit-outer-spin-button,
.input-field[type="number"]::-webkit-inner-spin-button,
.input-field[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.garage-form-grid input[type="number"] {
    -moz-appearance: textfield;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.garage-manual-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.garage-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .garage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vehicle-card-top {
        flex-direction: column;
    }

    .vehicle-image-container {
        width: 100%;
        max-width: none;
    }

    .vehicle-nickname {
        font-size: 1.6rem;
    }

    .vehicle-spec-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .garage-modal {
        max-height: 90vh;
        overflow-y: auto;
    }
}

.garage-main-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
    max-width: 100%;
}

.garage-vehicles {
    min-width: 0; /* Prevent grid blowout */
}

.garage-vehicle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.garage-vehicle-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    padding: 1.8rem;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(59, 130, 246, 0.12);
    box-shadow: 0 28px 50px rgba(7, 12, 24, 0.28);
    transition: border 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    overflow-x: hidden;
    box-sizing: border-box;
}

.garage-vehicle-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 32px 60px rgba(7, 12, 24, 0.35),
                0 0 40px rgba(59, 130, 246, 0.15),
                0 0 80px rgba(59, 130, 246, 0.08);
}

/* Disable hover transform on touch devices to prevent stuck states */
@media (hover: none) {
    .garage-vehicle-card:hover {
        transform: none;
    }
}

.vehicle-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: stretch;
}

.vehicle-image-container {
    position: relative;
    flex: 0 0 160px;
    max-width: 180px;
    min-width: 140px;
    min-height: 140px;
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.92);
    border: 1px dashed rgba(59, 130, 246, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vehicle-image-container.has-image {
    border-style: solid;
    border-color: rgba(59, 130, 246, 0.2);
}

.vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    height: 100%;
    padding: 1.5rem 1rem;
    background: rgba(30, 64, 175, 0.08);
    color: rgba(148, 163, 184, 0.9);
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
    text-align: center;
}

.vehicle-image-placeholder svg {
    width: 24px;
    height: 24px;
    color: var(--accent-blue);
}

.vehicle-image-placeholder span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.vehicle-image-placeholder:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
    color: #dbeafe;
}

.vehicle-image-placeholder:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.vehicle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vehicle-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.vehicle-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.vehicle-nickname-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vehicle-nickname {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.vehicle-nickname:hover {
    color: #93c5fd;
    transform: translateY(-1px);
    text-shadow: 0 2px 12px rgba(59, 130, 246, 0.5);
}

.vehicle-nickname:focus-visible {
    outline: none;
    color: #60a5fa;
    text-shadow: 0 2px 12px rgba(59, 130, 246, 0.6);
}

.vehicle-nickname.is-hidden {
    display: none;
}

.vehicle-nickname-text {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.nickname-edit-icon {
    display: inline-flex;
    opacity: 0;
    color: #60a5fa;
    transition: opacity 0.2s ease, transform 0.2s ease;
    filter: drop-shadow(0 1px 3px rgba(96, 165, 250, 0.5));
}

.nickname-edit-icon svg {
    width: 18px;
    height: 18px;
}

.vehicle-nickname:hover .nickname-edit-icon,
.vehicle-nickname:focus .nickname-edit-icon {
    opacity: 1;
    transform: translateY(-2px);
    color: #93c5fd;
}

.vehicle-actual-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.nickname-editor {
    display: none;
    flex-direction: column;
    gap: 0.6rem;
}

.nickname-editor.is-active {
    display: flex;
}

.nickname-input {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.nickname-input:focus {
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.nickname-editor-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nickname-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.nickname-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.6);
}

.nickname-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nickname-btn.nickname-cancel {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.35);
    color: rgba(226, 232, 240, 0.92);
}

.nickname-btn.nickname-cancel:hover {
    background: rgba(148, 163, 184, 0.26);
}

.nickname-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.nickname-spinner.is-visible {
    display: inline-block;
}

.nickname-error {
    font-size: 0.8rem;
    color: #fca5a5;
    min-height: 0.8rem;
}

.nickname-input-add {
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(17, 24, 39, 0.88);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nickname-input-add:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.nickname-input-add::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.nickname-dialog {
    width: min(420px, 100%);
    gap: 1.25rem;
}

.nickname-dialog .garage-modal-actions {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nickname-dialog .dialog-action-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nickname-dialog .garage-modal-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.vehicle-vin {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.vehicle-vin-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.7);
}

.vehicle-vin-value {
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.vehicle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.vehicle-inline-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.vehicle-inline-action:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.vehicle-inline-action svg {
    width: 16px;
    height: 16px;
}

.garage-vehicle-header {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: flex-start;
}

.garage-vehicle-heading {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.garage-vehicle-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.garage-vehicle-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.vehicle-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
}

.vehicle-status-badge svg {
    width: 16px;
    height: 16px;
}

.vehicle-status-badge.badge-success {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--accent-green);
}

.vehicle-status-badge.badge-warning {
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.35);
    color: #facc15;
}

.vehicle-status-badge.badge-critical {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.35);
    color: var(--accent-red);
}

.garage-vin-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.garage-vin-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.garage-vin-copy:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.55);
}

.garage-vin-copy svg {
    width: 16px;
    height: 16px;
}

.vehicle-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vehicle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.18);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.vehicle-pill svg {
    width: 14px;
    height: 14px;
}

.vehicle-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vehicle-alerts-empty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.vehicle-alert {
    display: flex;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(250, 204, 21, 0.3);
    background: rgba(250, 204, 21, 0.08);
}

.vehicle-alert-critical {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.14);
}

.vehicle-alert-warning {
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.12);
}

.vehicle-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 1.1rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.vehicle-alert-icon.success {
    color: var(--accent-green);
    border-color: rgba(34, 197, 94, 0.3);
}

.vehicle-alert-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vehicle-alert-heading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.vehicle-alert-text {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.75);
    line-height: 1.5;
}

.alert-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.vehicle-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.vehicle-metric {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(59, 130, 246, 0.14);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: border 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-metric:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 32px 60px rgba(7, 12, 24, 0.35),
                0 0 40px rgba(59, 130, 246, 0.15),
                0 0 80px rgba(59, 130, 246, 0.08);
}

.metric-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.value-change-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.value-change-pill svg {
    width: 14px;
    height: 14px;
}

.value-change-pill.positive {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--accent-green);
}

.value-change-pill.negative {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.35);
    color: var(--accent-red);
}

.vehicle-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.vehicle-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    transition: border 0.2s ease, background 0.2s ease;
}

.vehicle-action-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.45);
    color: var(--accent-blue);
}

.vehicle-action-btn svg {
    width: 16px;
    height: 16px;
}

.vehicle-footer-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.vehicle-footer-left,
.vehicle-footer-right {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vehicle-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.vehicle-footer-link svg {
    width: 16px;
    height: 16px;
}

.vehicle-footer-link:hover {
    color: var(--accent-blue);
}

.vehicle-footer-link.danger {
    color: var(--accent-red);
}

.garage-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 6rem;
}

.sidebar-card {
    background: rgba(12, 20, 32, 0.88);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
    box-shadow: 0 18px 40px rgba(7, 12, 24, 0.35);
    transition: border 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 32px 60px rgba(7, 12, 24, 0.35),
                0 0 40px rgba(59, 130, 246, 0.15),
                0 0 80px rgba(59, 130, 246, 0.08);
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sidebar-stat .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.accent-positive {
    color: var(--accent-green) !important;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(17, 24, 39, 0.85);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s ease, border 0.2s ease;
}

.sidebar-action-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar-action-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.45);
    color: var(--accent-blue);
}

.sidebar-cta {
    text-align: center;
    background: radial-gradient(circle at top, rgba(129, 140, 248, 0.25), transparent 70%),
        rgba(17, 24, 39, 0.92);
    border: 1px solid rgba(129, 140, 248, 0.35);
}

.cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin: 0 auto;
    background: rgba(129, 140, 248, 0.18);
    color: rgba(129, 140, 248, 0.85);
}

.cta-icon svg {
    width: 26px;
    height: 26px;
}

.sidebar-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.85), rgba(56, 189, 248, 0.85));
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(96, 165, 250, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(96, 165, 250, 0.45);
}

.stat-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

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

    .garage-sidebar-stack {
        position: static;
    }
}

@media (max-width: 768px) {
    .garage-summary {
        display: none !important;
    }

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

    .garage-vehicle-card {
        padding: 1.4rem;
    }

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

    .garage-vehicle-grid {
        gap: 1.5rem;
    }
}

/* ========================================
   ENHANCED GARAGE HEADER STYLES
   ======================================== */

.garage-header {
  margin-bottom: 2rem;
  animation: fadeInDown 0.6s ease-out;
}

.garage-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.garage-header-text {
  flex: 1;
  min-width: 300px;
}

.garage-header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 20px rgba(102, 126, 234, 0.3));
  animation: fadeIn 0.8s ease-out;
}

.garage-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.4));
  animation: slideInLeft 0.6s ease-out;
}

.garage-header-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin: 0;
  font-weight: 400;
  animation: fadeIn 1s ease-out 0.2s backwards;
}

.garage-header-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}

.btn-add-vehicle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.btn-add-vehicle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #7c8ff0 0%, #8a5fb8 100%);
}

.btn-add-vehicle:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.btn-add-vehicle svg {
  transition: transform 0.3s ease;
}

.btn-add-vehicle:hover svg {
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .garage-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .garage-header-title {
    font-size: 36px;
  }

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

  .garage-header-subtitle {
    font-size: 14px;
  }

  .btn-add-vehicle {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .garage-header-title {
    font-size: 28px;
    gap: 0.75rem;
  }

  .garage-icon {
    width: 28px;
    height: 28px;
  }
}
/* ========================================
   LOADING STATE (for refresh button)
   ======================================== */

.garage-vehicle-card.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.garage-vehicle-card.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: garage-card-spin 0.8s linear infinite;
}

@keyframes garage-card-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ========================================
   ALERTS MODAL
   ======================================== */

.modal-alerts {
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.alerts-summary {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert-count {
  font-weight: 600;
  color: var(--text-primary);
}

.alert-critical {
  color: #ef4444;
  font-weight: 600;
}

.alerts-full-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alert-item-full {
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border-left: 4px solid;
}

.alert-item-full.alert-critical {
  border-left-color: #ef4444;
}

.alert-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.alert-header-text {
  flex: 1;
}

.alert-header-text .alert-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.alert-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.badge-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.alert-date {
  color: var(--text-secondary);
}

.alert-body {
  margin-top: 1rem;
}

.alert-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.alert-remedy,
.alert-units,
.alert-recall-number {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-remedy strong,
.alert-units strong,
.alert-recall-number strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* ========================================
   TEXT BUTTON (for "View all alerts")
   ======================================== */

.btn-text {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: opacity 0.2s ease;
}

.btn-text:hover {
  opacity: 0.8;
}

/* ========================================
   NEW VEHICLE CARD LAYOUT
   ======================================== */

.vehicle-card-top-new {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.75rem;
    align-items: start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    margin-bottom: 0.5rem;
}

.vehicle-image-container-new {
    position: relative;
    width: 200px;
    height: 180px;
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.92);
    border: 1px dashed rgba(59, 130, 246, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.vehicle-image-container-new.has-image {
    border-style: solid;
    border-color: rgba(59, 130, 246, 0.2);
}

.vehicle-image-new {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-image-placeholder-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    height: 100%;
    padding: 1.5rem 1rem;
    background: rgba(30, 64, 175, 0.08);
    color: rgba(148, 163, 184, 0.9);
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
    text-align: center;
}

.vehicle-image-placeholder-new svg {
    width: 28px;
    height: 28px;
    color: var(--accent-blue);
}

.vehicle-image-placeholder-new span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.vehicle-image-placeholder-new:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

.vehicle-main-info-new {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    flex: 1;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vehicle-header-section-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.vehicle-title-section-new {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.vehicle-actual-name-new {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.85);
    letter-spacing: 0.01em;
}

.vehicle-info-row-new {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
}

.vehicle-vin-new {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.875rem;
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.vehicle-vin-new .vehicle-vin-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.7rem;
    font-weight: 600;
}

.vehicle-vin-new .vehicle-vin-value {
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.vehicle-quick-actions-new {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.vehicle-health-section-new {
    width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .vehicle-card-top-new {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .vehicle-image-container-new {
        width: 100%;
        max-width: 100%;
        height: 220px;
    }

    .vehicle-header-section-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .vehicle-info-row-new {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .vehicle-quick-actions-new {
        width: 100%;
        justify-content: flex-start;
    }

    .vehicle-inline-action {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    .vehicle-nickname {
        font-size: 1.5rem;
    }
}

/* ============================================
   FULL-WIDTH GARAGE LAYOUT OPTIMIZATION
   ============================================ */

/* Remove page-container constraint for garage page to maximize screen space */
#garage-content .page-container,
.garage-page .page-container {
    max-width: none;
    padding: 1.5rem;
}

/* ===== Vehicle Enrichment Status Badges ===== */

.garage-vehicle-card {
    position: relative;
}

.vehicle-enrichment-status {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-processing {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.65;
    }
}

