/* =====================================================
   PERSONALIA - Monitoring Absensi
   Modern Dark Theme CSS
   ===================================================== */

   @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

   :root {
       /* Color Palette */
       --bg-primary: #0f1117;
       --bg-secondary: #1a1d27;
       --bg-card: #1e2130;
       --bg-card-hover: #252839;
       --bg-input: #252839;
       --border-color: #2d3148;
       --border-light: #363b54;
       
       /* Text */
       --text-primary: #e4e6f0;
       --text-secondary: #8b8fa3;
       --text-muted: #5c6078;
       --text-white: #ffffff;
       
       /* Accent Colors */
       --accent-blue: #4f7cff;
       --accent-blue-hover: #6b91ff;
       --accent-blue-glow: rgba(79, 124, 255, 0.15);
       --accent-green: #10b981;
       --accent-green-glow: rgba(16, 185, 129, 0.15);
       --accent-red: #ef4444;
       --accent-red-glow: rgba(239, 68, 68, 0.15);
       --accent-yellow: #f59e0b;
       --accent-yellow-glow: rgba(245, 158, 11, 0.15);
       --accent-purple: #8b5cf6;
       --accent-purple-glow: rgba(139, 92, 246, 0.15);
       --accent-cyan: #06b6d4;
       
       /* Gradients */
       --gradient-blue: linear-gradient(135deg, #4f7cff, #6366f1);
       --gradient-green: linear-gradient(135deg, #10b981, #059669);
       --gradient-red: linear-gradient(135deg, #ef4444, #dc2626);
       --gradient-yellow: linear-gradient(135deg, #f59e0b, #d97706);
       --gradient-purple: linear-gradient(135deg, #8b5cf6, #7c3aed);
       
       /* Sidebar */
       --sidebar-width: 260px;
       --sidebar-collapsed: 70px;
       
       /* Shadows */
       --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
       --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
       --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
       --shadow-glow-blue: 0 0 20px rgba(79, 124, 255, 0.3);
       
       /* Radius */
       --radius-sm: 6px;
       --radius-md: 10px;
       --radius-lg: 14px;
       --radius-xl: 18px;
       
       /* Transitions */
       --transition-fast: 0.15s ease;
       --transition-normal: 0.25s ease;
       --transition-slow: 0.4s ease;
   }
   
   /* =====================================================
      CUSTOM SCROLLBAR
      ===================================================== */
   ::-webkit-scrollbar {
       width: 5px;
       height: 5px;
   }
   ::-webkit-scrollbar-track {
       background: transparent;
   }
   ::-webkit-scrollbar-thumb {
       background: var(--border-light);
       border-radius: 10px;
   }
   ::-webkit-scrollbar-thumb:hover {
       background: var(--text-muted);
   }
   .sidebar-nav::-webkit-scrollbar {
       width: 4px;
   }
   
   /* =====================================================
      RESET & BASE
      ===================================================== */
   *, *::before, *::after {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
   }
   
   html {
       font-size: 14px;
       scroll-behavior: smooth;
   }
   
   body {
       font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
       background-color: var(--bg-primary);
       color: var(--text-primary);
       line-height: 1.6;
       overflow-x: hidden;
       min-height: 100vh;
   }
   
   a {
       text-decoration: none;
       color: var(--accent-blue);
       transition: color var(--transition-fast);
   }
   
   a:hover { color: var(--accent-blue-hover); }
   
   /* =====================================================
      LAYOUT
      ===================================================== */
   .app-wrapper {
       display: flex;
       min-height: 100vh;
   }
   
   /* --- Sidebar --- */
   .sidebar {
       position: fixed;
       left: 0;
       top: 0;
       width: var(--sidebar-width);
       height: 100vh;
       background: var(--bg-secondary);
       border-right: 1px solid var(--border-color);
       z-index: 1000;
       display: flex;
       flex-direction: column;
       transition: width var(--transition-normal);
       overflow: hidden;
   }
   
   @media (min-width: 769px) {
       body.sidebar-collapsed .sidebar {
           width: var(--sidebar-collapsed);
       }
       body.sidebar-collapsed .sidebar:hover {
           width: var(--sidebar-width);
           box-shadow: var(--shadow-lg);
       }
       
       /* When collapsed and NOT hovered */
       body.sidebar-collapsed .sidebar:not(:hover) .brand-text,
       body.sidebar-collapsed .sidebar:not(:hover) .brand-sub,
       body.sidebar-collapsed .sidebar:not(:hover) .dropdown-icon,
       body.sidebar-collapsed .sidebar:not(:hover) .nav-badge,
       body.sidebar-collapsed .sidebar:not(:hover) .user-name,
       body.sidebar-collapsed .sidebar:not(:hover) .user-role {
           opacity: 0;
           pointer-events: none;
       }
   
       body.sidebar-collapsed .sidebar:not(:hover) .nav-submenu {
           display: none !important;
       }
   
       body.sidebar-collapsed .sidebar:not(:hover) .nav-section-title {
           display: none;
       }
   
       body.sidebar-collapsed .sidebar:not(:hover) .nav-section {
           margin-bottom: 8px;
       }
   
       body.sidebar-collapsed .sidebar:not(:hover) .nav-item {
           width: 44px;
           height: 44px;
           padding: 12px;
           margin: 0 auto 4px auto;
           white-space: nowrap;
           overflow: hidden;
           border-radius: var(--radius-sm);
       }
       
       body.sidebar-collapsed .sidebar:not(:hover) .nav-item .nav-icon {
           margin: 0;
           font-size: 18px;
       }
   
       /* Hide sidebar scrollbar when collapsed to avoid ugly scrollbar */
       body.sidebar-collapsed .sidebar:not(:hover) .sidebar-nav {
           overflow-y: hidden;
       }
       
       /* Center icons when collapsed */
       body.sidebar-collapsed .sidebar:not(:hover) .sidebar-brand {
           padding: 20px 16px; /* Adjust padding to center the icon */
       }
       body.sidebar-collapsed .sidebar:not(:hover) .sidebar-footer {
           padding: 16px 10px; /* Center footer */
           overflow: hidden;
       }
       body.sidebar-collapsed .sidebar:not(:hover) .sidebar-user {
           padding: 8px;
           width: 50px;
           overflow: hidden;
       }
       body.sidebar-collapsed .sidebar:not(:hover) .sidebar-user form {
           display: none; /* Hide logout button */
       }
       
       /* Ensure elements fade smoothly */
       .brand-text, .brand-sub, .nav-section-title, .nav-item span:not(.nav-icon), .user-name, .user-role, .dropdown-icon {
           transition: opacity var(--transition-fast);
       }
   }
   
   .sidebar-brand {
       padding: 20px 20px;
       display: flex;
       align-items: center;
       gap: 12px;
       border-bottom: 1px solid var(--border-color);
       min-height: 70px;
   }
   
   .sidebar-brand .brand-icon {
       width: 38px;
       height: 38px;
       background: var(--gradient-blue);
       border-radius: var(--radius-md);
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 18px;
       flex-shrink: 0;
       box-shadow: var(--shadow-glow-blue);
   }
   
   .sidebar-brand .brand-text {
       font-size: 16px;
       font-weight: 700;
       color: var(--text-white);
       white-space: nowrap;
   }
   
   .sidebar-brand .brand-sub {
       font-size: 11px;
       color: var(--text-muted);
       display: block;
       margin-top: 2px;
   }
   
   .sidebar-nav {
       flex: 1;
       padding: 16px 12px;
       overflow-y: auto;
       overflow-x: hidden;
   }
   
   .nav-section {
       margin-bottom: 24px;
   }
   
   .nav-section-title {
       font-size: 10px;
       text-transform: uppercase;
       letter-spacing: 1.5px;
       color: var(--text-muted);
       padding: 0 12px;
       margin-bottom: 8px;
       font-weight: 600;
   }
   
   .nav-item {
       display: flex;
       align-items: center;
       gap: 12px;
       padding: 10px 12px;
       border-radius: var(--radius-sm);
       color: var(--text-secondary);
       transition: all var(--transition-fast);
       margin-bottom: 2px;
       cursor: pointer;
       font-size: 13px;
       font-weight: 500;
   }
   
   .nav-item:hover {
       background: var(--bg-card);
       color: var(--text-primary);
   }
   
   .nav-item.active {
       background: var(--accent-blue-glow);
       color: var(--accent-blue);
       font-weight: 600;
   }
   
   .nav-item .nav-icon {
       width: 20px;
       height: 20px;
       display: flex;
       align-items: center;
       justify-content: center;
       flex-shrink: 0;
       font-size: 16px;
   }
   
   .nav-item .nav-badge {
       margin-left: auto;
       background: var(--accent-blue);
       color: white;
       font-size: 10px;
       padding: 2px 8px;
       border-radius: 10px;
       font-weight: 600;
   }
   
   /* Collapsible Menu */
   .nav-group {
       margin-bottom: 2px;
   }
   .nav-item.has-dropdown {
       cursor: pointer;
   }
   .nav-item .dropdown-icon {
       margin-left: auto;
       font-size: 12px;
       transition: transform var(--transition-fast);
   }
   .nav-group.open .nav-item .dropdown-icon {
       transform: rotate(180deg);
   }
   .nav-submenu {
       max-height: 0;
       overflow: hidden;
       padding-left: 0;
       margin-left: 22px;
       border-left: 1px solid var(--border-light);
       transition: max-height 0.3s ease-in-out, margin 0.3s ease;
   }
   .nav-group.open .nav-submenu {
       max-height: 600px; /* arbitrary large value for transition */
       margin-top: 4px;
       margin-bottom: 8px;
   }
   .nav-submenu .nav-item {
       padding: 10px 12px 10px 16px;
       font-size: 12.5px;
       color: var(--text-muted);
       position: relative;
       border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
       margin-bottom: 2px;
       white-space: normal;
       line-height: 1.4;
   }
   .nav-submenu .nav-item::before {
       content: '';
       position: absolute;
       left: 0;
       top: 50%;
       width: 10px;
       height: 1px;
       background: var(--border-light);
       transition: all var(--transition-fast);
   }
   .nav-submenu .nav-item:hover {
       color: var(--text-primary);
       background: transparent;
   }
   .nav-submenu .nav-item:hover::before {
       background: var(--accent-blue);
       width: 14px;
   }
   .nav-submenu .nav-item.active {
       color: var(--accent-blue);
       background: var(--accent-blue-glow);
       font-weight: 600;
   }
   .nav-submenu .nav-item.active::before {
       background: var(--accent-blue);
       width: 14px;
   }
   .nav-submenu .nav-item .nav-icon {
       display: none; /* Hide the tiny circle icon since the connecting line looks better */
   }
   
   /* Sidebar footer */
   .sidebar-footer {
       padding: 16px;
       border-top: 1px solid var(--border-color);
   }
   
   .sidebar-user {
       display: flex;
       align-items: center;
       gap: 10px;
       padding: 8px;
       border-radius: var(--radius-sm);
   }
   
   .sidebar-user .user-avatar {
       width: 34px;
       height: 34px;
       border-radius: 50%;
       background: var(--gradient-purple);
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 14px;
       font-weight: 600;
       color: white;
       flex-shrink: 0;
   }
   
   .sidebar-user .user-info {
       flex: 1;
       min-width: 0;
   }
   
   .sidebar-user .user-name {
       font-size: 13px;
       font-weight: 600;
       color: var(--text-primary);
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
   }
   
   .sidebar-user .user-role {
       font-size: 11px;
       color: var(--text-muted);
   }
   
   /* --- Main Content --- */
   .main-content {
       margin-left: var(--sidebar-width);
       flex: 1;
       min-height: 100vh;
       display: flex;
       flex-direction: column;
       transition: margin-left var(--transition-normal);
   }
   
   @media (min-width: 769px) {
       body.sidebar-collapsed .main-content {
           margin-left: var(--sidebar-collapsed);
       }
   }
   
   /* --- Top Bar --- */
   .top-bar {
       height: 60px;
       background: var(--bg-secondary);
       border-bottom: 1px solid var(--border-color);
       display: flex;
       align-items: center;
       justify-content: space-between;
       padding: 0 24px;
       position: sticky;
       top: 0;
       z-index: 100;
       backdrop-filter: blur(10px);
   }
   
   .top-bar-left {
       display: flex;
       align-items: center;
       gap: 16px;
   }
   
   .top-bar-left h1 {
       font-size: 18px;
       font-weight: 700;
       color: var(--text-white);
   }
   
   .top-bar-left .breadcrumb {
       display: flex;
       align-items: center;
       gap: 8px;
       font-size: 12px;
       color: var(--text-muted);
   }
   
   .top-bar-right {
       display: flex;
       align-items: center;
       gap: 12px;
   }
   
   .btn-toggle-sidebar {
       display: block;
       background: none;
       border: none;
       color: var(--text-secondary);
       font-size: 20px;
       cursor: pointer;
       padding: 4px;
   }
   
   /* --- Page Content --- */
   .page-content {
       flex: 1;
       padding: 24px;
   }
   
   /* =====================================================
      STAT CARDS
      ===================================================== */
   .stats-grid {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
       gap: 16px;
       margin-bottom: 24px;
   }
   
   .stat-card {
       background: var(--bg-card);
       border: 1px solid var(--border-color);
       border-radius: var(--radius-lg);
       padding: 20px;
       position: relative;
       overflow: hidden;
       transition: all var(--transition-normal);
   }
   
   .stat-card:hover {
       border-color: var(--border-light);
       transform: translateY(-2px);
       box-shadow: var(--shadow-md);
   }
   
   .stat-card::before {
       content: '';
       position: absolute;
       top: 0;
       left: 0;
       right: 0;
       height: 3px;
       border-radius: var(--radius-lg) var(--radius-lg) 0 0;
   }
   
   .stat-card.blue::before { background: var(--gradient-blue); }
   .stat-card.green::before { background: var(--gradient-green); }
   .stat-card.red::before { background: var(--gradient-red); }
   .stat-card.yellow::before { background: var(--gradient-yellow); }
   .stat-card.purple::before { background: var(--gradient-purple); }
   
   .stat-card .stat-header {
       display: flex;
       justify-content: space-between;
       align-items: flex-start;
       margin-bottom: 12px;
   }
   
   .stat-card .stat-icon {
       width: 42px;
       height: 42px;
       border-radius: var(--radius-md);
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 20px;
   }
   
   .stat-card.blue .stat-icon { background: var(--accent-blue-glow); color: var(--accent-blue); }
   .stat-card.green .stat-icon { background: var(--accent-green-glow); color: var(--accent-green); }
   .stat-card.red .stat-icon { background: var(--accent-red-glow); color: var(--accent-red); }
   .stat-card.yellow .stat-icon { background: var(--accent-yellow-glow); color: var(--accent-yellow); }
   .stat-card.purple .stat-icon { background: var(--accent-purple-glow); color: var(--accent-purple); }
   
   .stat-card .stat-value {
       font-size: 28px;
       font-weight: 800;
       color: var(--text-white);
       line-height: 1.2;
   }
   
   .stat-card .stat-label {
       font-size: 12px;
       color: var(--text-secondary);
       margin-top: 4px;
       font-weight: 500;
   }
   
   /* =====================================================
      CARDS & PANELS
      ===================================================== */
   .card {
       background: var(--bg-card);
       border: 1px solid var(--border-color);
       border-radius: var(--radius-lg);
       overflow: hidden;
       margin-bottom: 24px;
   }
   
   .card-header {
       display: flex;
       align-items: center;
       justify-content: space-between;
       padding: 16px 20px;
       border-bottom: 1px solid var(--border-color);
   }
   
   .card-header h2 {
       font-size: 15px;
       font-weight: 600;
       color: var(--text-white);
   }
   
   .card-body {
       padding: 20px;
   }
   
   .card-footer {
       padding: 12px 20px;
       border-top: 1px solid var(--border-color);
       display: flex;
       justify-content: flex-end;
   }
   
   /* =====================================================
      TABLES
      ===================================================== */
   .data-table {
       width: 100%;
       border-collapse: collapse;
   }
   
   .data-table thead th {
       padding: 12px 16px;
       text-align: left;
       font-size: 11px;
       font-weight: 600;
       text-transform: uppercase;
       letter-spacing: 0.5px;
       color: var(--text-muted);
       border-bottom: 1px solid var(--border-color);
       white-space: nowrap;
       background: var(--bg-secondary);
   }
   
   .data-table tbody td {
       padding: 12px 16px;
       font-size: 13px;
       color: var(--text-primary);
       border-bottom: 1px solid var(--border-color);
       vertical-align: middle;
   }
   
   .data-table tbody tr {
       transition: background var(--transition-fast);
   }
   
   .data-table tbody tr:hover {
       background: var(--bg-card-hover);
   }
   
   .data-table tbody tr:last-child td {
       border-bottom: none;
   }
   
   /* =====================================================
      PAGINATION
      ===================================================== */
   .pagination {
       display: flex;
       padding-left: 0;
       list-style: none;
       margin: 0;
       justify-content: flex-end;
   }
   
   .page-item {
       margin: 0 2px;
   }
   
   .page-link {
       position: relative;
       display: block;
       padding: 6px 12px;
       font-size: 13px;
       color: var(--text-secondary);
       text-decoration: none;
       background-color: var(--bg-card);
       border: 1px solid var(--border-color);
       border-radius: var(--radius-sm);
       transition: all var(--transition-fast);
   }
   
   .page-link:hover {
       z-index: 2;
       color: var(--text-primary);
       background-color: var(--bg-card-hover);
       border-color: var(--border-light);
   }
   
   .page-item.active .page-link {
       z-index: 3;
       color: var(--text-white);
       background-color: var(--primary-color);
       border-color: var(--primary-color);
   }
   
   .page-item.disabled .page-link {
       color: var(--text-muted);
       pointer-events: none;
       background-color: transparent;
       border-color: transparent;
   }
   
   /* =====================================================
      BADGES & STATUS
      ===================================================== */
   .badge {
       display: inline-flex;
       align-items: center;
       gap: 4px;
       padding: 4px 10px;
       border-radius: 20px;
       font-size: 11px;
       font-weight: 600;
       white-space: nowrap;
   }
   
   .badge-present, .badge-success { background: var(--accent-green-glow); color: var(--accent-green); }
   .badge-late, .badge-warning { background: var(--accent-yellow-glow); color: var(--accent-yellow); }
   .badge-absent, .badge-danger { background: var(--accent-red-glow); color: var(--accent-red); }
   .badge-leave, .badge-info { background: var(--accent-blue-glow); color: var(--accent-blue); }
   .badge-purple { background: var(--accent-purple-glow); color: var(--accent-purple); }
   .badge-default { background: rgba(100, 100, 120, 0.15); color: var(--text-secondary); }
   
   .badge-dot::before {
       content: '';
       width: 6px;
       height: 6px;
       border-radius: 50%;
       background: currentColor;
   }
   
   .status-online { color: var(--accent-green); }
   .status-offline { color: var(--accent-red); }
   
   /* =====================================================
      BUTTONS
      ===================================================== */
   .btn {
       display: inline-flex;
       align-items: center;
       gap: 6px;
       padding: 8px 16px;
       border-radius: var(--radius-sm);
       font-size: 13px;
       font-weight: 500;
       border: 1px solid transparent;
       cursor: pointer;
       transition: all var(--transition-fast);
       font-family: inherit;
       white-space: nowrap;
   }
   
   .btn:disabled {
       opacity: 0.5;
       cursor: not-allowed;
   }
   
   .btn-primary {
       background: var(--gradient-blue);
       color: white;
       border-color: transparent;
       box-shadow: 0 2px 8px rgba(79, 124, 255, 0.3);
   }
   
   .btn-primary:hover {
       box-shadow: 0 4px 16px rgba(79, 124, 255, 0.4);
       transform: translateY(-1px);
   }
   
   .btn-success {
       background: var(--gradient-green);
       color: white;
   }
   
   .btn-danger {
       background: var(--gradient-red);
       color: white;
   }
   
   .btn-warning {
       background: var(--gradient-yellow);
       color: white;
   }
   
   .btn-secondary {
       background: var(--bg-input);
       color: var(--text-primary);
       border-color: var(--border-color);
   }
   
   .btn-secondary:hover {
       background: var(--bg-card-hover);
       border-color: var(--border-light);
   }
   
   .btn-ghost {
       background: transparent;
       color: var(--text-secondary);
       border-color: transparent;
   }
   
   .btn-ghost:hover {
       color: var(--text-primary);
       background: var(--bg-card);
   }
   
   .btn-sm {
       padding: 5px 12px;
       font-size: 12px;
   }
   
   .btn-lg {
       padding: 12px 24px;
       font-size: 15px;
   }
   
   .btn-icon {
       padding: 8px;
       width: 36px;
       height: 36px;
       justify-content: center;
   }
   
   /* =====================================================
      FORMS
      ===================================================== */
   .form-group {
       margin-bottom: 16px;
   }
   
   .form-label {
       display: block;
       font-size: 12px;
       font-weight: 600;
       color: var(--text-secondary);
       margin-bottom: 6px;
       text-transform: uppercase;
       letter-spacing: 0.5px;
   }
   
   .form-control {
       width: 100%;
       padding: 10px 14px;
       background: var(--bg-input);
       border: 1px solid var(--border-color);
       border-radius: var(--radius-sm);
       color: var(--text-primary);
       font-size: 13px;
       font-family: inherit;
       transition: all var(--transition-fast);
       outline: none;
   }
   
   .form-control:focus {
       border-color: var(--accent-blue);
       box-shadow: 0 0 0 3px var(--accent-blue-glow);
   }
   
   .form-control::placeholder {
       color: var(--text-muted);
   }
   
   select.form-control {
       appearance: none;
       background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8fa3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
       background-repeat: no-repeat;
       background-position: right 12px center;
       padding-right: 32px;
   }
   
   .form-row {
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
       gap: 16px;
   }
   
   .form-inline {
       display: flex;
       gap: 8px;
       align-items: flex-end;
       flex-wrap: wrap;
   }
   
   .form-inline .form-group {
       margin-bottom: 0;
   }
   
   .form-error {
       color: var(--accent-red);
       font-size: 12px;
       margin-top: 4px;
   }
   
   /* =====================================================
      GRID LAYOUTS
      ===================================================== */
   .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
   .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
   .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
   
   .grid-sidebar {
       display: grid;
       grid-template-columns: 1fr 360px;
       gap: 24px;
   }
   
   /* =====================================================
      LIVE FEED
      ===================================================== */
   .live-feed-item {
       display: flex;
       align-items: center;
       gap: 12px;
       padding: 12px;
       border-radius: var(--radius-sm);
       border-bottom: 1px solid var(--border-color);
       transition: background var(--transition-fast);
   }
   
   .live-feed-item:hover {
       background: var(--bg-card-hover);
   }
   
   .live-feed-item:last-child {
       border-bottom: none;
   }
   
   .live-feed-item .feed-avatar {
       width: 36px;
       height: 36px;
       border-radius: 50%;
       background: var(--gradient-blue);
       display: flex;
       align-items: center;
       justify-content: center;
       font-size: 14px;
       font-weight: 600;
       color: white;
       flex-shrink: 0;
   }
   
   .live-feed-item .feed-info {
       flex: 1;
       min-width: 0;
   }
   
   .live-feed-item .feed-name {
       font-size: 13px;
       font-weight: 600;
       color: var(--text-primary);
   }
   
   .live-feed-item .feed-detail {
       font-size: 11px;
       color: var(--text-secondary);
   }
   
   .live-feed-item .feed-time {
       font-size: 12px;
       font-weight: 600;
       color: var(--text-muted);
       white-space: nowrap;
   }
   
   /* =====================================================
      DEVICE STATUS
      ===================================================== */
   .device-status-card {
       display: flex;
       align-items: center;
       gap: 16px;
       padding: 16px;
       background: var(--bg-card);
       border: 1px solid var(--border-color);
       border-radius: var(--radius-md);
       margin-bottom: 12px;
   }
   
   .device-status-dot {
       width: 12px;
       height: 12px;
       border-radius: 50%;
       flex-shrink: 0;
       animation: pulse 2s ease-in-out infinite;
   }
   
   .device-status-dot.online {
       background: var(--accent-green);
       box-shadow: 0 0 8px var(--accent-green);
   }
   
   .device-status-dot.offline {
       background: var(--accent-red);
       box-shadow: 0 0 8px var(--accent-red);
       animation: none;
   }
   
   @keyframes pulse {
       0%, 100% { opacity: 1; }
       50% { opacity: 0.5; }
   }
   
   /* =====================================================
      CHART CONTAINER
      ===================================================== */
   .chart-container {
       position: relative;
       height: 280px;
       padding: 10px;
   }
   
   /* =====================================================
      PAGINATION
      ===================================================== */
   .pagination-wrapper {
       display: flex;
       align-items: center;
       justify-content: space-between;
       padding: 16px 0;
       gap: 16px;
   }
   
   .pagination {
       display: flex;
       gap: 4px;
       list-style: none;
   }
   
   .pagination li a,
   .pagination li span {
       display: flex;
       align-items: center;
       justify-content: center;
       min-width: 34px;
       height: 34px;
       padding: 0 8px;
       border-radius: var(--radius-sm);
       font-size: 13px;
       color: var(--text-secondary);
       background: var(--bg-input);
       border: 1px solid var(--border-color);
       transition: all var(--transition-fast);
   }
   
   .pagination li a:hover {
       background: var(--bg-card-hover);
       color: var(--text-primary);
       border-color: var(--border-light);
   }
   
   .pagination li.active span {
       background: var(--accent-blue);
       color: white;
       border-color: var(--accent-blue);
   }
   
   .pagination li.disabled span {
       opacity: 0.3;
       cursor: not-allowed;
   }
   
   .pagination-info {
       font-size: 12px;
       color: var(--text-muted);
   }
   
   /* =====================================================
      ALERTS & TOASTS
      ===================================================== */
   .alert {
       padding: 12px 16px;
       border-radius: var(--radius-sm);
       margin-bottom: 16px;
       display: flex;
       align-items: center;
       gap: 10px;
       font-size: 13px;
       animation: slideIn 0.3s ease-out;
   }
   
   .alert-success { background: var(--accent-green-glow); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.3); }
   .alert-danger { background: var(--accent-red-glow); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.3); }
   .alert-warning { background: var(--accent-yellow-glow); color: var(--accent-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
   .alert-info { background: var(--accent-blue-glow); color: var(--accent-blue); border: 1px solid rgba(79, 124, 255, 0.3); }
   
   @keyframes slideIn {
       from { opacity: 0; transform: translateY(-10px); }
       to { opacity: 1; transform: translateY(0); }
   }
   
   /* =====================================================
      FILTER BAR
      ===================================================== */
   .filter-bar {
       display: flex;
       gap: 12px;
       align-items: flex-end;
       flex-wrap: wrap;
       padding: 16px 20px;
       background: var(--bg-secondary);
       border-bottom: 1px solid var(--border-color);
       border-radius: var(--radius-lg) var(--radius-lg) 0 0;
   }
   
   .filter-bar .form-group {
       margin-bottom: 0;
       min-width: 150px;
   }
   
   /* =====================================================
      EMPTY STATE
      ===================================================== */
   .empty-state {
       text-align: center;
       padding: 48px 24px;
       color: var(--text-muted);
   }
   
   .empty-state .empty-icon {
       font-size: 48px;
       margin-bottom: 16px;
       opacity: 0.5;
   }
   
   .empty-state .empty-text {
       font-size: 14px;
       margin-bottom: 8px;
       color: var(--text-secondary);
   }
   
   /* =====================================================
      LOADING SPINNER
      ===================================================== */
   .spinner {
       width: 20px;
       height: 20px;
       border: 2px solid var(--border-color);
       border-top-color: var(--accent-blue);
       border-radius: 50%;
       animation: spin 0.8s linear infinite;
   }
   
   @keyframes spin {
       to { transform: rotate(360deg); }
   }
   
   /* =====================================================
      LOGIN PAGE
      ===================================================== */
   .login-wrapper {
       min-height: 100vh;
       display: flex;
       align-items: center;
       justify-content: center;
       background: var(--bg-primary);
       padding: 24px;
   }
   
   .login-card {
       width: 100%;
       max-width: 420px;
       background: var(--bg-card);
       border: 1px solid var(--border-color);
       border-radius: var(--radius-xl);
       padding: 40px;
       box-shadow: var(--shadow-lg);
   }
   
   .login-card .login-brand {
       text-align: center;
       margin-bottom: 32px;
   }
   
   .login-card .login-brand .brand-icon {
       width: 56px;
       height: 56px;
       background: var(--gradient-blue);
       border-radius: var(--radius-lg);
       display: inline-flex;
       align-items: center;
       justify-content: center;
       font-size: 24px;
       margin-bottom: 16px;
       box-shadow: var(--shadow-glow-blue);
   }
   
   .login-card .login-brand h1 {
       font-size: 22px;
       font-weight: 700;
       color: var(--text-white);
       margin-bottom: 4px;
   }
   
   .login-card .login-brand p {
       font-size: 13px;
       color: var(--text-muted);
   }
   
   .login-card .btn-primary {
       width: 100%;
       justify-content: center;
       padding: 12px;
       font-size: 14px;
       font-weight: 600;
   }
   
   /* =====================================================
      UTILITIES
      ===================================================== */
   .text-center { text-align: center; }
   .text-right { text-align: right; }
   .text-muted { color: var(--text-muted); }
   .text-success { color: var(--accent-green); }
   .text-danger { color: var(--accent-red); }
   .text-warning { color: var(--accent-yellow); }
   .text-info { color: var(--accent-blue); }
   .text-sm { font-size: 12px; }
   .text-xs { font-size: 11px; }
   .text-lg { font-size: 16px; }
   .fw-600 { font-weight: 600; }
   .fw-700 { font-weight: 700; }
   .mt-1 { margin-top: 8px; }
   .mt-2 { margin-top: 16px; }
   .mt-3 { margin-top: 24px; }
   .mb-1 { margin-bottom: 8px; }
   .mb-2 { margin-bottom: 16px; }
   .mb-3 { margin-bottom: 24px; }
   .d-flex { display: flex; }
   .gap-2 { gap: 8px; }
   .gap-3 { gap: 16px; }
   .align-center { align-items: center; }
   .justify-between { justify-content: space-between; }
   .w-100 { width: 100%; }
   
   /* =====================================================
      RESPONSIVE
      ===================================================== */
   @media (max-width: 1200px) {
       .grid-sidebar { grid-template-columns: 1fr; }
   }
   
   @media (max-width: 992px) {
       .grid-3 { grid-template-columns: repeat(2, 1fr); }
       .grid-4 { grid-template-columns: repeat(2, 1fr); }
   }
   
   @media (max-width: 768px) {
       .sidebar {
           transform: translateX(-100%);
       }
       .sidebar.open {
           transform: translateX(0);
       }
       .main-content {
           margin-left: 0;
       }
       .btn-toggle-sidebar {
           display: block;
       }
       .stats-grid { grid-template-columns: repeat(2, 1fr); }
       .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
       .filter-bar { flex-direction: column; }
       .filter-bar .form-group { min-width: 100%; }
       .page-content { padding: 16px; }
   }
   
   @media (max-width: 480px) {
       .stats-grid { grid-template-columns: 1fr; }
       .login-card { padding: 24px; }
       .top-bar { padding: 0 16px; }
   }
   
   /* Sidebar overlay for mobile */
   .sidebar-overlay {
       display: none;
       position: fixed;
       inset: 0;
       background: rgba(0, 0, 0, 0.5);
       z-index: 999;
   }
   
   .sidebar-overlay.active {
       display: block;
   }
   
   /* =====================================================
      ADDITIONAL CUSTOM STYLES (Cuti & Lembur)
      ===================================================== */
   select.form-control option {
       background-color: var(--bg-secondary);
       color: var(--text-primary);
       padding: 8px;
   }
   
   .date-row {
       display: grid;
       grid-template-columns: 1fr 1fr auto;
       gap: 16px;
       align-items: flex-end;
   }
   
   @media (max-width: 768px) {
       .date-row {
           grid-template-columns: 1fr;
           gap: 8px;
       }
   }
   
   /* =====================================================
      PREMIUM LIGHT THEME ENGINE (data-theme="light")
      ===================================================== */
   [data-theme="light"] {
       --bg-primary: #f8fafc;
       --bg-secondary: #ffffff;
       --bg-card: #ffffff;
       --bg-card-hover: #f1f5f9;
       --bg-input: #ffffff;
       --border-color: #cbd5e1;
       --border-light: #e2e8f0;
   
       --text-primary: #0f172a;
       --text-secondary: #334155;
       --text-muted: #64748b;
       --text-white: #0f172a;
   
       --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
       --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
       --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
   }
   
   [data-theme="light"] body {
       background-color: #f8fafc !important;
       color: #0f172a !important;
   }
   
   [data-theme="light"] .sidebar {
       background: #ffffff !important;
       border-right: 1px solid #e2e8f0 !important;
       box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03) !important;
   }
   
   [data-theme="light"] .sidebar-brand {
       border-bottom: 1px solid #e2e8f0 !important;
   }
   
   [data-theme="light"] .sidebar-brand .brand-text {
       color: #0f172a !important;
   }
   
   [data-theme="light"] .nav-section-title {
       color: #64748b !important;
   }
   
   [data-theme="light"] .nav-item {
       color: #334155 !important;
   }
   
   [data-theme="light"] .nav-item:hover {
       background: #f1f5f9 !important;
       color: #2563eb !important;
   }
   
   [data-theme="light"] .nav-item.active {
       background: rgba(37, 99, 235, 0.1) !important;
       color: #2563eb !important;
       font-weight: 600 !important;
   }
   
   [data-theme="light"] .nav-submenu {
       background: #f8fafc !important;
       border-left: 2px solid #cbd5e1 !important;
   }
   
   [data-theme="light"] .top-bar {
       background: #ffffff !important;
       border-bottom: 1px solid #e2e8f0 !important;
       box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
   }
   
   [data-theme="light"] .top-bar h1 {
       color: #0f172a !important;
   }
   
   [data-theme="light"] .card,
   [data-theme="light"] .stat-card,
   [data-theme="light"] .chart-card,
   [data-theme="light"] .device-card,
   [data-theme="light"] .table-card {
       background: #ffffff !important;
       border: 1px solid #cbd5e1 !important;
       box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
       color: #0f172a !important;
   }
   
   [data-theme="light"] .stat-value {
       color: #0f172a !important;
   }
   
   [data-theme="light"] .stat-label {
       color: #64748b !important;
   }
   
   /* AI Insight Card & Custom Hardcoded Dark Cards Light Mode Override */
   [data-theme="light"] .ai-insight-card,
   [data-theme="light"] div[style*="background: #1e2130"],
   [data-theme="light"] div[style*="background:#1e2130"],
   [data-theme="light"] div[style*="background: #1a1d27"],
   [data-theme="light"] div[style*="background:#1a1d27"] {
       background: #ffffff !important;
       border: 1px solid #cbd5e1 !important;
       color: #0f172a !important;
       box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
   }
   
   [data-theme="light"] .ai-box,
   [data-theme="light"] div[style*="background: rgba(255, 255, 255, 0.03)"],
   [data-theme="light"] div[style*="background:rgba(255, 255, 255, 0.03)"],
   [data-theme="light"] div[style*="background: rgba(255,255,255,0.03)"] {
       background: #f8fafc !important;
       border: 1px solid #e2e8f0 !important;
   }
   
   [data-theme="light"] .table {
       color: #0f172a !important;
   }
   
   [data-theme="light"] .table th {
       background: #f1f5f9 !important;
       color: #475569 !important;
       border-bottom: 2px solid #e2e8f0 !important;
   }
   
   [data-theme="light"] .table td {
       border-bottom: 1px solid #e2e8f0 !important;
       color: #1e293b !important;
   }
   
   [data-theme="light"] .table tbody tr:hover {
       background: #f8fafc !important;
   }
   
   [data-theme="light"] .form-control,
   [data-theme="light"] select.form-control,
   [data-theme="light"] textarea.form-control {
       background-color: #ffffff !important;
       border: 1px solid #cbd5e1 !important;
       color: #0f172a !important;
   }
   
   [data-theme="light"] select.form-control option {
       background-color: #ffffff !important;
       color: #0f172a !important;
   }
   
   [data-theme="light"] .modal-content {
       background: #ffffff !important;
       border: 1px solid #e2e8f0 !important;
       color: #0f172a !important;
       box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
   }
   
   [data-theme="light"] .text-white {
       color: #0f172a !important;
   }
   
   [data-theme="light"] .text-muted {
       color: #64748b !important;
   }
   
   /* =====================================================
      AI INSIGHT CARD & LIVE FEED COMPONENT STYLES
      ===================================================== */
   
   /* Base (Dark Theme) */
   .ai-insight-card {
       border: 1px solid rgba(99, 102, 241, 0.25) !important;
       background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
       border-radius: 14px !important;
       box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
   }
   
   .ai-insight-header {
       background: rgba(99, 102, 241, 0.1) !important;
       border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
       padding: 14px 20px !important;
       display: flex !important;
       align-items: center !important;
       justify-content: space-between !important;
   }
   
   .ai-badge-icon {
       width: 34px;
       height: 34px;
       border-radius: 10px;
       background: linear-gradient(135deg, #6366f1, #a855f7);
       display: flex;
       align-items: center;
       justify-content: center;
       color: #fff;
       font-size: 18px;
       box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
   }
   
   .ai-title {
       font-size: 15px;
       font-weight: 700;
       margin: 0;
       color: #f8fafc;
       letter-spacing: 0.5px;
       text-transform: uppercase;
   }
   
   .ai-subtitle {
       font-size: 11px;
       color: #94a3b8;
   }
   
   .ai-pill-badge {
       background: rgba(168, 85, 247, 0.2);
       color: #c084fc;
       border: 1px solid rgba(168, 85, 247, 0.4);
       padding: 5px 12px;
       border-radius: 20px;
       font-size: 11px;
       font-weight: 600;
   }
   
   .ai-box {
       background: rgba(255, 255, 255, 0.03);
       border: 1px solid rgba(255, 255, 255, 0.07);
       border-radius: 12px;
       padding: 16px;
   }
   
   .ai-box-header {
       display: flex;
       align-items: center;
       gap: 8px;
       margin-bottom: 10px;
   }
   
   .ai-box-title {
       color: #f1f5f9;
       font-size: 13px;
       font-weight: 600;
   }
   
   .ai-box-text {
       margin: 0 0 8px 0;
       font-size: 13px;
       color: #cbd5e1;
       line-height: 1.5;
   }
   
   .ai-box-sub {
       font-size: 12px;
       color: #94a3b8;
       display: block;
   }
   
   /* Light Theme Overrides */
   [data-theme="light"] .ai-insight-card {
       background: #ffffff !important;
       border: 1px solid #cbd5e1 !important;
       box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08) !important;
   }
   
   [data-theme="light"] .ai-insight-header {
       background: rgba(99, 102, 241, 0.06) !important;
       border-bottom: 1px solid #e0e7ff !important;
   }
   
   [data-theme="light"] .ai-title {
       color: #1e1b4b !important;
   }
   
   [data-theme="light"] .ai-subtitle {
       color: #475569 !important;
   }
   
   [data-theme="light"] .ai-pill-badge {
       background: rgba(168, 85, 247, 0.1) !important;
       color: #7e22ce !important;
       border: 1px solid #e9d5ff !important;
   }
   
   [data-theme="light"] .ai-box {
       background: #f8fafc !important;
       border: 1px solid #e2e8f0 !important;
   }
   
   [data-theme="light"] .ai-box-title {
       color: #0f172a !important;
   }
   
   [data-theme="light"] .ai-box-text {
       color: #334155 !important;
   }
   
   [data-theme="light"] .ai-box-sub {
       color: #64748b !important;
   }
   
   [data-theme="light"] .live-feed-item {
       background: #ffffff !important;
       border: 1px solid #e2e8f0 !important;
       color: #0f172a !important;
   }
   
   [data-theme="light"] .feed-avatar {
       background: #e2e8f0 !important;
       color: #0f172a !important;
   }
   
   [data-theme="light"] .feed-name {
       color: #0f172a !important;
   }
   
   [data-theme="light"] .feed-detail {
       color: #64748b !important;
   }
   
   [data-theme="light"] .feed-time {
       color: #475569 !important;
   }
   
   [data-theme="light"] .device-status-card {
       background: #f8fafc !important;
       border: 1px solid #e2e8f0 !important;
       color: #0f172a !important;
   }
   
   [data-theme="light"] .empty-state {
       color: #64748b !important;
   }
   
   /* AI Insight Balanced Grid Layout */
   .ai-grid-layout {
       display: flex;
       flex-direction: column;
       gap: 16px;
   }
   
   .ai-grid-row-top {
       display: grid;
       grid-template-columns: repeat(2, 1fr);
       gap: 16px;
   }
   
   .ai-grid-row-bottom {
       display: grid;
       grid-template-columns: repeat(3, 1fr);
       gap: 16px;
   }
   
   .ai-box {
       display: flex;
       flex-direction: column;
       height: 100%;
   }
   
   @media (max-width: 992px) {
       .ai-grid-row-top,
       .ai-grid-row-bottom {
           grid-template-columns: 1fr;
       }
   }
   
   
   
   
   