    :root {
      --primary: #1E293B; /* Slate 800 */
      --secondary: #0D9488; /* Premium Teal 600 */
      --accent: #F59E0B; /* Amber */
      --success: #10B981; 
      --danger: #EF4444;
      --bg: #F1F5F9; /* Slate 50 */
      --card-bg: rgba(255,255,255,0.95); 
      --glass-bg: rgba(255,255,255,0.85); 
      --text-dark: #334155; 
      --sidebar-width-collapsed: 78px;
      --sidebar-width-expanded: 260px;
      --header-height: 70px; 
      --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Dark Mode Theme Overrides */
    body.dark { --bg: #0f172a; --card-bg: rgba(30,41,59,0.95); --glass-bg: rgba(30,41,59,0.85); --text-dark: #f8fafc; }
    body.dark .text-dark { color: #f8fafc !important; }
    body.dark .text-muted { color: #94a3b8 !important; }
    body.dark .bg-light { background-color: #1e293b !important; border-color: #334155 !important; }
    body.dark .table-light { background-color: #334155 !important; color: #f8fafc !important; border-color: #475569 !important; }
    body.dark .table-hover tbody tr:hover { background-color: rgba(255,255,255,0.05) !important; color: #fff; }
    body.dark td, body.dark th { border-color: #334155 !important; color: #f8fafc !important; }
    body.dark .modal-content { background-color: #0f172a !important; color: #f8fafc !important; border: 1px solid #334155; }
    body.dark .card { border-color: #334155 !important; }
    body.dark .bg-white { background-color: #1e293b !important; }
    body.dark input, body.dark select, body.dark textarea { background-color: #0f172a !important; color: #fff !important; border-color: #475569 !important; }
    
    * { box-sizing: border-box; }
    body { font-family: 'Inter', sans-serif; background: var(--bg); margin: 0; color: var(--text-dark); transition: background 0.3s, color 0.3s; overflow-x: hidden; }
    
    .glass { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.4); border-radius: 20px; }
    .card-lift { transition: transform 0.2s, box-shadow 0.2s; border-radius: 18px; background: var(--card-bg); border: none; box-shadow: 0 10px 25px -8px rgba(0,0,0,0.06); padding: 1.25rem; }
    .card-lift:hover { transform: translateY(-5px); box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15); }
    
    /* Collapsable Auto-Hover Sidebar */
    .sidebar { 
      width: var(--sidebar-width-collapsed); 
      background: var(--primary); color: white; 
      position: fixed; top: 0; left: 0; height: 100vh; 
      overflow-x: hidden; z-index: 1050; 
      transition: var(--transition); 
      white-space: nowrap; 
      box-shadow: 2px 0 10px rgba(0,0,0,0.1); 
    }
    .sidebar:hover { 
      width: var(--sidebar-width-expanded); 
      box-shadow: 5px 0 25px rgba(0,0,0,0.25); 
    }
    .sidebar .nav-text, .sidebar .brand-text { 
      opacity: 0; transition: opacity 0.2s; display: inline-block; vertical-align: middle; 
    }
    .sidebar:hover .nav-text, .sidebar:hover .brand-text { 
      opacity: 1; transition-delay: 0.1s; 
    }
    
    /* Live Sidebar Tab Animation */
    .sidebar .nav-link { 
      color: rgba(255,255,255,0.75); border-radius: 12px; margin: 6px 12px; padding: 12px 14px; 
      transition: 0.2s; font-weight: 500; display: flex; align-items: center; cursor: pointer; 
      position: relative; overflow: hidden;
    }
    .sidebar .nav-link::after {
      content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; 
      background: var(--accent); transition: width 0.3s ease;
    }
    .sidebar .nav-link:hover::after, .sidebar .nav-link.active::after { width: 100%; }
    .sidebar .nav-link i { font-size: 1.25rem; min-width: 30px; text-align: center; margin-right: 12px; z-index: 1; }
    .sidebar .nav-link:hover, .sidebar .nav-link.active { background: var(--secondary); color: white; transform: translateX(4px); }
    
    .brand-logo { max-height: 38px; max-width: 40px; margin-right: 12px; object-fit: contain; flex-shrink: 0; }
    
    .main-content { margin-left: var(--sidebar-width-collapsed); padding: 24px; min-height: 100vh; transition: margin-left 0.3s; }
    .top-header { background: var(--glass-bg); backdrop-filter: blur(12px); height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-radius: 24px; margin-bottom: 24px; position: sticky; top: 16px; z-index: 100; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
    
    @media (max-width: 992px) { 
      .sidebar { width: var(--sidebar-width-expanded); transform: translateX(-100%); } 
      .sidebar.mobile-open { transform: translateX(0); } 
      .sidebar .nav-text, .sidebar .brand-text { opacity: 1; }
      .main-content { margin-left: 0; } 
    }
    
    .floating-btn { position: fixed; bottom: 24px; right: 24px; z-index: 999; background: var(--secondary); color: white; border-radius: 50px; padding: 12px 24px; box-shadow: 0 10px 20px rgba(13, 148, 136, 0.4); border: none; font-weight: 600; }
    .toast-container { z-index: 9999; }
    .chart-container { position: relative; height: 280px; width: 100%; }
    
    /* Smooth Interactive Animations */
    .fade-in { animation: fadeIn 0.4s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes modalPop { 0% { opacity: 0; transform: scale(0.95) translateY(-10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
    .modal-content { border-radius: 20px; overflow: hidden; animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
    @keyframes rowFadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
    .table-animated tbody tr { animation: rowFadeInUp 0.35s ease-out forwards; opacity: 0; }
    .table-animated tbody tr:nth-child(1) { animation-delay: 0.05s; }
    .table-animated tbody tr:nth-child(2) { animation-delay: 0.08s; }
    .table-animated tbody tr:nth-child(3) { animation-delay: 0.11s; }
    .table-animated tbody tr:nth-child(4) { animation-delay: 0.14s; }
    .table-animated tbody tr:nth-child(5) { animation-delay: 0.17s; }
    .table-animated tbody tr:nth-child(n+6) { animation-delay: 0.20s; }

    /* Animated Login Screen */
    @keyframes gradientBG {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }
    @keyframes floatLogo {
        0% { transform: translateY(0px); }
        50% { transform: translateY(-12px); filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2)); }
        100% { transform: translateY(0px); }
    }
    .animated-logo { animation: floatLogo 3.5s ease-in-out infinite; }
    .login-container { 
        min-height: 100vh; display: flex; align-items: center; justify-content: center; 
        background: linear-gradient(-45deg, #1E293B, #0D9488, #0f172a, #0f766e);
        background-size: 400% 400%;
        animation: gradientBG 15s ease infinite;
        position: relative;
    }
    .login-card { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.2); }

    .hidden { display: none !important; }
    .badge-editable { cursor: pointer; transition: all 0.2s; }
    .badge-editable:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
    .filter-active { background: var(--secondary) !important; color: white !important; border-color: var(--secondary) !important; }
    
    /* Table Sorting Indicators */
    th.sortable { cursor: pointer; user-select: none; position: relative; padding-right: 20px !important; }
    th.sortable i { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); font-size: 0.7rem; color: #94a3b8; }
    th.sortable.asc i.fa-sort-up { color: var(--secondary); }
    th.sortable.desc i.fa-sort-down { color: var(--secondary); }
    
    /* Forms & Scrollbars */
    ::-webkit-scrollbar { width: 8px; height: 8px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
    ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
    
    .compact-form label { font-size: 0.75rem; margin-bottom: 2px; color: #64748b; font-weight: 600; text-transform: uppercase; }
    .compact-form .form-control, .compact-form .form-select { font-size: 0.85rem; padding: 4px 8px; border-radius: 6px; }
    .form-section-head { font-size: 0.85rem; font-weight: 700; color: var(--secondary); border-bottom: 2px solid var(--secondary); padding-bottom: 4px; margin-bottom: 12px; margin-top: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
    .bg-section-1 { background-color: #f8fafc; border-radius: 8px; padding: 12px; }
    .bg-section-2 { background-color: #f0fdfa; border-radius: 8px; padding: 12px; }
    .bg-section-3 { background-color: #fffbeb; border-radius: 8px; padding: 12px; }

    /* Calendar Grid Specifics */
    .cal-cell { height: 110px; vertical-align: top; padding: 6px; position: relative; }
    .cal-day-num { position: absolute; top: 4px; right: 6px; font-weight: 700; font-size: 0.8rem; color: #94a3b8; }
    .cal-entry { background-color: #F59E0B; color: #fff; padding: 3px 6px; border-radius: 4px; font-size: 0.7rem; margin-bottom: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
    .cal-entry:hover { transform: scale(1.02); filter: brightness(1.1); }
    body.dark .cal-day-num { color: #cbd5e1; }
