/* premium.css - Modern Design System */

:root {
    /* Adaptive Color Palette - Default Light */
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.1);
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-app: #f1f5f9; /* Slightly darker light gray for better card standing */
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    --border: rgba(148, 163, 184, 0.2); /* Stronger border for visibility */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    --shadow-premium: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05), 
        0 2px 4px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-app: #0f172a;
        --bg-card: #1e293b;
        --bg-sidebar: #1e293b;
        
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        
        --border: rgba(255, 255, 255, 0.08);
        --glass-bg: rgba(30, 41, 59, 0.7);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.35rem !important; }
    h3 { font-size: 1.2rem !important; }
}

/* Layout Utilities */
.premium-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    padding-bottom: 80px; /* Reliable space for bottom nav */
}

@media (max-width: 768px) {
    .premium-container {
        padding: 1rem;
        padding-bottom: 90px; /* Extra space for mobile nav + safe area */
    }
}

@media (min-width: 1024px) {
    .premium-container {
        padding-left: 280px; /* Space for sidebar */
        padding-bottom: 2rem;
    }
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Components: Cards */
.premium-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem; /* Slightly reduced standard padding for better mobile fit */
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

/* Components: Buttons */
.premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-family: var(--font-main);
}

/* Master-Level UI Components */
.master-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.master-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.spotlight::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(99, 102, 241, 0.03), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.spotlight:hover::after {
    opacity: 1;
}

.premium-btn-primary {
    background: var(--primary);
    color: var(--text-on-primary);
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.premium-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.premium-btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.premium-btn-outline:hover {
    background: var(--primary-glow);
}

/* Components: Inputs */
.premium-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.premium-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Components: Badges */
.premium-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Desktop Sidebar */
.desktop-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    z-index: 2000;
    padding: 2rem 1.5rem;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .desktop-sidebar { display: flex !important; }
}

/* Sidebar Logo & Nav */
.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-link i { font-size: 1.25rem; }

.sidebar-link:hover, .sidebar-link.active {
    background: var(--primary-glow);
    color: var(--primary);
}

/* Mobile Bottom Bar */
.mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 10000 !important; /* Highest priority */
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    pointer-events: auto !important;
}

@media (prefers-color-scheme: dark) {
    .mobile-nav {
        background: var(--bg-card);
        border-top: 1px solid rgba(255,255,255,0.05);
    }
}

@media (min-width: 1024px) {
    .mobile-nav { display: none !important; }
}

.mobile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.7rem;
    font-weight: 700;
    transition: var(--transition);
    min-width: 60px;
    opacity: 0.6;
    user-select: none;
    cursor: pointer;
}

.mobile-link i { 
    font-size: 1.4rem;
    transition: var(--transition);
}

.mobile-link.active {
    color: var(--primary) !important;
    opacity: 1;
}

.mobile-link.active i {
    transform: translateY(-2px);
    color: var(--primary) !important;
}

.mobile-link.active span {
    color: var(--primary) !important;
}

/* Stats Card Special */
.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

@media (max-width: 768px) {
    .stat-value { font-size: 1.65rem !important; }
    .stat-label { font-size: 0.8rem !important; }
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: slideUp 0.3s ease-out forwards;
}

/* --- NEW DASHBOARD THEME (Image Inspired) --- */

.featured-card {
    background: linear-gradient(135deg, #a78bfa, #6366f1);
    color: white;
    position: relative;
    overflow: hidden;
    border: none;
    z-index: 1;
    border-radius: 28px;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
}

.variant-card {
    border-radius: 22px !important;
    background-repeat: no-repeat !important;
    background-position: bottom -20px center !important;
    background-size: 100% 60px !important;
    transition: all 0.3s ease;
}

.variant-blue { 
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%) !important; 
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='100' viewBox='0 0 400 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80 Q 100 20, 200 80 T 400 80' stroke='rgba(59, 130, 246, 0.08)' fill='transparent' stroke-width='6'/%3E%3C/svg%3E") !important;
}
.variant-purple { 
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%) !important; 
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='100' viewBox='0 0 400 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80 Q 100 20, 200 80 T 400 80' stroke='rgba(139, 92, 246, 0.08)' fill='transparent' stroke-width='6'/%3E%3C/svg%3E") !important;
}
.variant-orange { 
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%) !important; 
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='100' viewBox='0 0 400 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80 Q 100 20, 200 80 T 400 80' stroke='rgba(249, 115, 22, 0.08)' fill='transparent' stroke-width='6'/%3E%3C/svg%3E") !important;
}
.variant-red { 
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%) !important; 
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='100' viewBox='0 0 400 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80 Q 100 20, 200 80 T 400 80' stroke='rgba(239, 68, 68, 0.08)' fill='transparent' stroke-width='6'/%3E%3C/svg%3E") !important;
}
.variant-green { 
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%) !important; 
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='100' viewBox='0 0 400 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80 Q 100 20, 200 80 T 400 80' stroke='rgba(34, 197, 94, 0.08)' fill='transparent' stroke-width='6'/%3E%3C/svg%3E") !important;
}
.variant-cyan { 
    background: linear-gradient(135deg, #ecfeff 0%, #ffffff 100%) !important; 
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='100' viewBox='0 0 400 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80 Q 100 20, 200 80 T 400 80' stroke='rgba(6, 182, 212, 0.08)' fill='transparent' stroke-width='6'/%3E%3C/svg%3E") !important;
}

@media (prefers-color-scheme: dark) {
    .variant-blue, .variant-purple, .variant-orange, .variant-red, .variant-green, .variant-cyan {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
        background-image: none !important;
    }
}

.variant-card .icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.variant-blue .icon-box { background: #dbeafe; color: #3b82f6; }
.variant-purple .icon-box { background: #ede9fe; color: #8b5cf6; }
.variant-orange .icon-box { background: #ffedd5; color: #f97316; }
.variant-red .icon-box { background: #fee2e2; color: #ef4444; }
.variant-green .icon-box { background: #dcfce7; color: #22c55e; }
.variant-cyan .icon-box { background: #cffafe; color: #06b6d4; }

.change-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
}

.change-up { background: #dcfce7; color: #166534; }
.change-down { background: #fee2e2; color: #991b1b; }

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: auto;
    height: 50px;
    padding: 0 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
    z-index: 10000;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
}

.fab:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 24px rgba(6, 182, 212, 0.5);
}

.fab i { font-size: 1.25rem; }

/* Refined Bottom Nav Icons */
.mobile-nav i { font-size: 1.5rem; }

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-main);
}

.action-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

/* Insight Cards */
.insight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.insight-item i { font-size: 1.1rem; }
.insight-icon-green { color: #22c55e; }
.insight-icon-orange { color: #f97316; }

/* Sparkline Decoration */
.sparkline-decor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    opacity: 0.2;
    background-image: linear-gradient(to right, transparent, white, transparent);
    background-size: 100% 1px;
    background-position: center;
    pointer-events: none;
}

.notification-bell {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

@media (prefers-color-scheme: dark) {
    .notification-bell {
        background: #1e293b;
        color: white;
    }
}
/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .glass-panel {
        background: rgba(15, 23, 42, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.gradient-text {
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Glass Tints for Cards - More Vibrant */
.glass-tint-purple { background: rgba(139, 92, 246, 0.12) !important; border: 1px solid rgba(139, 92, 246, 0.3) !important; box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.1); }
.glass-tint-rose { background: rgba(244, 63, 94, 0.12) !important; border: 1px solid rgba(244, 63, 94, 0.3) !important; box-shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.1); }
.glass-tint-amber { background: rgba(245, 158, 11, 0.12) !important; border: 1px solid rgba(245, 158, 11, 0.3) !important; box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.1); }
.glass-tint-cyan { background: rgba(6, 182, 212, 0.12) !important; border: 1px solid rgba(6, 182, 212, 0.3) !important; box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.1); }

/* High-Contrast Card Typography */
.text-dark-blue { color: #1e3a8a !important; }
.text-dark-maroon { color: #7c2d12 !important; } /* Maroon/Dark Orange */
.text-dark-violet { color: #4c1d95 !important; }
.text-dark-red { color: #991b1b !important; }
.text-dark-green { color: #065f46 !important; }

.label-bold { 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}
.glass-tint-blue { background: rgba(59, 130, 246, 0.12) !important; border: 1px solid rgba(59, 130, 246, 0.3) !important; box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1); }
.glass-tint-emerald { background: rgba(16, 185, 129, 0.12) !important; border: 1px solid rgba(16, 185, 129, 0.3) !important; box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.1); }

@media (prefers-color-scheme: dark) {
    .glass-tint-purple { background: rgba(139, 92, 246, 0.2) !important; }
    .glass-tint-rose { background: rgba(244, 63, 94, 0.2) !important; }
    .glass-tint-amber { background: rgba(245, 158, 11, 0.2) !important; }
    .glass-tint-blue { background: rgba(59, 130, 246, 0.2) !important; }
    .glass-tint-emerald { background: rgba(16, 185, 129, 0.2) !important; }
}

/* --- REDESIGN EXTENSIONS --- */

.circular-progress {
    position: relative;
    width: 140px;
    height: 140px;
}

.circular-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circular-progress circle {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
}

.circular-progress .bg {
    stroke: rgba(255, 255, 255, 0.2);
}

.circular-progress .progress {
    stroke: white;
    transition: stroke-dashoffset 1s ease-in-out;
}

.circular-progress .percentage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 950;
    color: white;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 800;
}

.bar-container {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--warning);
    border-radius: 3px;
}

.avatar-stack {
    display: flex;
    align-items: center;
}

.avatar-stack img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -8px;
}

.avatar-stack img:first-child { margin-left: 0; }

.donut-container {
    width: 80px;
    height: 80px;
    position: relative;
}

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

.table-premium th {
    text-align: left;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-bottom: 8px;
}

.table-premium td {
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

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

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.card-blue .icon-circle { background: #bae6fd; color: #0284c7; }
.card-purple .icon-circle { background: #ddd6fe; color: #7c3aed; }
.card-rose .icon-circle { background: #fecdd3; color: #e11d48; }
.card-amber .icon-circle { background: #fef3c7; color: #d97706; }
.card-emerald .icon-circle { background: #a7f3d0; color: #059669; }

/* Quick Actions Icon Boxes */
.icon-box-primary { background: #e0f2fe; color: #0ea5e9; }
.icon-box-warning { background: #fef3c7; color: #d97706; }
.icon-box-success { background: #dcfce7; color: #166534; }
.icon-box-purple { background: #f3e8ff; color: #9333ea; }

/* Quick Actions */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 16px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-main);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.action-btn i {
    font-size: 1.75rem;
}

.action-btn span {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

/* Charts & Graphs */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .insights-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.chart-container {
    width: 100%;
    height: 180px;
    position: relative;
    margin-top: 10px;
}

.line-chart-mini {
    height: 40px !important;
    width: 100% !important;
}

/* Bottom Nav Enhancement */
.nav-active-pill {
    position: relative;
}

.nav-active-pill.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Custom Scrollbar for better UX */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

/* High-Density Dashboard Overrides - Mobile Only Viewport Compaction */
@media (max-width: 768px) {
    .premium-container { 
        padding: 0.85rem !important; 
    }
    
    .section-header { 
        margin-bottom: 0.5rem !important; 
        margin-top: 0.75rem !important; 
    }
    
    .section-title { 
        font-size: 0.75rem !important; 
        opacity: 0.5; 
        letter-spacing: 0.05em;
    }
    
    .master-card { 
        padding: 0.85rem !important; 
        border-radius: 18px !important; 
        min-height: auto !important; 
    }
    
    .high-density-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
        margin-bottom: 1rem !important;
    }

    .icon-circle {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.75rem !important;
    }

    .featured-card {
        padding: 1.1rem !important;
        height: 130px !important;
        border-radius: 22px !important;
        margin-bottom: 0.85rem !important;
    }

    .featured-card h2 { font-size: 1.6rem !important; }
    .featured-card p { font-size: 0.65rem !important; }
    .featured-card .icon-chip { display: none; }

    .chart-container {
        height: 140px !important;
        margin-top: 5px !important;
    }
    
    .insights-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 12px !important;
        margin: 0 -0.5rem !important; /* Counteract parent padding for full-bleed look */
        padding: 0 0.5rem 10px 0.5rem !important;
        -webkit-overflow-scrolling: touch;
    }

    .insights-grid > div {
        flex: 0 0 85% !important;
        scroll-snap-align: center !important;
        background: rgba(255,255,255,0.4);
        border-radius: 20px;
        padding: 1rem;
    }

    .insights-grid::-webkit-scrollbar {
        height: 3px;
    }
    
    .industry-ticker, .insight-item i.bi-chevron-right {
        display: none !important; 
    }

    .premium-card {
        padding: 1rem !important;
        border-radius: 20px !important;
    }
}

/* HIGH-DENSITY BOOKING CARDS - REFERENCE MATCHED AESTHETIC */
.booking-item-card {
    background: #fdfcf0; /* Cream background from image */
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 24px;
    padding: 1rem 1.15rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s;
}

.booking-item-card:hover {
    background: #fcfbe8;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.booking-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.status-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Red Payment Badge */
.payment-badge {
    display: flex;
    align-items: center;
    background: #ffdada; /* Light red bg */
    border-radius: 99px;
    overflow: hidden;
    height: 26px;
    border: 1px solid #ffb1b1;
}

.payment-badge i {
    background: #ef4444; /* Darker red part */
    color: white;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.payment-badge span {
    padding: 0 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #991b1b;
    text-transform: lowercase;
}

/* Paid State Override */
.payment-badge.is-paid {
    background: #dcfce7; /* Light green bg */
    border-color: #86efac;
}

.payment-badge.is-paid i {
    background: #10b981; /* Success Green */
}

.payment-badge.is-paid span {
    color: #166534;
}

/* Green Check Icon */
.status-icon-check {
    width: 26px;
    height: 26px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

/* Completed Label */
.card-label-completed {
    font-size: 0.65rem;
    font-weight: 950;
    color: #059669;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Dark Petrol Dropdown */
.done-dropdown-pill {
    background: #236166 !important; /* Petrol color */
    color: white !important;
    border-radius: 12px !important;
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    border: none !important;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    padding-right: 28px !important;
    cursor: pointer;
}

.booking-card-detail {
    font-size: 0.8rem;
    color: var(--text-main);
    font-weight: 600;
}

.booking-card-detail span {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .booking-item-card {
        padding: 0.75rem 0.85rem;
    }
    
    .booking-card-top, .card-service-row {
        flex-direction: row !important; /* Force horizontal as per image */
        align-items: center !important;
    }
}

.booking-card-top, .card-service-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
}

.status-cluster {
    display: flex !important;
    flex-direction: row !important;
    flex-shrink: 0;
    gap: 6px;
}

.card-service-row {
    margin-top: -2px;
}

.booking-card-detail {
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.done-dropdown-pill {
    flex-shrink: 0;
}

/* MICRO-HORIZONTAL BILLING ENTRIES */
.bill-item-entry {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    margin-bottom: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bill-item-info {
    flex: 1.2;
    min-width: 0;
}

.bill-item-name {
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bill-item-type {
    font-size: 0.6rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bill-item-actions {
    display: flex;
    flex: 2;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.bill-input-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 50px;
}

.bill-input-group span {
    font-size: 0.55rem;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.bill-input-group input {
    width: 100%;
    padding: 4px;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    text-align: center;
}

.bill-item-total {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 70px;
    justify-content: flex-end;
}

.bill-item-total span {
    font-weight: 800;
    font-size: 0.75rem;
    color: white;
    white-space: nowrap;
}

.bill-item-total i {
    cursor: pointer;
    font-size: 1rem;
    color: #475569;
    transition: color 0.2s;
}

.bill-item-total i:hover {
    color: #ef4444;
}

/* Tablet/Desktop refinements */
@media (min-width: 768px) {
    .bill-item-entry {
        padding: 0.85rem 1.25rem;
        gap: 20px;
    }
    
    .bill-item-name { font-size: 0.95rem; }
    .bill-input-group { width: 80px; }
    .bill-input-group input { font-size: 0.9rem; padding: 6px; }
    .bill-item-total span { font-size: 1.1rem; }
}
