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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-1: #f59e0b;
  --accent-2: #6366f1;
  --accent-3: #ec4899;
  --accent-4: #10b981;
  --accent-5: #3b82f6;
  --accent-6: #8b5cf6;
  --gradient-1: linear-gradient(135deg, #f59e0b, #f97316);
  --gradient-2: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-3: linear-gradient(135deg, #ec4899, #f43f5e);
  --gradient-4: linear-gradient(135deg, #10b981, #059669);
  --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --sidebar-width: 260px;
  --header-height: 70px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  font-family: 'Inter', 'Tajawal', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body, [dir="rtl"] {
  font-family: 'Tajawal', 'Inter', sans-serif;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(245, 158, 11, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-5); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ══════════════ LOGIN PAGE ══════════════ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(40px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideUp 0.6s ease-out;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ══════════════ FORMS ══════════════ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  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'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

[dir="rtl"] select.form-control {
  background-position: left 12px center;
  padding-right: 16px;
  padding-left: 36px;
}

/* ══════════════ BUTTONS ══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-2);
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.btn-gold {
  background: var(--gradient-1);
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

.btn-success {
  background: var(--gradient-4);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: var(--gradient-3);
  color: white;
}

.btn-ghost {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ══════════════ LAYOUT ══════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  backdrop-filter: blur(40px);
  border-inline-start: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0;
  inset-inline-start: 0;
  z-index: 100;
  transition: var(--transition);
}

[dir="rtl"] .sidebar {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid var(--border-glass);
}

.sidebar-brand h2 {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-brand small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-item:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-2);
  font-weight: 600;
}

.nav-item .icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
}

.nav-spacer { flex: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-glass);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-meta .name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta .role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-inline-start: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
}

[dir="rtl"] .main-content {
  margin-inline-start: 0;
  margin-inline-end: var(--sidebar-width);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ══════════════ CARDS ══════════════ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
}

.glass-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px;
  height: 80px;
  border-radius: 0 0 0 80px;
  opacity: 0.1;
}

.stat-card.gold::before { background: var(--accent-1); }
.stat-card.purple::before { background: var(--accent-2); }
.stat-card.pink::before { background: var(--accent-3); }
.stat-card.green::before { background: var(--accent-4); }

.stat-card .stat-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.stat-card .stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 20px;
}

.stat-change.up { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.stat-change.down { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

/* ══════════════ GRID LAYOUTS ══════════════ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.grid-full { margin-bottom: 24px; }

/* ══════════════ CHARTS ══════════════ */
.chart-container {
  min-height: 350px;
  position: relative;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.chart-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-chip:hover, .filter-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* ══════════════ TABLES ══════════════ */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th, table td {
  padding: 12px 16px;
  text-align: start;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-glass);
}

table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table tbody tr {
  transition: var(--transition);
}

table tbody tr:hover {
  background: var(--bg-glass-hover);
}

/* ══════════════ DATA ENTRY ══════════════ */
.entry-grid {
  display: grid;
  gap: 24px;
}

.entry-slot {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
}

.entry-slot-header {
  padding: 16px 20px;
  background: rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 12px;
}

.entry-slot-header .slot-icon {
  font-size: 1.4rem;
}

.entry-slot-header h3 {
  font-weight: 700;
  font-size: 1.05rem;
}

.entry-table {
  width: 100%;
}

.entry-table th {
  background: rgba(0, 0, 0, 0.2);
}

.entry-table .channel-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.entry-input {
  width: 100%;
  max-width: 120px;
  padding: 8px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  text-align: center;
  transition: var(--transition);
}

.entry-input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
}

.entry-input.filled {
  border-color: var(--accent-4);
  background: rgba(16, 185, 129, 0.05);
}

/* ══════════════ ADMIN SECTIONS ══════════════ */
.admin-section {
  margin-bottom: 32px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-section-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.item-row:hover {
  border-color: var(--border-glass-hover);
}

.item-row .item-name {
  flex: 1;
  font-weight: 500;
}

.item-row .item-actions {
  display: flex;
  gap: 8px;
}

/* ══════════════ DATE PICKER ══════════════ */
.date-picker-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

input[type="date"] {
  padding: 8px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

input[type="date"]:focus {
  border-color: var(--accent-2);
  outline: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}

/* ══════════════ BADGES & TAGS ══════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-main {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-1);
}

.badge-competitor {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-2);
}

.badge-admin {
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-3);
}

.badge-employee {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-4);
}

.badge-viewer {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-5);
}

/* ══════════════ TOAST ══════════════ */
.toast-container {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  min-width: 280px;
  backdrop-filter: blur(20px);
}

.toast.success { border-inline-start: 3px solid var(--accent-4); }
.toast.error { border-inline-start: 3px solid #ef4444; }
.toast.info { border-inline-start: 3px solid var(--accent-5); }

.toast .toast-icon { font-size: 1.2rem; }
.toast .toast-text { flex: 1; font-size: 0.9rem; }

/* ══════════════ MODAL ══════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 24px;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideUp 0.3s ease-out;
}

.modal h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  margin-top: 24px;
}

/* ══════════════ RANKING ══════════════ */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  transition: var(--transition);
}

.ranking-item:hover {
  border-color: var(--border-glass-hover);
}

.ranking-position {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.ranking-position.gold { background: rgba(245, 158, 11, 0.2); color: var(--accent-1); }
.ranking-position.silver { background: rgba(148, 163, 184, 0.2); color: var(--text-secondary); }
.ranking-position.bronze { background: rgba(180, 120, 60, 0.2); color: #b4783c; }

.ranking-info { flex: 1; }
.ranking-info .name { font-weight: 600; font-size: 0.95rem; }
.ranking-info .detail { color: var(--text-muted); font-size: 0.8rem; }

.ranking-value {
  font-size: 1.2rem;
  font-weight: 800;
}

.ranking-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-glass);
  margin-top: 8px;
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease-out;
}

/* ══════════════ EMPTY STATE ══════════════ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 16px;
}

/* ══════════════ LOADING ══════════════ */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-glass);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 26, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
}

/* ══════════════ ANIMATIONS ══════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Stagger animation for cards */
.animate-in { animation: fadeSlideUp 0.4s ease-out forwards; opacity: 0; }
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }

/* ══════════════ TOGGLE SWITCH ══════════════ */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border-glass);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle.active {
  background: var(--accent-4);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: var(--transition);
}

.toggle.active::after {
  right: 23px;
}

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  [dir="rtl"] .sidebar {
    transform: translateX(100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    padding: 20px;
  }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .mobile-menu-btn {
    display: flex !important;
  }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 1.4rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ══════════════ TABS ══════════════ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.9rem;
  border: none;
  background: none;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  background: var(--accent-2);
  color: white;
  font-weight: 600;
}

/* ══════════════ PROGRESS INDICATOR ══════════════ */
.progress-ring {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border-glass);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--gradient-4);
  transition: width 0.8s ease-out;
}

.progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ══════════════ COMPARISON HIGHLIGHT ══════════════ */
.comparison-winner {
  position: relative;
}

.comparison-winner::after {
  content: '🏆';
  position: absolute;
  top: -8px;
  left: -8px;
  font-size: 1.2rem;
}

/* Flex utils */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.fw-700 { font-weight: 700; }
