/* =========================================================
   style.css — Educational Platform for Grade 12 Oman
   RTL Arabic Design System — Refined & Modern
   ========================================================= */

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

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-card:       #1c2230;
  --bg-hover:      #242d3d;
  --accent:        #3b82f6;
  --accent-light:  #60a5fa;
  --accent-glow:   rgba(59,130,246,0.2);
  --gold:          #f59e0b;
  --gold-light:    #fcd34d;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --text-primary:  #e6edf3;
  --text-secondary:#8b949e;
  --text-muted:    #6e7681;
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(59,130,246,0.4);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 30px rgba(59,130,246,0.15);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --font-main:     'Cairo', sans-serif;
  --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode */
body.light-mode {
  --bg-primary:    #f0f4f8;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-hover:      #f8fafc;
  --text-primary:  #1e293b;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --border:        rgba(0,0,0,0.08);
  --border-hover:  rgba(59,130,246,0.5);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.12);
  --shadow-glow:   0 0 30px rgba(59,130,246,0.1);
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-main); cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: var(--font-main); }
img { max-width: 100%; }

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ─── Background Pattern ────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(59,130,246,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(245,158,11,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Navbar ────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition);
}

body.light-mode .navbar {
  background: rgba(255,255,255,0.85);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.navbar-brand .brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.navbar-nav a {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 50%; left: 50%;
  transform: translateX(50%);
  width: 20px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  right: calc(50% - 10px);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Theme Toggle ──────────────────────────────────────── */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ─── Page Layout ───────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding: 3rem 0 5rem;
}

/* ─── Hero Section ──────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  background: var(--accent-glow);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Stats Strip ───────────────────────────────────────── */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-light);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Section Headings ──────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title .icon {
  width: 32px; height: 32px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 20px rgba(59,130,246,0.3);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 25px rgba(59,130,246,0.4);
}

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

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}

.btn-danger:hover {
  background: rgba(239,68,68,0.1);
  border-color: var(--danger);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}

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

/* ─── Cards ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  border-radius: 0 var(--radius-lg) 0 100%;
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.card:hover::before { opacity: 1; }

.card-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.badge-summary  { background: rgba(59,130,246,0.15); color: var(--accent-light); }
.badge-tip      { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-method   { background: rgba(245,158,11,0.15); color: var(--gold-light); }
.badge-scientific { background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-literary   { background: rgba(236,72,153,0.15); color: #f472b6; }
.badge-general    { background: rgba(100,116,139,0.15); color: #94a3b8; }

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-footer {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── Star Rating ───────────────────────────────────────── */
.stars {
  display: flex;
  gap: 2px;
  direction: ltr; /* Stars always LTR */
}

.stars span {
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s;
  color: var(--text-muted);
}

.stars span.active { color: var(--gold); }
.stars span:hover  { transform: scale(1.3); color: var(--gold-light); }

/* ─── Search & Filter Bar ───────────────────────────────── */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input-wrap .icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--transition);
  text-align: right;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-select {
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: border-color var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── Page Header ───────────────────────────────────────── */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

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

/* ─── Tip Cards ─────────────────────────────────────────── */
.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.tip-card::after {
  content: '💡';
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 2rem;
  opacity: 0.08;
}

.tip-card:hover {
  border-color: rgba(16,185,129,0.4);
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(16,185,129,0.1);
}

/* ─── Method Cards ──────────────────────────────────────── */
.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.method-number {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: white;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.method-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ─── Login Page ────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo .logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 25px rgba(59,130,246,0.3);
}

.auth-logo h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.auth-logo p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Form Elements ─────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-main);
  transition: border-color var(--transition), box-shadow var(--transition);
  text-align: right;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color var(--transition);
  text-align: right;
}

.form-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── File Upload Zone ──────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-zone .icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.upload-zone p    { font-size: 0.85rem; color: var(--text-secondary); }
.upload-zone small { color: var(--text-muted); font-size: 0.75rem; }

/* ─── Admin Panel ───────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}

.admin-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.admin-nav a.active { color: var(--accent-light); }

.admin-content-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.admin-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Content Table ─────────────────────────────────────── */
.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.content-table th {
  text-align: right;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.content-table th:first-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.content-table th:last-child  { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

.content-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.content-table tr:last-child td { border-bottom: none; }
.content-table tr:hover td { background: var(--bg-hover); }

/* ─── Alerts / Toasts ───────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: min(90vw, 380px);
}

.toast {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.3s ease, fadeOut 0.4s ease 2.8s forwards;
  pointer-events: all;
}

.toast-success { background: rgba(16,185,129,0.9); color: white; }
.toast-error   { background: rgba(239,68,68,0.9);  color: white; }
.toast-info    { background: rgba(59,130,246,0.9);  color: white; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-5px); }
}

/* ─── Loading Spinner ───────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.spinner-lg {
  width: 48px; height: 48px;
  border-width: 3px;
  border-color: var(--border);
  border-top-color: var(--accent);
}

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

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.empty-state p     { font-size: 0.9rem; }

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
}

/* ─── Progress bar for upload ───────────────────────────── */
.upload-progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
  display: none;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s;
  animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ─── Animations ────────────────────────────────────────── */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.stagger > * {
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
}

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
.stagger > *:nth-child(n+7) { animation-delay: 0.35s; }

/* ─── Admin Badge in Navbar ─────────────────────────────── */
.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid rgba(59,130,246,0.25);
  transition: all var(--transition);
}

.admin-link:hover {
  background: rgba(59,130,246,0.25);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }

  .navbar-nav {
    display: none;
    position: absolute;
    top: 64px; right: 0; left: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .navbar-nav.open { display: flex; }
  .nav-toggle { display: flex; }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar { position: static; }

  .filter-bar { flex-direction: column; }

  .stats-strip { gap: 2rem; }

  .hero h1 { font-size: 1.75rem; }

  .cards-grid { grid-template-columns: 1fr; }

  .content-table { display: block; overflow-x: auto; }
}
