/* ============================================
   FLEETZY ADMIN DASHBOARD v2.0
   Premium Dark Theme - Tesla/Apple Inspired
   ============================================ */

/* ============================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================ */
:root {
    /* Dark Theme (Primary) */
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --bg-tertiary: #27272a;
    --bg-card: rgba(39, 39, 42, 0.5);
    --bg-card-hover: rgba(39, 39, 42, 0.8);
    --bg-card-solid: #27272a;
    
    /* Card & Input backgrounds (ADDED) */
    --card-bg: #1a1a1d;
    --card-border: rgba(255, 255, 255, 0.1);
    --input-bg: #0f0f10;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-muted: #52525b;
    
    /* Primary color */
    --primary: #10b981;
    
    /* Brand Gradient */
    --gradient-brand: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%);
    --gradient-brand-subtle: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 50%, rgba(59, 130, 246, 0.15) 100%);
    --gradient-brand-text: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    
    /* Accent Colors */
    --accent-green: #10b981;
    --accent-emerald: #34d399;
    --accent-teal: #14b8a6;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    
    /* Status Colors */
    --status-success: #10b981;
    --status-warning: #f59e0b;
    --status-error: #ef4444;
    --status-info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.3);
    --shadow-glow-strong: 0 0 60px rgba(16, 185, 129, 0.5);
    
    /* Animation Timing */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 600ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Sidebar */
    --sidebar-width-collapsed: 72px;
    --sidebar-width-expanded: 240px;
}

/* Light Theme Override */
.light {
    --bg-primary: #fafafa;
    --bg-secondary: #f4f4f5;
    --bg-tertiary: #e4e4e7;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #ffffff;
    
    /* Card & Input backgrounds for light mode (ADDED) */
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.12);
    --input-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.12);
    --primary: #10b981;
    
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-medium: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-tertiary: #71717a;
    --text-muted: #a1a1aa;
    --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   AMBIENT BACKGROUND
   ============================================ */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background: var(--gradient-glow);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   FLOATING SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: var(--sidebar-width-collapsed);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-2xl);
    padding: var(--space-md) var(--space-sm);
    z-index: 100;
    transition: width var(--transition-slow);
    box-shadow: var(--shadow-lg);
}

.sidebar:hover {
    width: var(--sidebar-width-expanded);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-xs);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    overflow: visible;
}

.sidebar-logo .logo-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.sidebar:hover .logo-image {
    width: 140px;
    height: auto;
    transform: scale(1.02);
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-brand);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    overflow: hidden;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
    flex-shrink: 0;
}

.nav-item span {
    margin-left: 14px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar:hover .nav-item span {
    opacity: 1;
}

.nav-item .badge {
    position: absolute;
    right: 16px;
    background: var(--accent-red);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar:hover .nav-item .badge {
    opacity: 1;
}

.nav-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-sm) 0;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    margin-left: calc(var(--sidebar-width-collapsed) + 40px);
    padding: var(--space-lg) var(--space-xl);
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    width: 280px;
    transition: all var(--transition-fast);
}

.search-bar:focus-within {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-bar i {
    color: var(--text-tertiary);
    margin-right: 10px;
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar kbd {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: 'SF Mono', 'JetBrains Mono', monospace;
}

/* Icon Buttons */
.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    position: relative;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.icon-btn .badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: var(--accent-red);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* Profile Button */
.profile-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 16px 6px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-btn:hover {
    background: var(--bg-tertiary);
}

.profile-btn img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.profile-info {
    text-align: left;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
}

.profile-role {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
}

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

/* Clickable stat card - extra visual indicators */
.stat-card.stat-card-clickable {
    cursor: pointer;
    position: relative;
}

.stat-card.stat-card-clickable::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: all 0.3s ease;
    pointer-events: none; /* Don't block clicks */
}

.stat-card.stat-card-clickable:hover {
    transform: translateY(-6px);
    border-color: var(--accent-purple);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
}

.stat-card.stat-card-clickable:hover::after {
    opacity: 1;
    background: rgba(139, 92, 246, 0.2);
}

.stat-card.stat-card-clickable:active {
    transform: translateY(-2px);
}

.stat-card.stat-card-clickable .stat-header::after {
    content: 'Click to view';
    font-size: 10px;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Don't block clicks */
}

.stat-card.stat-card-clickable:hover .stat-header::after {
    opacity: 1;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.stat-value.gradient {
    background: var(--gradient-brand-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.stat-change.neutral {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent-green);
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
}

.card-body {
    padding: var(--space-lg);
}

/* Card Action Buttons */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-ghost {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: none;
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-ghost.active {
    background: var(--accent-green);
    color: white;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    border: none;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ============================================
   REVENUE CHART
   ============================================ */
.chart-container {
    height: 280px;
    position: relative;
}

.chart-bars {
    height: calc(100% - 60px);
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: var(--space-lg) 0;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    height: 100%;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--accent-green) 0%, rgba(16, 185, 129, 0.3) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    transition: all var(--transition-base);
    cursor: pointer;
    margin-top: auto;
}

.chart-bar:hover {
    filter: brightness(1.2);
    transform: scaleX(1.05);
}

.chart-bar[data-value]::after {
    content: attr(data-value);
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}

.chart-bar:hover::after {
    opacity: 1;
}

.chart-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ============================================
   FLEET GRID
   ============================================ */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.vehicle-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.vehicle-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    transform: translateY(-2px);
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.vehicle-image {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
}

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

.vehicle-status {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-status.rented { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.vehicle-status.available { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.vehicle-status.maintenance { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.vehicle-status.reserved { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.vehicle-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.vehicle-plate {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: 'SF Mono', monospace;
}

.vehicle-meta {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-secondary);
}

.vehicle-meta span {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   AI INSIGHTS
   ============================================ */
.card.ai-insights {
    background: var(--gradient-brand-subtle);
    border-color: rgba(16, 185, 129, 0.2);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ai-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient-brand);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-badge i {
    font-size: 10px;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.insight-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.insight-item {
    display: flex;
    gap: 14px;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.insight-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.insight-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.insight-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.insight-icon.info { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.insight-icon.danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.insight-item.urgent {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin: calc(-1 * var(--space-sm));
    margin-bottom: var(--space-sm);
}

.insight-content { flex: 1; }

.insight-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.insight-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.insight-action {
    font-size: 12px;
    color: var(--accent-green);
    font-weight: 500;
    margin-top: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 52px;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.activity-item:last-child::before {
    display: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.activity-icon.payment { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.activity-icon.rental { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.activity-icon.alert { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.activity-icon.late { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.activity-icon.fee { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.activity-icon.note { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }
.activity-icon.maintenance { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.activity-icon.customer { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }

.activity-content { flex: 1; }

.activity-text {
    font-size: 14px;
    line-height: 1.5;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-brand);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    transition: all var(--transition-base);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow-strong);
}

.fab:active {
    transform: scale(0.95);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slower) ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out forwards;
}

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

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    min-width: 320px;
    max-width: 420px;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card-solid);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    animation: slideInRight var(--transition-base) ease-out;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.warning { border-left: 4px solid var(--accent-amber); }
.toast.info { border-left: 4px solid var(--accent-blue); }

.toast-icon {
    font-size: 20px;
    margin-top: 2px;
}

.toast.success .toast-icon { color: var(--accent-green); }
.toast.error .toast-icon { color: var(--accent-red); }
.toast.warning .toast-icon { color: var(--accent-amber); }
.toast.info .toast-icon { color: var(--accent-blue); }

.toast-content { flex: 1; }

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Don't block clicks when hidden */
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Allow clicks when visible */
}

.modal-overlay .modal-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

/* ============================================
   PENDING ACTIONS MODAL STYLES
   ============================================ */
.pending-section {
    border-bottom: 1px solid var(--border-subtle);
}

.pending-section:last-child {
    border-bottom: none;
}

.pending-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-primary);
}

.pending-section-header:hover {
    background: var(--bg-tertiary);
}

.pending-section-header i:first-child {
    margin-right: var(--space-sm);
    color: var(--accent-purple);
}

.pending-section-header i.fa-chevron-right {
    color: var(--text-muted);
    font-size: 12px;
}

.pending-items {
    padding: var(--space-sm) 0;
}

.pending-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    cursor: pointer;
    transition: background 0.2s ease;
}

.pending-item:hover {
    background: var(--bg-secondary);
}

.pending-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.pending-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pending-item-avatar i {
    color: var(--text-muted);
}

.pending-item-avatar.payment {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.pending-item-avatar.rental {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.pending-item-info {
    flex: 1;
    min-width: 0;
}

.pending-item-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-item-detail {
    font-size: 12px;
    color: var(--text-muted);
}

.pending-more {
    padding: var(--space-sm) var(--space-lg);
    text-align: center;
    color: var(--accent-purple);
    font-size: 13px;
    cursor: pointer;
}

.pending-more:hover {
    text-decoration: underline;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
}

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

.table th {
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.table td {
    padding: var(--space-md) var(--space-lg);
    font-size: 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: 10px;
        width: 60px;
        padding: var(--space-sm);
    }
    
    .sidebar:hover {
        width: 200px;
    }
    
    .main-content {
        margin-left: 80px;
        padding: var(--space-md);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .fleet-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }
    
    .top-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .search-bar {
        width: 100%;
        order: -1;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin-left: 70px;
        padding: var(--space-sm);
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-gradient { background: var(--gradient-brand-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header-left h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.section-header-left p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.section-header-right {
    display: flex;
    gap: 12px;
}

/* ============================================
   MINI STATS GRID
   ============================================ */
.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.mini-stat {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.mini-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mini-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mini-stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.mini-stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.mini-stat-icon.amber {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.mini-stat-icon.red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.mini-stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.mini-stat-content {
    flex: 1;
}

.mini-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.mini-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   CARD FILTERS
   ============================================ */
.card-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    position: relative;
}

.search-input i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 14px;
}

.search-input input {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 12px 10px 36px;
    font-size: 14px;
    color: var(--text-primary);
    width: 220px;
    transition: all 0.2s ease;
}

.search-input input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.filter-select {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 32px 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-green);
}

/* ============================================
   DATA TABLE
   ============================================ */
.card-body.no-padding {
    padding: 0;
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Vehicle cell styling */
.vehicle-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vehicle-image-small {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.vehicle-info {
    flex: 1;
}

.vehicle-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.vehicle-id {
    font-size: 12px;
    color: var(--text-tertiary);
}

.license-plate {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-weight: 600;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 13px;
}

.mileage, .rate, .vin-short {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-available {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.status-rented {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.status-maintenance {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.status-reserved {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.status-unknown {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--accent-green);
    color: white;
    transform: scale(1.05);
}

.btn-icon.danger:hover {
    background: #ef4444;
}

/* Empty and loading states */
.empty-state, .loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state i, .loading-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.empty-state p, .loading-state p {
    margin-bottom: 16px;
}

/* ============================================
   MODAL STYLES (Enhanced)
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Don't block clicks when hidden */
    transition: all 0.3s ease;
    margin: 0 !important; /* Override any inherited margin */
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Allow clicks when visible */
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content.modal-lg {
    max-width: 700px;
}

.modal-content.modal-xl {
    max-width: 900px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--accent-green);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ef4444;
    color: white;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label .required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    width: 100%;
}

/* Improve placeholder visibility */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: var(--input-bg);
}

.form-group input.readonly {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[type="file"] {
    padding: 8px;
}

/* ============================================
   BUTTON STYLES (Enhanced)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-teal) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: var(--card-border);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-ghost.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header-right {
        width: 100%;
    }
    
    .card-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input input,
    .filter-select {
        width: 100%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .mini-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mini-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CUSTOMER MODULE STYLES
   ============================================ */

/* Customer cell in table */
.customer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-medium);
}

.customer-info {
    display: flex;
    flex-direction: column;
}

.customer-name {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-id {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Corporate badge */
.badge-corporate {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

/* Contact info cell */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-phone, .contact-email {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-phone i, .contact-email i {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* DL info cell */
.dl-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.dl-expiry {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Customer status badges */
.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.status-approved {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* Action button variants */
.btn-icon.review {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.btn-icon.review:hover {
    background: var(--accent-blue);
    color: white;
}

.btn-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.btn-icon.success:hover {
    background: var(--accent-green);
    color: white;
}

/* Mini stat highlight */
.mini-stat.highlight {
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

/* ============================================
   REVIEW MODAL STYLES
   ============================================ */
.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
}

.review-section {
    margin-bottom: 24px;
}

.review-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-section h4 i {
    color: var(--accent-green);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item.full-width {
    grid-column: span 2;
}

.info-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
}

/* Document preview section */
.review-documents h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-documents h4 i {
    color: var(--accent-green);
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.doc-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.doc-preview {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-preview:hover {
    border-color: var(--accent-green);
    transform: scale(1.02);
}

.doc-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    gap: 8px;
}

.doc-placeholder i {
    font-size: 24px;
}

.doc-placeholder span {
    font-size: 12px;
}

/* Image viewer modal */
.modal-image-viewer {
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    border: none;
}

.image-viewer-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
}

/* Small modal variant */
.modal-sm {
    max-width: 420px;
}

/* XL modal variant */
.modal-xl {
    max-width: 1000px;
}

/* Date applied styling */
.date-applied {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Review info section */
.review-info {
    padding-right: 24px;
    border-right: 1px solid var(--border-subtle);
}

@media (max-width: 900px) {
    .review-info {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 24px;
    }
}

/* Danger button */
.btn-danger {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Text helper classes */
.text-secondary {
    color: var(--text-secondary);
}
1px solid var(--border-subtle);
}

.detail-section.full-width {
    grid-column: span 2;
}

.detail-section h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4 i {
    color: var(--accent-green);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.notes-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

/* Success button */
.btn-success {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Warning button */
.btn-warning {
    background: var(--accent-amber);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
}

/* Icon button variations */
.btn-icon.success {
    color: var(--accent-green);
}

.btn-icon.success:hover {
    background: rgba(16, 185, 129, 0.15);
}

.btn-icon.warning {
    color: var(--accent-amber);
}

.btn-icon.warning:hover {
    background: rgba(245, 158, 11, 0.15);
}

/* Modal message */
.modal-message {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal-message strong {
    color: var(--text-primary);
}

/* Required field indicator */
.required {
    color: var(--accent-red);
}

/* Input readonly styling */
.input-readonly {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed;
}

/* Responsive adjustments for detail grid */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-section.full-width {
        grid-column: span 1;
    }
}

/* ============================================
   PAYMENTS MODULE STYLES
   ============================================ */

/* Payment status badges */
.status-payment-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.status-payment-confirmed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.status-payment-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* Payment method badges */
.method-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.method-zelle {
    background: rgba(130, 71, 229, 0.15);
    color: #8247e5;
}

.method-cashapp {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
}

.method-venmo {
    background: rgba(0, 140, 211, 0.15);
    color: #008cd3;
}

.method-paypal {
    background: rgba(0, 48, 135, 0.15);
    color: #003087;
}

.light .method-paypal {
    background: rgba(0, 48, 135, 0.1);
    color: #003087;
}

.method-stripe {
    background: rgba(99, 91, 255, 0.15);
    color: #635bff;
}

.method-cash {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.method-check {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.method-card {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.method-other,
.method-unknown {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

/* Amount cell with late indicator */
.amount-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-value {
    font-weight: 600;
    color: var(--text-primary);
}

.late-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    font-size: 10px;
}

/* Rental reference badge */
.rental-ref {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Menlo', monospace;
}

/* Screenshot preview in modal */
.screenshot-preview {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.screenshot-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.screenshot-preview img:hover {
    transform: scale(1.02);
}

.screenshot-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* Late alert section */
.late-alert {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
}

.late-alert h4 {
    color: var(--accent-red);
}

.late-alert h4 i {
    color: var(--accent-red) !important;
}

.text-warning {
    color: var(--accent-amber) !important;
}

/* Screenshot fullscreen modal */
#modal-screenshot .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    box-shadow: none;
}

#modal-screenshot .modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
}

#screenshot-fullscreen-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
}

#modal-screenshot .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card-solid);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 10;
    transition: all var(--transition-fast);
}

#modal-screenshot .modal-close:hover {
    background: var(--accent-red);
    color: white;
}

/* New payment form */
.payment-summary {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.payment-summary-row:last-child {
    border-bottom: none;
}

.payment-summary-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.payment-summary-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Screenshot upload preview */
#new-payment-screenshot-preview {
    margin-top: 12px;
    display: none;
}

#new-payment-screenshot-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

/* Danger icon button */
.btn-icon.danger {
    color: var(--accent-red);
}

.btn-icon.danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Export button */
.btn-export {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-export:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

/* Mini stat overdue highlight */
.mini-stat.overdue {
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.mini-stat.overdue .mini-stat-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* Responsive payment table */
@media (max-width: 1024px) {
    .method-badge span {
        display: none;
    }
    
    .method-badge {
        padding: 6px;
    }
}

@media (max-width: 768px) {
    .amount-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ============================================
   REPORTS & ANALYTICS MODULE
   Session 6 - January 2025
   ============================================ */

/* Reports Header */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.reports-title-section {
    flex: 1;
    min-width: 200px;
}

.reports-main-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.reports-main-title i {
    color: var(--accent-green);
    font-size: 22px;
}

.reports-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.reports-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Date Range Selector */
.date-range-selector {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 4px;
    gap: 4px;
}

.date-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.date-btn:hover {
    color: var(--text-primary);
}

.date-btn.active {
    background: var(--bg-card-solid);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.date-btn i {
    margin-right: 4px;
}

/* Custom Date Picker */
.custom-date-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    margin-left: 8px;
    animation: slideInRight 0.2s ease;
}

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

.date-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.date-input {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 130px;
}

.date-input:hover {
    border-color: var(--accent-green);
}

.date-input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Custom calendar icon for date input */
.date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
    transition: filter var(--transition-fast);
}

.date-input::-webkit-calendar-picker-indicator:hover {
    filter: invert(0.9);
}

.btn-apply-dates {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-apply-dates:hover {
    background: var(--accent-green-dark, #059669);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-apply-dates i {
    font-size: 11px;
}

/* Main Export Button */
.btn-export-main {
    background: var(--gradient-brand);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-export-main:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* Reports Stats Grid */
.reports-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.report-stat .stat-icon.gradient-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
    color: var(--accent-green);
}

.report-stat .stat-icon.gradient-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
    color: var(--accent-blue);
}

.report-stat .stat-icon.gradient-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
    color: var(--accent-amber);
}

.report-stat .stat-icon.gradient-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
    color: var(--accent-red);
}

.stat-value.text-warning {
    color: var(--accent-amber);
}

/* Reports Charts Grid */
.reports-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.report-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.report-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.report-card .card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.report-card .card-title i {
    color: var(--accent-green);
}

.report-card .card-body {
    padding: var(--space-lg);
}

.report-card .card-body.no-padding {
    padding: 0;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 3px;
}

.toggle-btn {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--accent-green);
    color: white;
}

/* Badge Info */
.badge-info {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
}

/* Revenue Chart */
.chart-container.revenue-chart {
    height: 280px;
    display: grid;
    grid-template-columns: 50px 1fr;
    grid-template-rows: 1fr 30px;
    gap: 8px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 8px;
    text-align: right;
}

.y-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.chart-area {
    position: relative;
    background: 
        linear-gradient(180deg, 
            var(--border-subtle) 1px, 
            transparent 1px
        );
    background-size: 100% 25%;
    border-radius: var(--radius-sm);
}

#revenue-bars {
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 0 8px;
}

.bar-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, var(--accent-green) 0%, var(--accent-cyan) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-base);
}

.chart-bar:hover {
    filter: brightness(1.1);
}

.chart-bar.current {
    background: linear-gradient(180deg, var(--accent-emerald) 0%, var(--accent-green) 100%);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.bar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card-solid);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-medium);
    z-index: 10;
}

.chart-bar:hover .bar-tooltip {
    opacity: 1;
    visibility: visible;
}

.chart-x-axis {
    grid-column: 2;
    display: flex;
    justify-content: space-around;
    padding: 0 8px;
}

.x-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
    text-align: center;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    padding-top: var(--space-md);
    margin-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Donut Chart */
.donut-chart-container {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.donut-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--donut-gradient, conic-gradient(var(--bg-tertiary) 0deg 360deg));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-chart::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--bg-card-solid);
    border-radius: 50%;
}

.donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.donut-total {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.donut-label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donut-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.donut-legend .legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.donut-legend .legend-label {
    flex: 1;
    color: var(--text-secondary);
}

.donut-legend .legend-value {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 30px;
    text-align: right;
}

.donut-legend .legend-percent {
    color: var(--text-tertiary);
    font-size: 12px;
    min-width: 40px;
    text-align: right;
}

.legend-empty {
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: center;
    padding: var(--space-lg);
}

/* Reports Details Grid */
.reports-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Top Customers List */
.top-customers-list {
    max-height: 340px;
    overflow-y: auto;
}

.top-customer-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.top-customer-item:hover {
    background: var(--bg-secondary);
}

.top-customer-item:last-child {
    border-bottom: none;
}

.customer-rank {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
}

.top-customer-item:first-child .customer-rank {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
}

.top-customer-item:nth-child(2) .customer-rank {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #000;
}

.top-customer-item:nth-child(3) .customer-rank {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-info {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-payments {
    font-size: 12px;
    color: var(--text-tertiary);
}

.customer-revenue {
    text-align: right;
    min-width: 100px;
}

.revenue-amount {
    font-weight: 600;
    color: var(--accent-green);
    font-size: 15px;
}

.revenue-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.revenue-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
    border-radius: 2px;
    transition: width 0.6s ease-out;
}

/* Fleet Metrics */
.fleet-metrics {
    padding: var(--space-sm);
}

.metric-row {
    margin-bottom: var(--space-md);
}

.metric-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.metric-item.small {
    background: transparent;
    padding: var(--space-sm) 0;
    justify-content: space-between;
}

.metric-item.small.warning {
    color: var(--accent-amber);
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.metric-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.metric-content {
    flex: 1;
}

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

.metric-item.small .metric-value {
    font-size: 14px;
    font-weight: 600;
}

.metric-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.metric-indicator {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.metric-indicator.good {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.metric-indicator.medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.metric-indicator.low {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.fleet-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.status-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.status-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.status-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.status-item.available .status-count { color: var(--accent-green); }
.status-item.rented .status-count { color: var(--accent-blue); }
.status-item.maintenance .status-count { color: var(--accent-amber); }
.status-item.reserved .status-count { color: var(--accent-purple); }

.metric-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-md) 0;
}

/* Vehicle Revenue List */
.vehicle-revenue-list {
    max-height: 340px;
    overflow-y: auto;
}

.vehicle-revenue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.vehicle-revenue-item:hover {
    background: var(--bg-secondary);
}

.vehicle-revenue-item:last-child {
    border-bottom: none;
}

.vehicle-revenue-item .vehicle-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
}

.vehicle-revenue-item .vehicle-image {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.vehicle-revenue-item .vehicle-image i {
    font-size: 18px;
    color: var(--text-tertiary);
}

.vehicle-revenue-item .vehicle-details {
    min-width: 0;
}

.vehicle-revenue-item .vehicle-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-revenue-item .vehicle-plate {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: 'SF Mono', 'Monaco', monospace;
}

.vehicle-revenue-item .vehicle-revenue {
    text-align: right;
    min-width: 100px;
}

.vehicle-bar {
    background: var(--bg-secondary);
}

/* Timeline Card */
.timeline-card {
    margin-bottom: var(--space-xl);
}

.transactions-table-container {
    overflow-x: auto;
    min-width: 100%;
}

.transactions-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    table-layout: fixed;
}

.transactions-table th,
.transactions-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Column widths */
.transactions-table th:nth-child(1),
.transactions-table td:nth-child(1) { width: 70px; min-width: 70px; } /* Date */
.transactions-table th:nth-child(2),
.transactions-table td:nth-child(2) { width: 160px; min-width: 140px; } /* Customer */
.transactions-table th:nth-child(3),
.transactions-table td:nth-child(3) { width: 120px; min-width: 100px; } /* Vehicle */
.transactions-table th:nth-child(4),
.transactions-table td:nth-child(4) { width: 90px; min-width: 80px; } /* Amount */
.transactions-table th:nth-child(5),
.transactions-table td:nth-child(5) { width: 100px; min-width: 90px; } /* Method */
.transactions-table th:nth-child(6),
.transactions-table td:nth-child(6) { width: 80px; min-width: 70px; } /* Status */

.transactions-table th {
    background: var(--bg-secondary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.transactions-table tbody tr {
    transition: background var(--transition-fast);
    height: 52px;
}

.transactions-table tbody tr:hover {
    background: var(--bg-secondary);
}

.transactions-table .date-cell {
    font-size: 13px;
    color: var(--text-secondary);
}

.transactions-table .customer-cell {
    font-weight: 500;
    color: var(--text-primary);
}

.transactions-table .vehicle-cell {
    color: var(--text-secondary);
    font-size: 13px;
}

.transactions-table .amount-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.transactions-table .method-cell .method-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.transactions-table .status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
}

.transactions-table .status-confirmed,
.transactions-table .status-paid {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.transactions-table .status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.transactions-table .status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.transactions-table .empty-cell {
    text-align: center;
    padding: var(--space-2xl);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 36px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

.empty-state.small {
    padding: var(--space-xl);
}

.empty-state.small i {
    font-size: 28px;
}

/* Reports Responsive */
@media (max-width: 1280px) {
    .reports-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reports-details-grid > :last-child {
        grid-column: span 2;
    }
}

@media (max-width: 1024px) {
    .reports-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reports-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .donut-chart-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .donut-legend {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .reports-header {
        flex-direction: column;
    }
    
    .reports-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .date-range-selector {
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .date-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .custom-date-picker {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        margin-top: 8px;
        padding: 12px;
        gap: 10px;
    }
    
    .date-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    
    .date-input {
        width: 100%;
    }
    
    .btn-apply-dates {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .btn-export-main {
        justify-content: center;
    }
    
    .reports-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-details-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-details-grid > :last-child {
        grid-column: 1;
    }
    
    .fleet-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   SESSION 7: FINAL POLISH - NEW COMPONENTS
   ============================================ */

/* ----------------------------------------
   FAB MENU
   ---------------------------------------- */
.fab-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--space-sm);
    pointer-events: none; /* Don't block clicks on elements behind */
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-teal));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.3s var(--ease-out);
    pointer-events: auto; /* But allow clicks on the actual button */
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.fab.active {
    transform: rotate(45deg);
    background: var(--bg-tertiary);
}

.fab-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s var(--ease-out);
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    pointer-events: auto; /* Allow clicks on menu items */
}

.fab-menu-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.fab-menu-item i {
    width: 20px;
    text-align: center;
}

/* ----------------------------------------
   NOTIFICATIONS PANEL
   ---------------------------------------- */
.notifications-panel {
    position: fixed;
    top: 70px;
    right: var(--space-xl);
    width: 380px;
    max-height: calc(100vh - 100px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s var(--ease-out);
    overflow: hidden;
}

.notifications-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.notification-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
}

.notifications-empty i {
    font-size: 32px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* ----------------------------------------
   PROFILE DROPDOWN
   ---------------------------------------- */
.profile-dropdown {
    position: fixed;
    top: 70px;
    right: var(--space-xl);
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s var(--ease-out);
    overflow: hidden;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-secondary);
}

.profile-dropdown-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.profile-dropdown-name {
    font-weight: 600;
    font-size: 14px;
}

.profile-dropdown-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--space-xs) 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.profile-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--accent-green);
}

.profile-dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-tertiary);
}

.profile-dropdown-item:hover i {
    color: var(--accent-green);
}

/* ----------------------------------------
   SETTINGS PAGE
   ---------------------------------------- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.settings-card {
    height: fit-content;
}

.settings-card .card-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.settings-card .card-body {
    padding: var(--space-lg);
}

.profile-settings {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.profile-avatar-large {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-change-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

/* Toggle Switch */
.settings-toggle-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.settings-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-label {
    font-weight: 500;
    font-size: 13px;
}

.toggle-description {
    font-size: 12px;
    color: var(--text-tertiary);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-green);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: var(--space-sm);
}

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.theme-option:hover {
    border-color: var(--text-tertiary);
}

.theme-option.active {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.theme-option i {
    font-size: 20px;
    color: var(--text-secondary);
}

.theme-option.active i {
    color: var(--accent-green);
}

.theme-option span {
    font-size: 12px;
    font-weight: 500;
}

/* Color Selector */
.color-selector {
    display: flex;
    gap: var(--space-sm);
}

.color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--color);
}

/* Integration List */
.integration-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.integration-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.integration-item:hover {
    background: var(--bg-hover);
}

.integration-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.integration-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.integration-name {
    font-weight: 600;
    font-size: 13px;
}

.integration-status {
    font-size: 12px;
    color: var(--text-tertiary);
}

.integration-badge {
    font-size: 16px;
}

.integration-badge.success {
    color: var(--accent-green);
}

/* Danger Zone */
.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-zone .card-header {
    background: rgba(239, 68, 68, 0.05);
}

.text-danger {
    color: var(--accent-red);
}

.danger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.danger-item:last-child {
    border-bottom: none;
}

.danger-item strong {
    font-size: 13px;
}

.danger-item p {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ----------------------------------------
   KEYBOARD SHORTCUTS MODAL
   ---------------------------------------- */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.shortcut-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.shortcut-keys kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 var(--space-xs);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.shortcut-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ----------------------------------------
   SETTINGS RESPONSIVE
   ---------------------------------------- */
@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fab-container {
        bottom: var(--space-lg);
        right: var(--space-lg);
    }
    
    .notifications-panel,
    .profile-dropdown {
        right: var(--space-md);
        width: calc(100vw - 32px);
        max-width: 380px;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------
   ADDITIONAL POLISH
   ---------------------------------------- */

/* Better Badge in Top Bar */
.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smooth section transitions */
.content-section {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Better scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sidebar,
    .top-bar,
    .fab-container,
    .toast-container {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ----------------------------------------
   GLOBAL SEARCH IMPROVEMENT
   ---------------------------------------- */
.search-bar {
    position: relative;
}

.search-bar:focus-within {
    background: var(--bg-tertiary);
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-bar input:focus {
    outline: none;
}

/* Status indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: var(--space-xs);
}

.status-indicator.online {
    background: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.status-indicator.offline {
    background: var(--text-tertiary);
}

/* Better table hover */
.data-table tbody tr {
    transition: background 0.15s ease;
}

/* Card hover effect */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Stat card hover */
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.btn:active::after {
    transform: scale(2);
    transition: transform 0s;
}

/* ----------------------------------------
   LOADING & ERROR STATES
   ---------------------------------------- */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 40px;
    color: var(--accent-green);
    margin-bottom: var(--space-lg);
}

.loading-state p {
    font-size: 14px;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: var(--space-2xl);
}

.error-state i {
    font-size: 48px;
    color: var(--accent-red);
    margin-bottom: var(--space-lg);
}

.error-state h3 {
    font-size: 18px;
    margin-bottom: var(--space-sm);
}

.error-state p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Table Loading Row */
.loading-row td {
    padding: var(--space-xl) !important;
    text-align: center !important;
}

.loading-row .loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: var(--text-secondary);
}

.loading-row i {
    font-size: 20px;
    color: var(--accent-green);
}

/* Empty state for tables with action */
.empty-table-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-xl);
    color: var(--text-tertiary);
}

.empty-table-state i {
    font-size: 40px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-table-state p {
    font-size: 14px;
    margin-bottom: var(--space-lg);
}

/* Small card empty state */
.empty-card-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--text-tertiary);
    text-align: center;
}

.empty-card-state i {
    font-size: 32px;
    margin-bottom: var(--space-sm);
    opacity: 0.4;
}

.empty-card-state p {
    font-size: 12px;
}

/* ----------------------------------------
   MOBILE HEADER
   ---------------------------------------- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    padding: 0 var(--space-md);
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.mobile-logo img {
    width: auto;
    height: 36px;
    object-fit: contain;
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1002;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.mobile-open .logo-image {
        width: 140px;
        height: auto;
    }
    
    .sidebar.mobile-open .nav-item span {
        opacity: 1;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 80px;
    }
    
    .top-bar {
        display: none;
    }
    
    /* Show simplified top bar on mobile */
    .mobile-top-actions {
        display: flex;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
        z-index: 100;
        border-bottom: 1px solid var(--border-color);
    }
    
    .fab-container {
        bottom: var(--space-md);
        right: var(--space-md);
    }
}

/* ============================================
   VEHICLE DETAIL MODAL
============================================ */

.vehicle-detail-modal .modal-content {
    max-width: 600px;
}

.vehicle-detail-header {
    position: relative;
    width: 100%;
    height: 280px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-lg)) var(--space-lg);
    width: calc(100% + var(--space-lg) * 2);
}

.vehicle-detail-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-detail-header .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 64px;
}

.vehicle-detail-header .no-image span {
    font-size: 14px;
    margin-top: var(--space-sm);
}

.vehicle-detail-status {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}

.vehicle-detail-status.available { 
    background: rgba(59, 130, 246, 0.9); 
    color: white; 
}
.vehicle-detail-status.rented { 
    background: rgba(16, 185, 129, 0.9); 
    color: white; 
}
.vehicle-detail-status.maintenance { 
    background: rgba(245, 158, 11, 0.9); 
    color: white; 
}
.vehicle-detail-status.reserved { 
    background: rgba(139, 92, 246, 0.9); 
    color: white; 
}

.vehicle-detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.vehicle-detail-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.vehicle-detail-subtitle span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.vehicle-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.vehicle-detail-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.vehicle-detail-item label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

.vehicle-detail-item .value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.vehicle-detail-item .value.mono {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.vehicle-detail-item .value.highlight {
    color: var(--accent-green);
}

.vehicle-detail-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.vehicle-detail-actions .btn {
    flex: 1;
}
/* ============================================
   DOCUMENTS MODAL STYLES
   Add this CSS to the END of admin/css/dashboard.css
============================================ */

/* Documents Modal Header */
.docs-customer-header {
    background: var(--bg-tertiary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.docs-customer-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.docs-customer-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.docs-customer-id-label {
    font-size: 13px;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* Upload Section */
.docs-upload-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.docs-upload-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.docs-upload-section h4 i {
    color: var(--accent-green);
}

.docs-upload-form {
    display: grid;
    gap: var(--space-md);
}

.doc-upload-dropzone {
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-primary);
}

.doc-upload-dropzone:hover {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.05);
}

.doc-upload-dropzone.has-file {
    border-style: solid;
    border-color: var(--accent-green);
}

.doc-upload-dropzone i {
    font-size: 32px;
    color: var(--text-tertiary);
}

.doc-upload-dropzone span {
    color: var(--text-secondary);
    font-size: 14px;
}

.doc-upload-dropzone .file-types {
    font-size: 12px;
    color: var(--text-tertiary);
}

.doc-upload-dropzone .file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-top: var(--space-sm);
}

/* Documents List */
.docs-list-section {
    min-height: 200px;
}

.docs-section {
    margin-bottom: var(--space-lg);
}

.docs-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.docs-section-title i {
    color: var(--accent-green);
}

.docs-count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    margin-left: auto;
}

.docs-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.doc-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.doc-item:hover {
    border-color: var(--accent-green);
    background: var(--bg-tertiary);
}

.doc-item.system {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.doc-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.doc-actions {
    display: flex;
    gap: var(--space-xs);
}

.docs-loading,
.docs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
    gap: var(--space-sm);
}

.docs-loading i,
.docs-empty i {
    font-size: 32px;
    opacity: 0.5;
}

.docs-empty-hint {
    font-size: 12px;
}

/* Document Viewer Modal */
.modal-viewer {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.viewer-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.viewer-body {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

.viewer-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.viewer-pdf {
    width: 80vw;
    height: 85vh;
    border-radius: var(--radius-lg);
    background: white;
}

.viewer-unsupported {
    background: var(--bg-card);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.viewer-unsupported i {
    font-size: 48px;
    color: var(--text-tertiary);
}

.viewer-unsupported p {
    color: var(--text-secondary);
}

/* Documents button in action row */
.btn-icon.docs {
    color: var(--accent-green);
}

.btn-icon.docs:hover {
    background: rgba(16, 185, 129, 0.15);
}

/* ============================================
   ADD CUSTOMER MODAL - FILE UPLOADS & TOGGLES
   ============================================ */

/* Toggle Group */
.toggle-group {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--border-color);
    border-radius: 13px;
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-label input:checked + .toggle-switch {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(24px);
}

.toggle-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* File Upload Wrapper */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    overflow: hidden;
}

.file-upload-placeholder i {
    font-size: 24px;
    color: var(--text-muted);
}

.file-upload-placeholder span {
    font-size: 12px;
}

.file-upload-wrapper:hover .file-upload-placeholder {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

.file-upload-placeholder.has-image {
    border-style: solid;
    border-color: var(--primary);
}

.file-upload-placeholder.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Form Section Titles */
.form-section {
    margin-bottom: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title i {
    color: var(--primary);
}

/* Corporate requirement asterisk */
.corporate-req {
    color: var(--primary);
}

/* Modal XL size */
.modal-content.modal-xl {
    max-width: 900px;
    max-height: 90vh;
}

.modal-content.modal-xl .modal-body {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

/* Form Grid improvements for Add Customer */
#form-add-customer .form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

#form-add-customer .form-group.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    #form-add-customer .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content.modal-xl {
        max-width: 100%;
        margin: 0.5rem;
    }
}

/* Required asterisk */
.required {
    color: #ef4444;
}

/* ============================================
   IMPROVED INPUT VISIBILITY - DARK & LIGHT MODE
   ============================================ */

/* Dark mode input improvements */
#modal-add-customer .form-group input,
#modal-add-customer .form-group select,
#modal-add-customer .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

#modal-add-customer .form-group input:focus,
#modal-add-customer .form-group select:focus,
#modal-add-customer .form-group textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-green);
}

#modal-add-customer .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Light mode specific overrides */
.light #modal-add-customer .form-group input,
.light #modal-add-customer .form-group select,
.light #modal-add-customer .form-group textarea {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #09090b;
}

.light #modal-add-customer .form-group input:focus,
.light #modal-add-customer .form-group select:focus,
.light #modal-add-customer .form-group textarea:focus {
    background: #ffffff;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.light #modal-add-customer .form-group input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* Modal background fix for light mode */
.light .modal-content {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.light .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.light .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.light .modal-close {
    background: #f4f4f5;
    color: #52525b;
}

.light .modal-close:hover {
    background: #ef4444;
    color: white;
}

/* Toggle switch light mode */
.light .toggle-switch {
    background: #d1d5db;
}

.light .toggle-group {
    background: #f4f4f5;
}

/* File upload light mode */
.light .file-upload-placeholder {
    background: #f9fafb;
    border-color: #d1d5db;
}

.light .file-upload-wrapper:hover .file-upload-placeholder {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--accent-green);
}

/* Section titles light mode */
.light .section-title {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* Readonly input light mode */
.light .form-group input.readonly {
    background: #f4f4f5;
    color: #71717a;
}

/* ============================================
   ONGOING RENTAL CHECKBOX & CALCULATED FIELDS
   ============================================ */

/* Input with checkbox layout */
.input-with-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-with-checkbox input[type="number"] {
    flex: 1;
}

/* Ongoing checkbox styling */
.ongoing-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
    user-select: none;
}

.ongoing-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.ongoing-checkbox:hover {
    color: var(--accent-green);
}

/* Disabled weeks input when ongoing is checked */
#new-rental-weeks:disabled {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.light #new-rental-weeks:disabled {
    background: #f4f4f5;
    color: #a1a1aa;
}

/* Calculated value styling */
.calculated-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.calculated-note {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.calculated-note strong {
    color: var(--accent-green);
    font-weight: 600;
}

/* Light mode calculated value */
.light .calculated-value {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

/* ============================================
   FIX: Modal inside modal-overlay positioning
   The .modal class has position:fixed which breaks
   when it's nested inside .modal-overlay
   ============================================ */
.modal-overlay .modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100%;
    max-width: 500px;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--card-border, #334155);
    border-radius: 16px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) translateY(0) !important;
    pointer-events: auto !important; /* CRITICAL: Allow clicks on modal content */
}

/* ============================================
   STATUS PICKER DROPDOWN
   Quick status change for vehicles
   ============================================ */
.status-picker-dropdown {
    background: var(--bg-card-solid, #27272a);
    border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-xl, 0 16px 48px rgba(0, 0, 0, 0.6));
    min-width: 180px;
    overflow: hidden;
    animation: dropdownSlide 0.2s ease-out;
}

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

.status-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #a1a1aa);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-picker-close {
    background: none;
    border: none;
    color: var(--text-tertiary, #71717a);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.status-picker-close:hover {
    color: var(--text-primary, #fafafa);
    background: var(--bg-tertiary, #27272a);
}

.status-picker-options {
    padding: 8px;
}

.status-picker-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    color: var(--text-primary, #fafafa);
    font-size: 14px;
    text-align: left;
    transition: var(--transition-fast);
}

.status-picker-option:hover {
    background: var(--bg-tertiary, #27272a);
}

.status-picker-option.current {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green, #10b981);
}

.status-picker-option .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-picker-option .status-dot.status-available {
    background: var(--accent-green, #10b981);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-picker-option .status-dot.status-rented {
    background: var(--accent-cyan, #06b6d4);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.status-picker-option .status-dot.status-maintenance {
    background: var(--accent-amber, #f59e0b);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.status-picker-option .status-dot.status-reserved {
    background: var(--accent-purple, #8b5cf6);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.status-picker-option .status-name {
    flex: 1;
}

.status-picker-option i.fa-check {
    color: var(--accent-green, #10b981);
    font-size: 12px;
}

/* Status option hover colors */
.status-picker-option.status-opt-available:hover {
    background: rgba(16, 185, 129, 0.15);
}

.status-picker-option.status-opt-rented:hover {
    background: rgba(6, 182, 212, 0.15);
}

.status-picker-option.status-opt-maintenance:hover {
    background: rgba(245, 158, 11, 0.15);
}

.status-picker-option.status-opt-reserved:hover {
    background: rgba(139, 92, 246, 0.15);
}

/* Light theme support */
.light .status-picker-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.light .status-picker-header {
    border-color: rgba(0, 0, 0, 0.08);
    color: #71717a;
}

.light .status-picker-option {
    color: #18181b;
}

.light .status-picker-option:hover {
    background: #f4f4f5;
}

/* =====================================================
   UPCOMING PAYMENTS - URGENCY STYLES
   ===================================================== */

/* Overdue payments - Red/Urgent */
.upcoming-payment-item.overdue {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #ef4444;
}

.upcoming-payment-item.overdue:hover {
    background: rgba(239, 68, 68, 0.12);
}

.payment-item-due.overdue {
    color: #ef4444 !important;
    font-weight: 600;
}

/* Due Today payments - Orange/Amber */
.upcoming-payment-item.due-today {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
}

.upcoming-payment-item.due-today:hover {
    background: rgba(245, 158, 11, 0.12);
}

.payment-item-due.due-today {
    color: #f59e0b !important;
    font-weight: 600;
}

/* Due Tomorrow payments - Yellow */
.upcoming-payment-item.due-tomorrow {
    background: rgba(234, 179, 8, 0.06);
    border-left: 3px solid #eab308;
}

.upcoming-payment-item.due-tomorrow:hover {
    background: rgba(234, 179, 8, 0.1);
}

.payment-item-due.due-tomorrow {
    color: #eab308 !important;
}

/* Base styling for payment items */
.upcoming-payment-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.upcoming-payment-item:hover {
    background: var(--bg-tertiary);
}

.payment-item-info {
    flex: 1;
    min-width: 0;
}

.payment-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.payment-item-vehicle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.payment-item-due {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.payment-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-item-amount {
    text-align: right;
}

.payment-item-actions {
    display: flex;
    gap: 4px;
}

.btn-icon-small {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background: var(--primary);
    color: white;
}

.btn-icon-small.toll-check {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.btn-icon-small.toll-check:hover {
    background: #f59e0b;
    color: white;
}
