@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-body: #f8fafc;
    --sidebar-bg: #0f172a;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --bg-card: #ffffff;
    --sidebar-width: 280px;
    
    /* Slate Scale */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    max-width: 100%;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}
/* Sidebar Core */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: var(--sidebar-bg);
    position: fixed;
    left: 0; top: 0;
    z-index: 1200; /* Higher than mobile-header */
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.sidebar-menu-scroll {
    flex: 1; /* Take all available space */
    overflow-y: auto;
    
    padding: 0 20px 20px 20px;
}

.sidebar-menu-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-menu-scroll::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.2); border-radius: 10px; }

.brand-section { padding: 0 12px 40px; display: flex; align-items: center; gap: 12px; }

.nav-item {
    text-decoration: none;
    color: #94a3b8;
    padding: 14px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    white-space: nowrap;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #f8fafc; transform: translateX(4px); }
.nav-item.active { 
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); 
    color: white; 
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    font-weight: 600;
}

.menu-label { color: #475569; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; padding: 25px 18px 12px; margin: 0; }

.main-content { 
    margin-left: var(--sidebar-width); 
    padding: 40px 60px; 
    transition: all 0.3s ease; 
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* Perfil Modernizado */
.sidebar-profile { 
    flex: 0 0 auto;
    padding: 24px; 
    background: #0f172a; /* Totalmente opaco para evitar traslucidez */
    border-top: 1px solid rgba(255,255,255,0.1); 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3); /* Sombra hacia arriba para dar profundidad */
    z-index: 100;
}
.profile-img { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.profile-name { color: #f8fafc !important; font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; white-space: normal; line-height: 1.2; word-break: break-word; }
.profile-role { color: #6366f1 !important; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }

.btn-logout-premium { display: flex; align-items: center; justify-content: center; gap: 8px; color: #ef4444 !important; text-decoration: none; font-size: 0.8rem; font-weight: 700; margin-top: 20px; padding: 12px; border-radius: 12px; border: 1px solid rgba(239, 68, 68, 0.2); transition: all 0.2s; width: 100%; }
.btn-logout-premium:hover { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.5); transform: translateY(-1px); }

/* ============================================
   RESPONSIVE ARCHITECTURE
   ============================================ */

/* Mobile Header (Sticky) */
.mobile-header {
    height: 70px;
    background: #0f172a;
    display: none; /* Default Hidden */
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-toggle {
    background: #1e293b;
    border: 1.5px solid rgba(255,255,255,0.1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .mobile-header { display: flex; }
    
    .sidebar {
        left: -100%;
        width: 300px;
        box-shadow: 20px 0 60px rgba(0,0,0,0.6);
        padding-top: 15px !important;
        overflow: hidden; /* Prevent sidebar itself from scrolling; only .sidebar-menu-scroll scrolls */
        z-index: 9999 !important; /* Force above all interactive elements in body */
    }
    
    .sidebar.active { left: 0; }
    
    .main-content {
        margin-left: 0 !important;
        padding: 20px !important;
        width: 100% !important;
    }

    .brand-section { display: none !important; }
    
    .sidebar-profile {
        padding: 12px 20px !important;
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
    
    .sidebar-profile .mb-3 {
        margin-bottom: 8px !important;
    }
    
    .btn-logout-premium {
        margin-top: 8px !important;
        padding: 10px !important;
    }
    
    .nav-item {
        padding: 10px 16px;
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .menu-label {
        padding: 15px 16px 8px;
    }
}

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9998; /* Below sidebar menu (9999) but above page content */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Common Components */
.card-premium {
    background: white;
    border-radius: 24px;
    padding: 25px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.card-premium:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); }

/* Universal Selects */
/* Universal Selects & Inputs Premium */
select, .form-select, .form-input-premium, .form-control {
    appearance: none !important;
    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='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    background-color: white !important;
    border: 1.5px solid var(--slate-200) !important;
    border-radius: 14px !important;
    padding: 12px 40px 12px 16px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: var(--slate-700) !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    min-height: 48px !important;
    outline: none !important;
}

/* ===== GLOBAL HERO BANNER ===== */
.profile-hero {
    background: linear-gradient(120deg, #0f172a 0%, #1e293b 40%, #0284c7 100%);
    border-radius: 32px;
    padding: 50px 50px 90px 50px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.4);
}
.profile-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14,165,233,0.3) 0%, transparent 70%);
    border-radius: 50%;
}
.profile-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56,189,248,0.2) 0%, transparent 60%);
    border-radius: 50%;
}
.profile-hero h1, .profile-hero h2 {
    color: white;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-hero p {
    color: #bae6fd;
    font-size: 1.05rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
    margin-top: 5px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .profile-hero { 
        padding: 25px 20px 45px 20px !important;
        border-radius: 24px !important;
        margin-top: 0;
    }
    .profile-hero h1, .profile-hero h2 {
        font-size: 1.5rem !important;
    }
    .profile-hero p {
        font-size: 0.9rem !important;
    }
}

/* Remove arrow from non-select inputs */
input.form-input-premium, input.form-control {
    background-image: none !important;
    padding-right: 16px !important;
}

select:hover, .form-input-premium:hover, .form-control:hover { border-color: var(--primary) !important; }
select:focus, .form-input-premium:focus, .form-control:focus { 
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* ============================================
   PREMIUM BUTTONS SYSTEM
   ============================================ */
.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    text-decoration: none;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.btn-premium:active {
    transform: translateY(0);
}

/* Update/Action Button variants */
.btn-update-pro {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-update-pro:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-export-pro {
    background: var(--danger);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-export-pro:hover {
    background: #e11d48;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* White Buttons */
.btn-white {
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s;
}
.btn-white:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.month-picker-side { background: #ffffff; border: 1px solid #eef2ff; }
.filter-trigger { background: #f8fafc; color: #1e293b; }

/* Action Buttons (Table/List) */
.btn-action-pro {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-action-pro:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-action-receipt { background: #eef2ff; color: #6366f1; }
.btn-action-whatsapp { background: #ecfdf5; color: #10b981; }
.btn-action-edit { background: transparent; color: #475569; }
.btn-action-delete { background: #fff1f2; color: #f43f5e; }

/* WhatsApp Button */
.btn-whatsapp {
    background: #10b981 !important;
    color: white !important;
    border: none !important;
}

.btn-whatsapp:hover {
    background: #059669 !important;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3) !important;
}

/* ============================================
   PREMIUM BADGES & LABELS
   ============================================ */
.badge-status {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.badge-status.active { background: #f0fdf4; color: #10b981; border-color: #dcfce7; }
.badge-status.blocked { background: #fef2f2; color: #ef4444; border-color: #fee2e2; }
.badge-status.pending { background: #fffbeb; color: #f59e0b; border-color: #fef3c7; }

.badge-role-pill {
    background: var(--slate-100);
    color: var(--slate-600);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid var(--slate-200);
}

.badge-permission {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.6rem;
    text-transform: uppercase;
}

.badge-tower-pill {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Section Labels */
.stat-label, .stat-label-pro {
    color: var(--slate-400);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.table-section-title {
    background: var(--slate-50);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border: 1px solid var(--slate-100);
}

/* ============================================
   PREMIUM TABLES
   ============================================ */
.table-report { 
    width: 100%; 
    margin-bottom: 0; 
    border-collapse: separate; 
    border-spacing: 0;
}

.table-report th { 
    font-size: 0.65rem; 
    font-weight: 800; 
    color: var(--slate-400); 
    text-transform: uppercase; 
    border-bottom: 2px solid var(--slate-100); 
    padding: 14px 10px; 
    letter-spacing: 0.05em;
}

.table-report td { 
    font-size: 0.75rem; 
    font-weight: 600; 
    color: var(--slate-700); 
    padding: 14px 10px; 
    border-bottom: 1px solid var(--slate-50); 
    vertical-align: middle;
}

.table-report tr:last-child td { border-bottom: none; }

.table-responsive {
    border-radius: 18px;
    overflow-x: auto;
    border: 1px solid var(--slate-100);
}

/* Utilities */
.border-end-md { border-right: 1px solid #f1f5f9; }
@media (max-width: 768px) { .border-end-md { border-right: none !important; border-bottom: 1px solid #f1f5f9; } }

/* ============================================
   KPI CARDS (GLOBAL)
   ============================================ */
.stats-wrapper { margin-top: -50px; position: relative; z-index: 10; padding: 0 10px; }
.kpi-card { background: white; border-radius: 20px; padding: 20px 24px; position: relative; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); border: 1px solid rgba(226, 232, 240, 0.8); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 100%; }
.kpi-card:hover { transform: translateY(-6px); box-shadow: 0 25px 40px -15px rgba(0,0,0,0.1); }
.kpi-icon-box { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; box-shadow: 0 8px 16px -4px rgba(0,0,0,0.1); }
.kpi-details { display: flex; flex-direction: column; align-items: flex-start; z-index: 2; }
.kpi-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #64748b; margin-bottom: 4px; }
.kpi-value { font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 900; line-height: 1; color: #0f172a; display: flex; align-items: baseline; gap: 8px; }

.kpi-indigo .kpi-icon-box { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); color: #4f46e5; border: 1px solid #a5b4fc; }
.kpi-slate .kpi-icon-box { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); color: #475569; border: 1px solid #e2e8f0; }
.kpi-emerald .kpi-icon-box { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); color: #10b981; border: 1px solid #a7f3d0; }
.kpi-rose .kpi-icon-box { background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%); color: #e11d48; border: 1px solid #fecdd3; }
.kpi-red .kpi-icon-box { background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%); color: #ef4444; border: 1px solid #fca5a5; }
.kpi-amber .kpi-icon-box { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); color: #f59e0b; border: 1px solid #fde68a; }
.kpi-teal .kpi-icon-box { background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%); color: #14b8a6; border: 1px solid #99f6e4; }
.kpi-sky .kpi-icon-box { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); color: #0ea5e9; border: 1px solid #7dd3fc; }

.kpi-bg-icon { position: absolute; right: -10px; bottom: -15px; width: 100px; height: 100px; opacity: 0.03; transform: rotate(-10deg); z-index: 0; pointer-events: none; }

@media (max-width: 768px) {
    .stats-wrapper { margin-top: -30px; }
    .stats-wrapper > .row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .stats-wrapper > .row::-webkit-scrollbar { display: none; }
    .stats-wrapper > .row > .col {
        flex: 0 0 85%;
        max-width: 85%;
    }
    .kpi-card { padding: 15px 20px; }
    .kpi-value { font-size: 1.6rem; }
    .kpi-icon-box { width: 44px; height: 44px; }
    .kpi-icon-box svg { width: 20px !important; height: 20px !important; }
}/* --- ADVANCED UI CUSTOMIZATIONS --- */

/* Page Animations */
.anim-fade .main-content {
    animation: fade-in 0.4s ease-out forwards;
}
.anim-zoom .main-content {
    animation: zoom-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.anim-slide .main-content {
    animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes zoom-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Background Textures */
body.bg-texture-dots {
    background-image: radial-gradient(var(--slate-300) 1px, transparent 1px);
    background-size: 24px 24px;
}
body.dark-mode.bg-texture-dots {
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
}

body.bg-texture-mesh {
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(244, 63, 94, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}
body.dark-mode.bg-texture-mesh {
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(244, 63, 94, 0.1) 0px, transparent 50%);
}

/* UI Scale (Applied via JS to HTML root font-size or zoom) */
.ui-scale-small { font-size: 14px; }
.ui-scale-normal { font-size: 16px; }
.ui-scale-large { font-size: 18px; }

/* SweetAlert Premium Global Styling */
.swal2-popup {
    border-radius: 24px !important;
    padding: 2em !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}
.swal2-confirm, .swal2-cancel {
    border-radius: 12px !important;
    font-weight: 800 !important;
    padding: 12px 24px !important;
}
.swal2-title {
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
}

/* Offset modal on mobile to prevent hiding the mobile header */
@media (max-width: 991.98px) {
    .modal, .modal-backdrop {
        top: 70px !important;
        height: calc(100% - 70px) !important;
    }
}

/* =========================================================
   REGLA ESTRICTA: SELECTS Y CALENDARIOS PREMIUM DESIGN
   ========================================================= */
select,
.form-select,
input[type="date"],
input[type="month"],
input[type="datetime-local"],
.flatpickr-input {
    border-radius: 12px !important;
    border: 1.5px solid var(--slate-300, #cbd5e1) !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--slate-800, #1e293b) !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Prevenir doble borde en el contenedor .custom-select-premium */
.custom-select-premium {
    position: relative !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    width: 100% !important;
}

.select-trigger-premium {
    background: #ffffff !important;
    border: 1.5px solid var(--slate-300, #cbd5e1) !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    color: var(--slate-800, #1e293b) !important;
    transition: all 0.25s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 44px !important;
    cursor: pointer !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
}

.select-trigger-premium:hover {
    border-color: var(--primary, #6366f1) !important;
    background-color: var(--slate-50, #f8fafc) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1) !important;
}

.select-options-premium {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.18) !important;
    border: 1px solid #e2e8f0 !important;
    display: none;
    z-index: 99999 !important;
    max-height: 260px !important;
    overflow-y: auto !important;
    padding: 6px !important;
    animation: dropdownSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.select-options-premium.show {
    display: block !important;
}

.option-item-premium {
    padding: 10px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
}

.option-item-premium:hover,
.option-item-premium.active {
    background: #e0e7ff !important;
    color: #4f46e5 !important;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

select,
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%3c6366f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px 12px !important;
    padding-right: 40px !important;
    cursor: pointer !important;
}

input[type="date"],
input[type="month"],
input[type="datetime-local"] {
    cursor: pointer !important;
}

select:hover,
.form-select:hover,
input[type="date"]:hover,
input[type="month"]:hover {
    border-color: var(--slate-400, #94a3b8) !important;
    background-color: var(--slate-50, #f8fafc) !important;
}

select:focus,
.form-select:focus,
input[type="date"]:focus,
input[type="month"]:focus {
    border-color: var(--primary, #6366f1) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    background-color: #ffffff !important;
    outline: none !important;
}

/* Input Group Horizontal Layout Fix */
.input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
}

.input-group .input-group-text {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    border-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    font-weight: 800 !important;
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

.input-group .form-control,
.input-group .form-select {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    flex: 1 1 auto !important;
    width: 1% !important;
}

/* Flatpickr Premium Indigo Theme Override */
.flatpickr-calendar {
    width: 325px !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25) !important;
    border: 1px solid #e2e8f0 !important;
    font-family: 'Inter', sans-serif !important;
    padding: 12px !important;
    background: #ffffff !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
}

.flatpickr-days, 
.dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.flatpickr-months {
    background: #f8fafc !important;
    border-radius: 14px 14px 0 0 !important;
    padding: 8px 0 !important;
}

.flatpickr-current-month {
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 1rem !important;
}

.flatpickr-monthDropdown-months {
    background: #f1f5f9 !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    border: none !important;
    padding: 4px 8px !important;
    outline: none !important;
    appearance: auto !important;
}

.flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
}

.flatpickr-weekdays {
    background: #f8fafc !important;
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
}

span.flatpickr-weekday {
    color: #64748b !important;
    font-weight: 800 !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    flex: 1 !important;
    text-align: center !important;
}

.flatpickr-day {
    border-radius: 10px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
}

.flatpickr-day:hover {
    background: #e0e7ff !important;
    color: #4f46e5 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
}

.flatpickr-day.today {
    border-color: #6366f1 !important;
    color: #6366f1 !important;
    font-weight: 800 !important;
}

/* End of Advanced UI Customizations */
