/* ==========================================
   TÙY CHỈNH FONT & BIẾN MÀU (MODERN UI THÊM GRADIENT)
   ========================================== */
   @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

   :root {
       --primary: #6366f1; /* Indigo */
       --primary-light: #818cf8;
       --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); /* Indigo to Purple */
       --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
       --bg-app: #f4f7fb;
       --bg-surface: #ffffff;
       --text-main: #1e293b;
       --text-muted: #64748b;
       --border: #e2e8f0;
       --sidebar-width: 280px;
       --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
       --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
       --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
       --shadow-glow: 0 8px 15px -3px rgba(99, 102, 241, 0.3);
       --radius-md: 12px;
       --radius-lg: 20px;
   }
   
   * { box-sizing: border-box; margin: 0; padding: 0; }
   
   body {
       font-family: 'Inter', sans-serif;
       background-color: var(--bg-app);
       color: var(--text-main);
       overflow: hidden; 
   }
   
   /* Tùy chỉnh thanh cuộn siêu mượt */
   ::-webkit-scrollbar { width: 6px; }
   ::-webkit-scrollbar-track { background: transparent; }
   ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
   ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
   
   .app-container { display: flex; height: 100vh; }
   
   /* ==========================================
      SIDEBAR BÊN TRÁI
      ========================================== */
   .sidebar {
       width: var(--sidebar-width);
       background-color: var(--bg-surface);
       border-right: 1px solid var(--border);
       display: flex;
       flex-direction: column;
       box-shadow: 1px 0 15px rgba(0,0,0,0.03);
       z-index: 20;
   }
   
   .sidebar-brand {
       padding: 28px 24px;
       display: flex;
       align-items: center;
       gap: 14px;
       border-bottom: 1px solid #f1f5f9;
   }
   
   .brand-icon {
       background: var(--primary-gradient);
       color: white;
       width: 42px; height: 42px;
       border-radius: 12px;
       display: flex; align-items: center; justify-content: center;
       font-size: 20px;
       box-shadow: var(--shadow-glow);
       animation: float 3s ease-in-out infinite; /* Icon nhún nhảy siêu nhẹ */
   }
   
   @keyframes float {
       0% { transform: translateY(0px); }
       50% { transform: translateY(-3px); }
       100% { transform: translateY(0px); }
   }
   
   /* Chữ Logo hiển thị màu Gradient */
   .sidebar-brand h2 { 
       font-size: 20px; 
       font-weight: 700; 
       background: var(--primary-gradient);
       background-clip: text;
       -webkit-background-clip: text;
       -webkit-text-fill-color: transparent;
       letter-spacing: -0.5px;
   }
   
   .sidebar-nav { padding: 24px 16px; display: flex; flex-direction: column; gap: 8px; }
   
   .nav-label {
       font-size: 11px; font-weight: 700; color: #94a3b8;
       padding: 10px 12px 4px; letter-spacing: 1px;
       text-transform: uppercase;
   }
   
   .nav-divider { height: 1px; background: #f1f5f9; margin: 12px 0; }
   
   /* HIỆU ỨNG NÚT NAV BÊN TRÁI */
   .nav-btn {
       display: flex; align-items: center; gap: 14px;
       width: 100%; padding: 14px 16px;
       border: none; background: transparent;
       font-size: 15px; font-weight: 500; color: var(--text-muted);
       border-radius: var(--radius-md); cursor: pointer; text-align: left;
       transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
       position: relative;
       overflow: hidden;
   }
   
   .nav-btn i { font-size: 18px; width: 22px; text-align: center; transition: 0.3s; }
   
   .nav-btn:hover:not(.disabled) { 
       background: #f8fafc; 
       color: var(--primary);
       transform: translateX(4px); /* Trượt nhẹ sang phải khi hover */
   }
   
   .nav-btn:hover:not(.disabled) i { transform: scale(1.1); }
   
   .nav-btn.active { 
       background: linear-gradient(to right, rgba(99, 102, 241, 0.1), transparent); 
       color: var(--primary); 
       font-weight: 600; 
   }
   
   /* Vạch màu hiển thị ở tab đang active */
   .nav-btn.active::before {
       content: '';
       position: absolute;
       left: 0; top: 10%;
       height: 80%; width: 4px;
       background: var(--primary-gradient);
       border-radius: 0 4px 4px 0;
   }
   
   .nav-btn.disabled { opacity: 0.4; cursor: not-allowed; }
   
   /* ==========================================
      KHU VỰC NỘI DUNG CHÍNH (MAIN)
      ========================================== */
   .main-wrapper {
       flex: 1; display: flex; flex-direction: column;
       overflow-y: auto;
       scroll-behavior: smooth;
   }
   
   /* Header làm hiệu ứng kính mờ (Glassmorphism) */
   .top-header {
       background: rgba(255, 255, 255, 0.85); 
       backdrop-filter: blur(12px);
       -webkit-backdrop-filter: blur(12px);
       padding: 24px 48px;
       border-bottom: 1px solid rgba(226, 232, 240, 0.8);
       display: flex; justify-content: space-between; align-items: center;
       position: sticky; top: 0; z-index: 10;
   }
   
   .header-title h1 { font-size: 26px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.5px;}
   .header-title p { color: var(--text-muted); font-size: 14px; }
   
   .user-profile { 
       display: flex; align-items: center; gap: 12px; 
       padding: 6px 16px 6px 6px;
       background: var(--bg-surface);
       border: 1px solid var(--border);
       border-radius: 50px;
       cursor: pointer;
       transition: 0.2s;
       box-shadow: var(--shadow-sm);
   }
   .user-profile:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
   
   .avatar {
       width: 36px; height: 36px; 
       background: var(--primary-gradient);
       color: white; border-radius: 50%; display: flex;
       align-items: center; justify-content: center; 
       font-weight: 600; font-size: 16px;
   }
   .user-name { font-weight: 600; font-size: 14px; }
   
   .content-container { padding: 40px 48px; max-width: 1200px; width: 100%; margin: 0 auto;}
   
   /* HIỆU ỨNG CHUYỂN TAB MƯỢT MÀ */
   .tab-content { 
       display: none; 
       opacity: 0;
   }
   .tab-content.active { 
       display: block; 
       animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
   }
   
   @keyframes slideUpFade {
       from { opacity: 0; transform: translateY(20px); }
       to { opacity: 1; transform: translateY(0); }
   }
   
   /* ==========================================
      CARDS & THÀNH PHẦN (GLASS TAY LỞ & BÓNG ĐỔ)
      ========================================== */
   .card {
       background: var(--bg-surface); 
       padding: 36px;
       border-radius: var(--radius-lg); 
       border: 1px solid rgba(226, 232, 240, 0.6);
       box-shadow: var(--shadow-lg);
       transition: transform 0.3s ease, box-shadow 0.3s ease;
   }
   .card:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05); }
   
   .card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
   .card h2 i { color: var(--primary); }
   
   .text-muted { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
   .mt-20 { margin-top: 24px; }
   .mb-20 { margin-bottom: 24px; }
   .form-label { display: block; font-weight: 600; margin-bottom: 10px; font-size: 14px; color: var(--text-main); }
   
   .card-header-flex { display: flex; justify-content: space-between; align-items: flex-start; }
   
   /* ==========================================
      INPUTS VÀ BUTTONS ĐỈNH CAO
      ========================================== */
   .input-group { display: flex; gap: 16px; }
   
   input[type="text"], input[type="number"] {
       flex: 1; padding: 14px 20px; 
       border: 2px solid #e2e8f0;
       border-radius: var(--radius-md); 
       font-size: 15px; outline: none; 
       transition: all 0.3s ease;
       background: #f8fafc;
       font-family: 'Inter', sans-serif;
   }
   
   input:focus { 
       background: #ffffff;
       border-color: var(--primary-light); 
       box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); 
   }
   
   /* Hiệu ứng Nút bấm */
   .btn-primary, .btn-success {
       padding: 14px 28px; border: none; border-radius: var(--radius-md);
       font-size: 15px; font-weight: 600; color: white; cursor: pointer;
       display: flex; align-items: center; gap: 10px; 
       transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
       position: relative; overflow: hidden;
   }
   
   .btn-primary { 
       background: var(--primary-gradient); 
       box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
   }
   
   .btn-success { 
       background: var(--success-gradient); 
       box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
   }
   
   .btn-primary:hover, .btn-success:hover { 
       transform: translateY(-2px); 
       filter: brightness(1.1);
   }
   
   /* Bóng đổ Glow siêu đẹp khi di chuột */
   .btn-primary:hover { box-shadow: var(--shadow-glow); }
   .btn-success:hover { box-shadow: 0 8px 15px -3px rgba(16, 185, 129, 0.3); }
   
   .btn-primary:active, .btn-success:active { transform: translateY(1px); }
   
   /* ==========================================
      KHU VỰC KẾT QUẢ & HIỂN THỊ DỮ LIỆU
      ========================================== */
   .results-area { 
       background: #f8fafc; 
       border: 2px dashed #cbd5e1; 
       border-radius: var(--radius-md); 
       padding: 30px; 
       min-height: 200px;
       transition: 0.3s;
       display: flex; flex-direction: column; justify-content: center;
   }
   
   .results-area:hover { border-color: var(--primary-light); background: #f1f5f9; }
   
   .empty-state { text-align: center; color: var(--text-muted); }
   .empty-state i { 
       font-size: 48px; margin-bottom: 16px; 
       color: #cbd5e1;
       transition: transform 0.3s ease;
   }
   .results-area:hover .empty-state i { transform: scale(1.1) rotate(-5deg); color: #94a3b8; }
   
   /* ==========================================
      LƯỚI (GRID) CHO TAB 3 VÀ QUOTA CARD
      ========================================== */
   .grid-2-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
   
   .quota-card { 
       position: relative; overflow: hidden; 
       background: linear-gradient(to bottom right, #ffffff, #f8fafc);
   }
   
   .quota-icon { 
       background: rgba(99, 102, 241, 0.1);
       color: var(--primary); font-size: 28px; 
       width: 56px; height: 56px; border-radius: 14px;
       display: flex; align-items: center; justify-content: center;
       margin-bottom: 24px;
   }
   
   .quota-stats { display: flex; flex-direction: column; gap: 16px; }
   .stat-item { 
       display: flex; justify-content: space-between; align-items: center; 
       border-bottom: 1px dashed var(--border); padding-bottom: 16px; 
   }
   .stat-item:last-child { border-bottom: none; }
   
   .stat-label { color: var(--text-muted); font-size: 15px; font-weight: 500; }
   .stat-value { font-weight: 600; font-size: 16px; color: var(--text-main); }
   .stat-value.highlight { 
       font-size: 28px; 
       background: var(--primary-gradient);
       background-clip: text;
       -webkit-background-clip: text;
       -webkit-text-fill-color: transparent;
       font-weight: 700;
   }
   .stat-value.highlight small { font-size: 14px; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); font-weight: 500; }
   
   /* Thanh Progress Bar có hiệu ứng chạy mượt */
   .progress-bar-bg { 
       height: 10px; background: #e2e8f0; 
       border-radius: 20px; margin-top: 24px; overflow: hidden; 
   }
   .progress-bar-fill { 
       height: 100%; 
       background: var(--primary-gradient); 
       border-radius: 20px; 
       position: relative;
       overflow: hidden;
   }
   /* Hiệu ứng sọc lấp lánh chạy dọc thanh tiến trình */
   .progress-bar-fill::after {
       content: ""; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
       background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
       animation: shimmer 2s infinite linear;
   }
   @keyframes shimmer {
       0% { transform: translateX(-100%); }
       100% { transform: translateX(100%); }
   }