/* Modern Dashboard Enhancements */
/* Glassmorphism, animations, and contemporary design */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --modern-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --modern-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --modern-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --modern-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --modern-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --card-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] {
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Modern dashboard container */
.dashboard-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    position: relative;
}

/* Compact heights for dashboard elements */
.dash-card {
    padding: 0.75rem 1rem !important;
}

.dash-kpi {
    padding: 0.75rem 1rem !important;
    min-height: auto !important;
}

.dash-stat {
    padding: 0.5rem 0.75rem !important;
    min-height: auto !important;
}

.dash-filters {
    padding: 0.5rem 0.75rem !important;
}

.dash-filters__group {
    margin-bottom: 0.5rem !important;
}

.dash-filters__group label {
    font-size: 0.7rem !important;
    margin-bottom: 0.25rem !important;
}

.dash-select-wrap select {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
    height: 32px !important;
}

.dash-section-title {
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem !important;
}

.dash-table-wrap {
    max-height: 300px !important;
}

.dash-table {
    font-size: 0.75rem !important;
}

.dash-table th,
.dash-table td {
    padding: 0.4rem 0.6rem !important;
}

.dash-kpi__label {
    font-size: 0.7rem !important;
}

.dash-kpi__value {
    font-size: 1.2rem !important;
}

.dash-kpi__badge {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.4rem !important;
}

.dash-stat__value {
    font-size: 1rem !important;
}

.dash-stat__label {
    font-size: 0.7rem !important;
}

.dash-alert {
    padding: 0.5rem 0.75rem !important;
}

.dash-quick {
    padding: 0.5rem 0.75rem !important;
}

.dash-quick__text strong {
    font-size: 0.8rem !important;
}

.dash-quick__text span {
    font-size: 0.65rem !important;
}

.dash-progress-block {
    padding: 0.5rem !important;
}

.dash-progress-bar {
    height: 6px !important;
}

.dash-summary-item {
    padding: 0.4rem 0.6rem !important;
}

.dash-summary-item__value {
    font-size: 0.9rem !important;
}

.dash-leaderboard__item {
    padding: 0.4rem 0.6rem !important;
}

.dash-reservation {
    padding: 0.4rem 0.6rem !important;
}

.dash-chart-wrap {
    height: 200px !important;
}

/* Compact ATM card */
.atm-card {
    height: 220px !important;
}

.atm-card-front,
.atm-card-back {
    padding: 0.9rem !important;
}

.atm-card-number {
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
}

.atm-card-amount {
    font-size: 0.85rem !important;
}

.atm-card-btn {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.65rem !important;
}

.atm-card-stats {
    padding-top: 0.35rem !important;
}

.atm-card-actions {
    margin-top: 0.5rem !important;
}

.atm-card-info {
    margin-bottom: 0.4rem !important;
}

/* Compact Sell Your Car banner */
.sell-car-hero-banner {
    padding: 1rem 1.5rem !important;
    margin-bottom: 1rem !important;
}

.sell-car-banner-title {
    font-size: 1.2rem !important;
}

.sell-car-banner-subtitle {
    font-size: 0.8rem !important;
}

.sell-car-banner-btn {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.8rem !important;
}

.sell-car-banner-icon {
    font-size: 3rem !important;
}

[data-theme="dark"] .dashboard-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Animated background particles */
.dashboard-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(79, 172, 254, 0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

/* Modern glassmorphism cards */
.dashboard-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: var(--card-transition);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.dashboard-card:hover::before {
    left: 100%;
}

.dashboard-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
}

/* Gradient stat cards */
.dashboard-card-gradient {
    background: var(--modern-gradient-1);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.dashboard-card-gradient::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
}

/* Modern stat icons */
.dashboard-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: var(--card-transition);
    position: relative;
}

.dashboard-stat-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover .dashboard-stat-icon::before {
    opacity: 1;
}

.dashboard-stat-icon.primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.dashboard-stat-icon.secondary {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.15), rgba(56, 249, 215, 0.15));
    border-color: rgba(67, 233, 123, 0.3);
    color: #43e97b;
}

.dashboard-stat-icon.accent {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.15), rgba(254, 225, 64, 0.15));
    border-color: rgba(250, 112, 154, 0.3);
    color: #fa709a;
}

.dashboard-stat-icon.danger {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.15), rgba(245, 87, 108, 0.15));
    border-color: rgba(240, 147, 251, 0.3);
    color: #f5576c;
}

/* Modern progress bars */
.dashboard-progress {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    position: relative;
}

.dashboard-progress-bar {
    background: var(--modern-gradient-3);
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Modern welcome card */
.dashboard-welcome {
    background: var(--modern-gradient-1);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

/* Modern alert cards */
.dashboard-alert {
    border-radius: 16px;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.dashboard-alert.warning {
    background: linear-gradient(135deg, rgba(254, 225, 64, 0.15), rgba(250, 112, 154, 0.15));
    border-color: rgba(254, 225, 64, 0.3);
}

.dashboard-alert.danger {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.15), rgba(245, 87, 108, 0.15));
    border-color: rgba(240, 147, 251, 0.3);
}

/* Modern quick action buttons */
.dashboard-quick-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--card-transition);
    backdrop-filter: blur(10px);
}

.dashboard-quick-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-quick-btn.primary {
    background: var(--modern-gradient-1);
    color: white;
    border: none;
}

/* Modern table styles */
.table {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

.table thead {
    background: var(--modern-gradient-1);
    border-radius: 16px 16px 0 0;
}

.table thead th {
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

/* Animation utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.5s ease-out forwards;
}

/* Staggered animation delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Modern badge styles */
.badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(5px);
}

.badge-success {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.2));
    color: #10b981;
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(254, 225, 64, 0.2), rgba(250, 112, 154, 0.2));
    color: #f59e0b;
    border: 1px solid rgba(254, 225, 64, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.2));
    color: #ef4444;
    border: 1px solid rgba(240, 147, 251, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.2));
    color: #3b82f6;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

/* Modern input styles */
input, select, textarea {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: var(--card-transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] input, 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .dashboard-card {
        border-radius: 16px;
        padding: 1rem;
    }
    
    .dashboard-stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .dashboard-welcome {
        padding: 1rem 1.5rem;
    }
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--modern-gradient-1);
    color: white;
    border: none;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--card-transition);
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Loading spinner */
.modern-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: modernSpin 1s linear infinite;
}

@keyframes modernSpin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for live indicators */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Modern tooltip */
.modern-tooltip {
    position: relative;
}

.modern-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modern-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}
