/* fleetpulse/theme.css — Complete Theme System with Dark/Light Support */

:root {
    /* Dark Theme (Default) */
    --fp-primary: #1E40AF;
    --fp-secondary: #059669;
    --fp-danger: #DC2626;
    --fp-warning: #D97706;
    --fp-bg: #0f172a;
    --fp-surface: #1a2332;
    --fp-surface-alt: #232d40;
    --fp-text: #f1f5f9;
    --fp-text-muted: #94a3b8;
    --fp-border: #2c374a;
    --fp-radius: 12px;
    --fp-shadow: 0 4px 24px rgba(0,0,0,0.3);
    --fp-card-bg: #1a2332;
    --fp-input-bg: rgba(255,255,255,0.03);
    --fp-hover-bg: rgba(255,255,255,0.05);
    --fp-scrollbar-track: #0f172a;
    --fp-scrollbar-thumb: #2c374a;
}

/* Light Theme */
[data-theme="light"] {
    --fp-primary: #2563EB;
    --fp-secondary: #059669;
    --fp-danger: #DC2626;
    --fp-warning: #D97706;
    --fp-bg: #f1f5f9;
    --fp-surface: #ffffff;
    --fp-surface-alt: #f8fafc;
    --fp-text: #0f172a;
    --fp-text-muted: #64748b;
    --fp-border: #e2e8f0;
    --fp-shadow: 0 4px 24px rgba(0,0,0,0.08);
    --fp-card-bg: #ffffff;
    --fp-input-bg: #f8fafc;
    --fp-hover-bg: rgba(0,0,0,0.03);
    --fp-scrollbar-track: #f1f5f9;
    --fp-scrollbar-thumb: #cbd5e1;
}

/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { transition: background-color 0.3s ease; }

body {
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--fp-bg);
    color: var(--fp-text);
    line-height: 1.5;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--fp-scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--fp-scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--fp-primary); }

/* Container */
.fp-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1rem;
}

@media (max-width: 640px) {
    .fp-container { padding: 0 0.75rem; }
}

/* Cards */
.fp-card {
    background: var(--fp-card-bg);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 1.25rem;
    box-shadow: var(--fp-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.fp-card:hover {
    border-color: rgba(30,64,175,0.3);
}

/* Buttons */
.fp-btn {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    padding: 0.7rem 1.4rem; 
    border-radius: 10px; 
    border: none;
    font-weight: 600; 
    font-size: 0.95rem; 
    cursor: pointer; 
    text-decoration: none;
    touch-action: manipulation;
    transition: all 0.2s;
    min-height: 44px;
}

.fp-btn:active { transform: scale(0.97); }

.fp-btn-primary { background: var(--fp-primary); color: #fff; }
.fp-btn-primary:hover { background: #1a3a9e; }

.fp-btn-secondary { background: var(--fp-secondary); color: #fff; }
.fp-btn-secondary:hover { background: #047857; }

.fp-btn-danger { background: var(--fp-danger); color: #fff; }
.fp-btn-danger:hover { background: #b91c1c; }

.fp-btn-outline { 
    background: transparent; 
    color: var(--fp-text); 
    border: 1px solid var(--fp-border); 
}
.fp-btn-outline:hover { border-color: var(--fp-primary); background: var(--fp-hover-bg); }

/* Button Sizes */
.fp-btn-sm { padding: 0.4rem 0.8rem; font-size: 0.78rem; min-height: 32px; }
.fp-btn-lg { padding: 0.9rem 1.8rem; font-size: 1.05rem; min-height: 52px; }
.fp-btn-block { width: 100%; justify-content: center; }

/* Badges */
.fp-badge { 
    display: inline-block; 
    padding: 0.25rem 0.7rem; 
    border-radius: 20px; 
    font-size: 0.7rem; 
    font-weight: 600; 
    white-space: nowrap;
}

.fp-badge-active { background: rgba(5,150,105,0.18); color: var(--fp-secondary); }
.fp-badge-idle { background: rgba(148,163,184,0.18); color: var(--fp-text-muted); }
.fp-badge-maintenance { background: rgba(217,119,6,0.18); color: var(--fp-warning); }
.fp-badge-overdue { background: rgba(220,38,38,0.18); color: var(--fp-danger); }
.fp-badge-critical, .fp-badge-high { background: rgba(220,38,38,0.18); color: var(--fp-danger); }
.fp-badge-medium { background: rgba(217,119,6,0.18); color: var(--fp-warning); }
.fp-badge-low { background: rgba(5,150,105,0.18); color: var(--fp-secondary); }
.fp-badge-primary { background: rgba(30,64,175,0.18); color: var(--fp-primary); }
.fp-badge-warning { background: rgba(217,119,6,0.18); color: var(--fp-warning); }
.fp-badge-info { background: rgba(30,64,175,0.12); color: #60A5FA; }

/* Light theme badge adjustments */
[data-theme="light"] .fp-badge-active { background: rgba(5,150,105,0.12); }
[data-theme="light"] .fp-badge-primary { background: rgba(37,99,235,0.12); }
[data-theme="light"] .fp-badge-critical, 
[data-theme="light"] .fp-badge-high { background: rgba(220,38,38,0.12); }
[data-theme="light"] .fp-badge-maintenance { background: rgba(217,119,6,0.12); }

/* Inputs */
.fp-input {
    width: 100%; 
    padding: 0.7rem 1rem; 
    border-radius: 8px;
    border: 1px solid var(--fp-border); 
    background: var(--fp-input-bg);
    color: var(--fp-text); 
    font-size: 0.95rem;
    transition: border-color 0.2s, background-color 0.3s ease;
    min-height: 44px;
}

.fp-input:focus { 
    outline: none; 
    border-color: var(--fp-primary); 
    box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}

.fp-input::placeholder { color: var(--fp-text-muted); opacity: 0.6; }

.fp-label { 
    display: block; 
    margin-bottom: 0.4rem; 
    font-size: 0.8rem; 
    color: var(--fp-text-muted); 
    font-weight: 600; 
    letter-spacing: 0.02em;
}

/* Stat Cards */
.fp-stat-card {
    background: var(--fp-card-bg);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.fp-stat-card:active { transform: scale(0.97); }

.fp-stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1.2; }
.fp-stat-label { color: var(--fp-text-muted); font-size: 0.75rem; margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Topbar */
.fp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: var(--fp-surface);
    border-bottom: 1px solid var(--fp-border);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 0.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.fp-brand { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-weight: 800; 
    font-size: 1rem;
    text-decoration: none;
    color: var(--fp-text);
}

.fp-brand img { 
    height: 32px; 
    width: auto; 
    max-height: 32px; 
    object-fit: contain;
}

.fp-brand .logo-icon { 
    width: 32px; 
    height: 32px; 
    border-radius: 8px;
    background: linear-gradient(135deg, var(--fp-primary), var(--fp-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--fp-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    color: var(--fp-text);
}

.theme-toggle:hover {
    border-color: var(--fp-primary);
    background: var(--fp-hover-bg);
}

/* Responsive Topbar */
@media (max-width: 768px) {
    .fp-topbar { 
        padding: 0.5rem 0.75rem; 
        flex-direction: column;
        gap: 0.5rem;
    }
    .fp-topbar > div:first-child { 
        width: 100%; 
        justify-content: space-between;
    }
    .fp-topbar nav { 
        width: 100%; 
        overflow-x: auto; 
        padding-bottom: 0.25rem;
        gap: 0.75rem;
        font-size: 0.8rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    .fp-topbar nav a { 
        white-space: nowrap;
        padding: 0.25rem 0.5rem;
    }
    .fp-topbar > div:last-child { 
        width: 100%; 
        justify-content: flex-end;
    }
}

/* Utility Classes */
.fp-text-center { text-align: center; }
.fp-text-muted { color: var(--fp-text-muted); }
.fp-text-danger { color: var(--fp-danger); }
.fp-text-success { color: var(--fp-secondary); }
.fp-text-warning { color: var(--fp-warning); }
.fp-mt-1 { margin-top: 1rem; }
.fp-mt-2 { margin-top: 2rem; }
.fp-mb-1 { margin-bottom: 1rem; }
.fp-mb-2 { margin-bottom: 2rem; }
.fp-gap-1 { gap: 1rem; }
.fp-flex { display: flex; }
.fp-flex-between { display: flex; justify-content: space-between; align-items: center; }
.fp-flex-wrap { flex-wrap: wrap; }
.fp-flex-center { display: flex; align-items: center; justify-content: center; }

/* Success/Error Messages */
.fp-success { 
    background: rgba(5,150,105,0.15); 
    border: 1px solid var(--fp-secondary); 
    color: #6ee7b7;
    padding: 0.75rem 1rem; 
    border-radius: 8px; 
    margin-bottom: 1.25rem; 
    font-size: 0.9rem; 
}

[data-theme="light"] .fp-success {
    background: rgba(5,150,105,0.08);
    color: #065f46;
}

.fp-error { 
    background: rgba(220,38,38,0.15); 
    border: 1px solid var(--fp-danger); 
    color: #fca5a5;
    padding: 0.75rem 1rem; 
    border-radius: 8px; 
    margin-bottom: 1.25rem; 
    font-size: 0.9rem; 
}

[data-theme="light"] .fp-error {
    background: rgba(220,38,38,0.08);
    color: #991b1b;
}

/* Empty State */
.fp-empty { 
    text-align: center; 
    padding: 3rem; 
    color: var(--fp-text-muted); 
}

/* Grid System */
.fp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.fp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

@media (max-width: 640px) {
    .fp-grid-2 { grid-template-columns: 1fr; }
    .fp-grid-3 { grid-template-columns: 1fr; }
    .fp-grid-4 { grid-template-columns: 1fr 1fr; }
}




/* =====================================================================
   LOADING STATES & SKELETON SCREENS
   ===================================================================== */

/* Skeleton Animation */
@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.skeleton {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    background: var(--fp-border);
    border-radius: 4px;
    display: inline-block;
}

.skeleton-text {
    height: 12px;
    margin: 4px 0;
    border-radius: 4px;
    background: var(--fp-border);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text-sm { height: 10px; width: 60%; }
.skeleton-text-md { height: 14px; width: 80%; }
.skeleton-text-lg { height: 20px; width: 100%; }

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fp-border);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card {
    background: var(--fp-card-bg);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.skeleton-card .skeleton-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 0;
}

.skeleton-card .skeleton-row .skeleton-text {
    flex: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    background: var(--fp-card-bg);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 2rem 3rem;
    text-align: center;
    box-shadow: var(--fp-shadow);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--fp-border);
    border-top-color: var(--fp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner .message {
    color: var(--fp-text-muted);
    font-size: 0.9rem;
}

/* Inline Loading Spinner */
.spinner-inline {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--fp-border);
    border-top-color: var(--fp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Button Loading State */
.fp-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.fp-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.fp-btn-outline.loading::after {
    border: 2px solid var(--fp-border);
    border-top-color: var(--fp-primary);
}

/* Skeleton Grid */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.skeleton-grid .skeleton-card {
    padding: 1.25rem;
}

/* Skeleton Table */
.skeleton-table .skeleton-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px 100px;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--fp-border);
}

/* Skeleton Stats */
.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skeleton-stat {
    background: var(--fp-card-bg);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 1.25rem;
    text-align: center;
}

.skeleton-stat .skeleton-text-lg {
    margin: 0 auto 0.5rem;
    width: 60%;
}

.skeleton-stat .skeleton-text-sm {
    margin: 0 auto;
    width: 40%;
}

/* Light theme adjustments */
[data-theme="light"] .loading-overlay {
    background: rgba(241, 245, 249, 0.7);
}

[data-theme="light"] .skeleton {
    background: #e2e8f0;
}

[data-theme="light"] .skeleton-text,
[data-theme="light"] .skeleton-text-sm,
[data-theme="light"] .skeleton-text-md,
[data-theme="light"] .skeleton-text-lg {
    background: #e2e8f0;
}

[data-theme="light"] .skeleton-circle {
    background: #e2e8f0;
}

/* =====================================================================
   EMPTY STATE STYLES
   ===================================================================== */

.empty-state-container {
    animation: fadeInUp 0.5s ease-out;
}

.empty-state-container .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Add decorative dots */
.empty-state-container .dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.empty-state-container .dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fp-border);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.empty-state-container .dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.empty-state-container .dots span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Print Styles */
@media print {
    .no-print, .fp-topbar { display:none !important; }
    body { background:#fff; color:#000; }
    .fp-card { border-color:#ccc; box-shadow: none; background: #fff; }
    .fp-stat-value { color: #000 !important; }
    [data-theme="light"] { --fp-text: #000; }
}


/* =====================================================================
   PROGRESS INDICATORS
   ===================================================================== */

/* Progress Bar */
.fp-progress {
    width: 100%;
    height: 8px;
    background: var(--fp-border);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.fp-progress .bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--fp-primary), var(--fp-secondary));
    transition: width 0.3s ease;
    position: relative;
}

.fp-progress .bar.animate {
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.fp-progress .bar.success { background: var(--fp-secondary); }
.fp-progress .bar.warning { background: var(--fp-warning); }
.fp-progress .bar.danger { background: var(--fp-danger); }

/* Progress with label */
.fp-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--fp-text-muted);
    margin-bottom: 0.3rem;
}

.fp-progress-label .percentage {
    font-weight: 700;
    color: var(--fp-text);
}

/* Circle Progress */
.fp-progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--fp-primary) var(--progress, 0%), var(--fp-border) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fp-progress-circle .inner {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--fp-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.fp-progress-circle.success { background: conic-gradient(var(--fp-secondary) var(--progress, 0%), var(--fp-border) 0%); }
.fp-progress-circle.warning { background: conic-gradient(var(--fp-warning) var(--progress, 0%), var(--fp-border) 0%); }
.fp-progress-circle.danger { background: conic-gradient(var(--fp-danger) var(--progress, 0%), var(--fp-border) 0%); }

/* Step Progress */
.fp-step-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 0.5rem;
}

.fp-step-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background: var(--fp-border);
    transform: translateY(-50%);
    z-index: 0;
}

.fp-step-progress .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.fp-step-progress .step .number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--fp-border);
    color: var(--fp-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.fp-step-progress .step.active .number {
    background: var(--fp-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(30,64,175,0.2);
}

.fp-step-progress .step.completed .number {
    background: var(--fp-secondary);
    color: #fff;
}

.fp-step-progress .step .label {
    font-size: 0.65rem;
    color: var(--fp-text-muted);
    margin-top: 0.3rem;
    text-align: center;
}

.fp-step-progress .step.active .label {
    color: var(--fp-text);
    font-weight: 600;
}

/* Loading Spinner */
.fp-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--fp-border);
    border-top-color: var(--fp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.fp-spinner.small { width: 16px; height: 16px; border-width: 2px; }
.fp-spinner.large { width: 40px; height: 40px; border-width: 4px; }
.fp-spinner.white { border-color: rgba(255,255,255,0.3); border-top-color: #fff; }

/* Pulsing Dot */
.fp-dot-pulse {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.fp-dot-pulse span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fp-border);
    animation: dotPulse 1.2s ease-in-out infinite;
}

.fp-dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
.fp-dot-pulse span:nth-child(3) { animation-delay: 0.4s; }

.fp-dot-pulse.primary span { background: var(--fp-primary); }
.fp-dot-pulse.success span { background: var(--fp-secondary); }
.fp-dot-pulse.danger span { background: var(--fp-danger); }

/* Operation Status */
.fp-operation-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--fp-border);
}

.fp-operation-status .icon { font-size: 1.2rem; }
.fp-operation-status .message { flex: 1; font-size: 0.85rem; }
.fp-operation-status .status { font-size: 0.7rem; }

.fp-operation-status.running { border-color: var(--fp-primary); }
.fp-operation-status.running .status { color: var(--fp-primary); }

.fp-operation-status.success { border-color: var(--fp-secondary); }
.fp-operation-status.success .status { color: var(--fp-secondary); }

.fp-operation-status.error { border-color: var(--fp-danger); }
.fp-operation-status.error .status { color: var(--fp-danger); }

.fp-operation-status.waiting { border-color: var(--fp-warning); }
.fp-operation-status.waiting .status { color: var(--fp-warning); }

/* Progress Container */
.fp-progress-container {
    padding: 1rem;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: 12px;
    margin: 1rem 0;
}

.fp-progress-container .title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.fp-progress-container .subtitle {
    color: var(--fp-text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

/* Upload Progress */
.fp-upload-progress {
    border: 2px dashed var(--fp-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.fp-upload-progress.dragover {
    border-color: var(--fp-primary);
    background: rgba(30,64,175,0.05);
}

.fp-upload-progress .icon { font-size: 3rem; margin-bottom: 0.5rem; }
.fp-upload-progress .title { font-weight: 600; margin-bottom: 0.25rem; }
.fp-upload-progress .subtitle { color: var(--fp-text-muted); font-size: 0.85rem; }
/* =====================================================================
   FINAL UI/UX POLISH - Step 30
   ===================================================================== */

/* ---------------------------------------------------------------------
   Smooth Transitions
   --------------------------------------------------------------------- */
.fp-card,
.fp-btn,
.fp-input,
.fp-stat-card,
.vehicle-card,
.health-card,
.timeline-item,
.gallery-item {
    transition: all 0.25s ease-in-out;
}

/* ---------------------------------------------------------------------
   Card Hover Effects
   --------------------------------------------------------------------- */
.fp-card:hover {
    border-color: rgba(30,64,175,0.3);
    box-shadow: var(--fp-shadow);
}

.fp-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--fp-primary);
    box-shadow: var(--fp-shadow);
}

/* ---------------------------------------------------------------------
   Consistent Typography
   --------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

.fp-text-sm { font-size: 0.85rem; }
.fp-text-xs { font-size: 0.75rem; }
.fp-text-lg { font-size: 1.1rem; }
.fp-text-xl { font-size: 1.25rem; }

/* ---------------------------------------------------------------------
   Consistent Spacing
   --------------------------------------------------------------------- */
.fp-m-0 { margin: 0; }
.fp-m-1 { margin: 0.5rem; }
.fp-m-2 { margin: 1rem; }
.fp-m-3 { margin: 1.5rem; }
.fp-p-0 { padding: 0; }
.fp-p-1 { padding: 0.5rem; }
.fp-p-2 { padding: 1rem; }
.fp-p-3 { padding: 1.5rem; }

.fp-mt-1 { margin-top: 0.5rem; }
.fp-mt-2 { margin-top: 1rem; }
.fp-mt-3 { margin-top: 1.5rem; }
.fp-mb-1 { margin-bottom: 0.5rem; }
.fp-mb-2 { margin-bottom: 1rem; }
.fp-mb-3 { margin-bottom: 1.5rem; }

/* ---------------------------------------------------------------------
   Improved Form Elements
   --------------------------------------------------------------------- */
.fp-input:focus {
    border-color: var(--fp-primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}

.fp-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fp-input.error {
    border-color: var(--fp-danger);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}

.fp-input.success {
    border-color: var(--fp-secondary);
    box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}

select.fp-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ---------------------------------------------------------------------
   Checkbox & Radio Styling
   --------------------------------------------------------------------- */
.fp-checkbox {
    accent-color: var(--fp-primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fp-radio {
    accent-color: var(--fp-primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ---------------------------------------------------------------------
   Table Improvements
   --------------------------------------------------------------------- */
.fp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.fp-table th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    color: var(--fp-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--fp-border);
}

.fp-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--fp-border);
}

.fp-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

/* ---------------------------------------------------------------------
   Responsive Improvements
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
    .fp-hide-mobile { display: none !important; }
    .fp-stack-mobile { flex-direction: column !important; }
    .fp-full-mobile { width: 100% !important; }
    .fp-text-center-mobile { text-align: center !important; }
}

@media (min-width: 641px) {
    .fp-hide-desktop { display: none !important; }
}

/* ---------------------------------------------------------------------
   Print Enhancements
   --------------------------------------------------------------------- */
@media print {
    .fp-no-print { display: none !important; }
    .fp-card { 
        box-shadow: none !important; 
        border: 1px solid #ddd !important;
        background: #fff !important;
    }
    .fp-stat-value { color: #000 !important; }
    body { background: #fff !important; color: #000 !important; }
    .fp-topbar { display: none !important; }
}

/* ---------------------------------------------------------------------
   Scrollable Containers
   --------------------------------------------------------------------- */
.fp-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fp-scroll-y {
    overflow-y: auto;
    max-height: 400px;
}

/* ---------------------------------------------------------------------
   Badge Variants
   --------------------------------------------------------------------- */
.fp-badge-success { background: rgba(5,150,105,0.18); color: var(--fp-secondary); }
.fp-badge-error { background: rgba(220,38,38,0.18); color: var(--fp-danger); }
.fp-badge-warning { background: rgba(217,119,6,0.18); color: var(--fp-warning); }
.fp-badge-info { background: rgba(30,64,175,0.18); color: var(--fp-primary); }

/* ---------------------------------------------------------------------
   Tooltip
   --------------------------------------------------------------------- */
.fp-tooltip {
    position: relative;
    cursor: help;
}

.fp-tooltip .tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background: var(--fp-surface);
    color: var(--fp-text);
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--fp-border);
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 400;
}

.fp-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ---------------------------------------------------------------------
   Divider
   --------------------------------------------------------------------- */
.fp-divider {
    border: none;
    border-top: 1px solid var(--fp-border);
    margin: 1.5rem 0;
}

.fp-divider-light {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin: 1rem 0;
}

/* ---------------------------------------------------------------------
   Tag / Chip
   --------------------------------------------------------------------- */
.fp-tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--fp-border);
    color: var(--fp-text-muted);
}

.fp-tag-primary { background: rgba(30,64,175,0.18); color: var(--fp-primary); }
.fp-tag-success { background: rgba(5,150,105,0.18); color: var(--fp-secondary); }
.fp-tag-danger { background: rgba(220,38,38,0.18); color: var(--fp-danger); }
.fp-tag-warning { background: rgba(217,119,6,0.18); color: var(--fp-warning); }

/* ---------------------------------------------------------------------
   Avatar
   --------------------------------------------------------------------- */
.fp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--fp-text);
}

.fp-avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.fp-avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }

/* ---------------------------------------------------------------------
   Breadcrumb
   --------------------------------------------------------------------- */
.fp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--fp-text-muted);
    flex-wrap: wrap;
}

.fp-breadcrumb a {
    color: var(--fp-primary);
    text-decoration: none;
}

.fp-breadcrumb a:hover {
    text-decoration: underline;
}

.fp-breadcrumb .separator {
    color: var(--fp-border);
}

/* ---------------------------------------------------------------------
   Notification Dot
   --------------------------------------------------------------------- */
.fp-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fp-dot-green { background: var(--fp-secondary); }
.fp-dot-red { background: var(--fp-danger); }
.fp-dot-yellow { background: var(--fp-warning); }
.fp-dot-blue { background: var(--fp-primary); }
.fp-dot-gray { background: var(--fp-text-muted); }

/* ---------------------------------------------------------------------
   Pulse Animation for Live Indicators
   --------------------------------------------------------------------- */
.fp-pulse {
    animation: fpPulse 2s ease-in-out infinite;
}

@keyframes fpPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ---------------------------------------------------------------------
   Fade In Animation
   --------------------------------------------------------------------- */
.fp-fade-in {
    animation: fpFadeIn 0.4s ease-out;
}

@keyframes fpFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   Slide In Animation
   --------------------------------------------------------------------- */
.fp-slide-in {
    animation: fpSlideIn 0.4s ease-out;
}

@keyframes fpSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---------------------------------------------------------------------
   Responsive Grid Improvements
   --------------------------------------------------------------------- */
.fp-grid {
    display: grid;
    gap: 1rem;
}

.fp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.fp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fp-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .fp-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .fp-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .fp-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .fp-grid-4 { grid-template-columns: 1fr; }
    .fp-grid-3 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Box Shadow Utilities
   --------------------------------------------------------------------- */
.fp-shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.fp-shadow { box-shadow: var(--fp-shadow); }
.fp-shadow-lg { box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.fp-shadow-none { box-shadow: none; }

/* ---------------------------------------------------------------------
   Border Radius Utilities
   --------------------------------------------------------------------- */
.fp-rounded-sm { border-radius: 6px; }
.fp-rounded { border-radius: 12px; }
.fp-rounded-lg { border-radius: 16px; }
.fp-rounded-full { border-radius: 50%; }
.fp-rounded-none { border-radius: 0; }
<!-- Add after the theme.css link -->
<script src="assets/js/theme-toggle.js" defer></script>