/* --- Garage Premium Theme (Dashboard Standardized) --- */
/* Base Variables & Reset */
:root {
    --dash-purple: #6366f1;
    --dash-bg-light: #f3f4f6;
    --dash-card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --dash-border-radius: 24px;
}

/* 1. Base Card Style (White Clean) */
.garage-card {
    background: var(--bg-card);
    border-radius: var(--dash-border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Dark mode border subtle */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.light-mode .garage-card {
    background: #ffffff;
    border: none;
    box-shadow: var(--dash-card-shadow);
}

/* 2. Card Header (Clean Dashboard Style) */
.garage-card-header {
    background: var(--bg-card);
    /* White in Light */
    border-radius: var(--dash-border-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Dark mode */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

body.light-mode .garage-card-header {
    background: #ffffff;
    border: none;
    box-shadow: var(--dash-card-shadow);
    /* Sombra suave dashboard */
    color: #334155;
}

.garage-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Icon Buttons (Circular small actions) */
.garage-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
    font-size: 1.1rem;
}

body.light-mode .garage-btn-icon {
    border-color: #e2e8f0;
    color: #94a3b8;
    background: white;
}

.garage-btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: rotate(90deg);
    /* Playful interaction for settings/delete */
}

/* 3. HERO Section (Exact Replica - Adaptive) */
.garage-hero {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    /* Default Dark Slate */
    border-radius: var(--dash-border-radius);
    padding: 2rem;
    color: white;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.garage-hero-footer {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.garage-hero-sub {
    color: inherit;
}

.garage-hero-main {
    color: inherit;
}

/* Light Mode Overrides */
body.light-mode .garage-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    color: #1e293b;
    /* Dark text for light bg */
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

body.light-mode .garage-hero-footer {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

body.light-mode .garage-hero-sub {
    color: #64748b;
}

body.light-mode .garage-hero-main {
    color: #0f172a;
}

.garage-hero::after {
    /* Subtle decorative glow */
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

body.light-mode .garage-hero::after {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05), transparent 70%);
}

.garage-hero h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.garage-hero .hero-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0;
}

/* 4. Tabs & Pills Standardized (Independent Pills) */
.garage-tabs-container,
.garage-filters-container {
    background: transparent;
    padding: 0;
    border: none;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.garage-tab,
.garage-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    /* Max roundness */
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    text-align: center;
}

body.light-mode .garage-tab,
body.light-mode .garage-pill {
    background: #f8fafc;
    /* Gris muy claro */
    border: 1px solid #e2e8f0;
    /* Borde sutil */
    color: #64748b;
}

.garage-tab:hover,
.garage-pill:hover {
    transform: translateY(-1px);
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.garage-tab.active,
.garage-pill.active {
    background: #6366f1;
    /* Main Purple */
    color: white;
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

body.light-mode .garage-tab.active,
body.light-mode .garage-pill.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* 5. Stats Cards (Dashboard Style: White, Shadow, Clean) */
.garage-stat-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Dark mode */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
}

body.light-mode .garage-stat-card {
    background: #ffffff;
    border: none;
    box-shadow: var(--dash-card-shadow);
}

.garage-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.garage-stat-label {
    font-size: 0.8rem;
    color: #10b981;
    /* Default success green like dash */
    font-weight: 600;
    text-transform: uppercase;
}

/* 6. Action Buttons Grid (Standardized) */
.garage-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 cols mobile, 4 desktop */
    gap: 1rem;
}

@media (min-width: 640px) {
    .garage-action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.garage-action-btn {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    transition: all 0.2s;
    height: 100%;
}

body.light-mode .garage-action-btn {
    background: white;
    border: none;
    box-shadow: var(--dash-card-shadow);
}

.garage-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.dark-mode .garage-action-btn:hover {
    border-color: var(--primary);
}

.garage-action-icon {
    font-size: 1.5rem;
    padding: 0.75rem;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    /* Light purple bg */
    margin-bottom: 0.25rem;
}

.garage-action-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

/* 7. List Premium Style */
.garage-list {
    background: var(--bg-card);
    border-radius: var(--dash-border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .garage-list {
    background: white;
    border: none;
    box-shadow: var(--dash-card-shadow);
}

.garage-list-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.garage-list-header::before {
    content: '⚡';
    /* Icono insights style */
}

.garage-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    transition: background 0.2s;
}

.garage-list-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Premium Inputs */
.garage-input {
    background: #f3f4f6;
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    width: 100%;
    transition: all 0.2s;
}

body.light-mode .garage-input {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.garage-input:focus {
    background: white;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* 8. Segmented Controls (Grouped Toggles like Month/Year or Income/Expense) */
.garage-segmented-control {
    background: var(--bg-surface);
    /* Gris claro */
    padding: 0.35rem;
    border-radius: 16px;
    display: inline-flex;
    gap: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
    /* Casi invisible */
}

body.light-mode .garage-segmented-control {
    background: #f1f5f9;
}

.garage-segmented-btn {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.garage-segmented-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
}

.garage-segmented-btn.active {
    background: white;
    color: var(--primary);
    /* Violeta o Azul */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

body.dark-mode .garage-segmented-btn.active {
    background: var(--bg-card);
    color: white;
}

/* 9. Badges & Tags (Matrícula, Categorías) */
.garage-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    background: var(--bg-surface);
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Muy sutil */
}

body.light-mode .garage-badge {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

/* 10. List Actions (Small buttons in rows) */
.garage-action-sm {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.garage-action-sm:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

/* Modal Stats Standardizer */
.garage-modal-stat {
    background: var(--bg-surface);
    /* O white */
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid transparent;
}

body.light-mode .garage-modal-stat {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}