:root {
  --bg-main: #f0f5f9;
  --bg-white: #ffffff;
  --teal-primary: #3db8b6;
  --teal-light: #e6f6f5;
  --text-dark: #2d3748;
  --text-gray: #718096;
  --border-color: #e2e8f0;
  --sidebar-pri-width: 70px;
  --sidebar-sec-width: 240px;
  --sidebar-right-width: 280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito', sans-serif; background: var(--bg-main); color: var(--text-dark); height: 100vh; overflow: hidden; }

.app-container { display: flex; height: 100vh; width: 100vw; }

/* Primary Sidebar */
.sidebar-primary { width: var(--sidebar-pri-width); background: var(--teal-primary); display: flex; flex-direction: column; align-items: center; padding: 20px 0; z-index: 10; }
.sidebar-avatar img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; margin-bottom: 40px; }
.sidebar-icons { display: flex; flex-direction: column; gap: 30px; flex: 1; }
.icon-link { color: rgba(255,255,255,0.7); font-size: 1.2rem; text-decoration: none; transition: 0.2s; }
.icon-link:hover, .icon-link.active { color: #fff; transform: scale(1.1); }
.sidebar-logout { margin-top: auto; }

/* Secondary Sidebar */
.sidebar-secondary { width: var(--sidebar-sec-width); background: var(--bg-white); display: flex; flex-direction: column; border-right: 1px solid var(--border-color); }
.brand { padding: 30px; color: var(--teal-primary); }
.brand h2 { font-weight: 800; font-size: 1.5rem; }
.menu-list { flex: 1; overflow-y: auto; padding: 10px 0; }
.menu-item { display: flex; align-items: center; padding: 15px 30px; color: var(--text-gray); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: 0.2s; border-left: 3px solid transparent; }
.menu-icon { margin-right: 15px; font-size: 1.1rem; }
.menu-item:hover, .menu-item.active { color: var(--teal-primary); border-left-color: var(--teal-primary); background: var(--teal-light); }
.submenu { padding-left: 55px; display: none; flex-direction: column; gap: 10px; margin-top: 5px; }
.menu-group:hover .submenu { display: flex; }
.submenu-item { color: var(--text-gray); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.submenu-item:hover { color: var(--teal-primary); }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.topbar { background: var(--bg-white); padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.search-bar { display: flex; align-items: center; background: var(--bg-main); padding: 10px 20px; border-radius: 8px; width: 400px; }
.search-bar input { border: none; background: transparent; margin-left: 10px; width: 100%; outline: none; font-family: inherit; color: var(--text-dark); font-weight: 600; }
.btn-teal { background: var(--teal-primary); color: #fff; border: none; padding: 12px 24px; border-radius: 8px; font-weight: 700; cursor: pointer; font-family: inherit; transition: 0.2s; }
.btn-teal:hover { background: #2f9492; }

/* Dashboard Views */
.view-container { padding: 30px; display: none; animation: fadeIn 0.3s; }
.view-container.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--bg-white); padding: 25px; border-radius: 12px; display: flex; align-items: center; gap: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.stat-icon { width: 60px; height: 60px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; }
.bg-teal-light { background: var(--teal-light); color: var(--teal-primary); }
.stat-info h3 { font-size: 1.8rem; font-weight: 800; color: var(--text-dark); margin-bottom: 5px; }
.stat-info p { color: var(--text-gray); font-size: 0.9rem; font-weight: 600; }

/* Chart Area */
.chart-section { background: var(--bg-white); padding: 25px; border-radius: 12px; margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.chart-header { margin-bottom: 20px; color: var(--text-dark); }
.bar-chart { display: flex; align-items: flex-end; gap: 20px; height: 200px; padding-top: 20px; border-bottom: 1px solid var(--border-color); }
.bar { width: 20px; background: var(--teal-primary); border-radius: 4px 4px 0 0; }

/* Table Area */
.table-section { background: var(--bg-white); padding: 25px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.table-tabs span { margin-right: 25px; color: var(--text-gray); font-weight: 700; cursor: pointer; padding-bottom: 15px; display: inline-block; }
.table-tabs span.active { color: var(--teal-primary); border-bottom: 3px solid var(--teal-primary); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 15px 10px; text-align: left; border-bottom: 1px solid var(--bg-main); font-size: 0.9rem; }
.data-table th { color: var(--text-gray); font-weight: 700; }
.data-table td { font-weight: 600; color: var(--text-dark); }
.status-badge { padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.status-green { background: #e6f6f5; color: var(--teal-primary); }

/* Right Sidebar */
.sidebar-right { width: var(--sidebar-right-width); background: var(--bg-white); border-left: 1px solid var(--border-color); display: flex; flex-direction: column; overflow-y: auto; padding: 25px; }
.profile-section { display: flex; flex-direction: column; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 20px; }
.profile-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; }
.profile-section h4 { font-size: 1.1rem; font-weight: 800; color: var(--text-dark); }
.profile-section p { color: var(--text-gray); font-size: 0.85rem; font-weight: 600; margin-bottom: 15px; }
.profile-actions { display: flex; gap: 10px; }
.action-btn { width: 35px; height: 35px; border-radius: 50%; border: none; background: var(--bg-main); color: var(--teal-primary); cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.action-btn:hover { background: var(--teal-light); }

.widget-section { margin-bottom: 25px; }
.widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.widget-header h5 { font-size: 0.9rem; font-weight: 700; color: var(--text-gray); }

.ranking-item, .request-item { display: flex; align-items: center; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; }
.rank-icon { width: 35px; height: 35px; border-radius: 8px; display: flex; justify-content: center; align-items: center; margin-right: 15px; }
.bg-orange { background: #fff3e0; color: #ff9800; }
.bg-gray { background: #f1f5f9; color: #94a3b8; }
.rank-info { display: flex; justify-content: space-between; flex: 1; align-items: center; font-size: 0.85rem; font-weight: 700; }
.req-details { display: flex; flex-direction: column; margin-left: 10px; }
.req-details span { font-size: 0.85rem; font-weight: 700; color: var(--text-dark); }
.req-details small { font-size: 0.75rem; color: var(--text-gray); font-weight: 600; }

.calendar-widget { background: var(--bg-main); border-radius: 8px; padding: 15px; }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 0.85rem; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--text-gray); }
.cal-grid span { padding: 5px 0; }
.cal-grid .day { color: var(--text-dark); }
