/* ═══════════════════════════════════════════════════════════════════════════
   MedborgarskapsProvet — Swedish Citizenship Test Training Platform
   Colors: Swedish Blue #006AA7 · Swedish Yellow #FECC02
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --sw-blue:      #006AA7;
  --sw-blue-dark: #004f7c;
  --sw-blue-light:#e6f2fb;
  --sw-yellow:    #FECC02;
  --sw-yellow-dk: #d4a900;
  --text-main:    #1a1a2e;
  --text-muted:   #6c757d;
  --bg-light:     #f4f8fc;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow-sm:    0 2px 8px rgba(0,106,167,.10);
  --shadow-md:    0 6px 24px rgba(0,106,167,.15);
  --shadow-lg:    0 12px 40px rgba(0,106,167,.20);
  --transition:   .22s cubic-bezier(.4,0,.2,1);
}

/* ─── Base ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  color: var(--text-main);
  background: #fff;
  line-height: 1.7;
}

/* ─── Unified Site Navbar ────────────────────────────────────────────────────── */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 12px;
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
}
.nav-logo {
  display: flex; align-items: center;
  gap: 10px; text-decoration: none; flex-shrink: 0;
}
.nav-logo-flag {
  width: 40px; height: 40px; border-radius: 8px;
  overflow: hidden; position: relative; flex-shrink: 0;
}
.nav-logo-flag .f-bg { position: absolute; inset: 0; background: #006AA7; }
.nav-logo-flag .f-h  { position: absolute; left: 0; right: 0; top: 50%; height: 30%; transform: translateY(-50%); background: #FECC02; }
.nav-logo-flag .f-v  { position: absolute; top: 0; bottom: 0; left: 40%; width: 20%; background: #FECC02; }
.nav-logo-texts .nt  { font-size: .95rem; font-weight: 800; color: #0d1b3e; line-height: 1.1; }
.nav-logo-texts .ns  { font-size: .68rem; color: #64748b; font-weight: 500; }
.nav-links {
  display: flex; align-items: center;
  gap: 2px; list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: #374151; text-decoration: none;
  font-size: .85rem; font-weight: 600;
  padding: 6px 11px; border-radius: 6px;
  transition: all .18s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: #1a52cc; background: #eff6ff; }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Lang switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 1.5px solid #e2e8f0;
  border-radius: 8px; padding: 6px 11px;
  font-size: .82rem; font-weight: 600;
  color: #374151; cursor: pointer; transition: all .18s;
  white-space: nowrap; font-family: inherit;
}
.lang-btn:hover { border-color: #1a52cc; color: #1a52cc; }
.lang-dropdown {
  display: none; position: absolute;
  top: calc(100% + 6px); right: 0;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.12);
  min-width: 145px; padding: 6px; z-index: 300;
}
[dir="ltr"] .lang-dropdown { right: auto; left: 0; }
.lang-dropdown.open { display: block; }
.lang-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 7px; cursor: pointer;
  font-size: .86rem; font-weight: 500; color: #0d1b3e; transition: background .15s;
}
.lang-opt:hover { background: #eff6ff; }
.lang-opt.active { background: #eff6ff; color: #1a52cc; font-weight: 700; }

/* Nav buttons */
.btn-login {
  background: none; border: 1.5px solid #e2e8f0;
  border-radius: 8px; padding: 7px 16px;
  font-size: .85rem; font-weight: 600;
  color: #0d1b3e; text-decoration: none;
  transition: all .18s; white-space: nowrap;
}
.btn-login:hover { border-color: #1a52cc; color: #1a52cc; }
.btn-signup {
  background: #1a52cc; color: #fff;
  border: none; border-radius: 8px;
  padding: 8px 20px; font-size: .85rem;
  font-weight: 700; text-decoration: none;
  transition: all .18s; white-space: nowrap;
  font-family: inherit; cursor: pointer;
}
.btn-signup:hover { background: #0f3499; color: #fff; }
.nav-toggle {
  display: none; background: none; border: 1.5px solid #e2e8f0;
  border-radius: 8px; padding: 7px 10px;
  cursor: pointer; color: #0d1b3e; font-size: 1.1rem; align-items: center;
}

/* Account dropdown */
.account-toggle {
  color: #374151; text-decoration: none;
  font-size: .85rem; font-weight: 600;
  padding: 6px 11px; border-radius: 6px;
  transition: all .18s; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.account-toggle:hover { color: #1a52cc; background: #eff6ff; }
.account-dd {
  display: none; position: absolute;
  top: calc(100% + 6px); right: 0;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.12);
  min-width: 190px; padding: 6px; z-index: 300;
}
[dir="ltr"] .account-dd { right: auto; left: 0; }
.account-dd.open { display: block; }
.account-dd a {
  display: flex; align-items: center;
  padding: 9px 14px; border-radius: 7px;
  font-size: .88rem; font-weight: 500; color: #0d1b3e;
  text-decoration: none; transition: background .15s;
}
.account-dd a:hover { background: #eff6ff; color: #1a52cc; }
.account-dd hr { margin: 4px 8px; border-color: #e2e8f0; }

/* Mobile nav */
.mobile-nav { display: none; background: #fff; border-top: 1px solid #e2e8f0; padding: 12px 16px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 9px 12px; font-size: .9rem; font-weight: 600; color: #0d1b3e; text-decoration: none; border-radius: 8px; }
.mobile-nav a:hover { background: #eff6ff; color: #1a52cc; }
.mobile-nav-group { padding: 9px 12px; font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.mobile-nav-sub { padding-right: 28px !important; font-size: .88rem !important; font-weight: 500 !important; }
[dir="ltr"] .mobile-nav-sub { padding-left: 28px !important; padding-right: 12px !important; }

@media (max-width: 991px) { .nav-toggle { display: flex; } }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.mbp-btn-blue {
  background: var(--sw-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.mbp-btn-blue:hover { background: var(--sw-blue-dark); color: #fff; transform: translateY(-1px); }

.mbp-btn-yellow {
  background: var(--sw-yellow);
  color: var(--text-main);
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}
.mbp-btn-yellow:hover { background: var(--sw-yellow-dk); color: var(--text-main); transform: translateY(-1px); }

.mbp-btn-outline-blue {
  background: transparent;
  color: var(--sw-blue);
  border: 2px solid var(--sw-blue);
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 600;
  transition: all var(--transition);
}
.mbp-btn-outline-blue:hover { background: var(--sw-blue); color: #fff; }

/* ─── Main ──────────────────────────────────────────────────────────────────── */
.mbp-main { min-height: calc(100vh - 120px); }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.mbp-hero {
  background: linear-gradient(135deg, var(--sw-blue) 0%, #003e65 100%);
  color: #fff;
  padding: 90px 0 80px;
  position: relative;
  overflow: hidden;
}

.mbp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(254,204,2,.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,.06) 0%, transparent 50%);
}

.mbp-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(254,204,2,.2);
  border: 1px solid rgba(254,204,2,.4);
  color: var(--sw-yellow);
  border-radius: 100px;
  padding: 6px 18px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.mbp-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.mbp-hero p.lead {
  font-size: 1.15rem;
  opacity: .9;
  max-width: 540px;
}

.mbp-hero .hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.mbp-hero .hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.mbp-hero .stat-item { text-align: center; }
.mbp-hero .stat-num { font-size: 2rem; font-weight: 800; color: var(--sw-yellow); line-height: 1; }
.mbp-hero .stat-lbl { font-size: .8rem; opacity: .8; margin-top: 4px; }

.mbp-hero .hero-flag {
  font-size: 8rem;
  text-align: center;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ─── Features section ──────────────────────────────────────────────────────── */
.mbp-features { padding: 80px 0; background: var(--bg-light); }

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--sw-blue);
  margin-bottom: 8px;
}

.section-subtitle { color: var(--text-muted); margin-bottom: 48px; }

.feature-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  height: 100%;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--sw-blue-light);
  color: var(--sw-blue);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.feature-card h5 { font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.feature-card p  { color: var(--text-muted); font-size: .93rem; }

/* ─── Cards (generic) ───────────────────────────────────────────────────────── */
.mbp-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,106,167,.08);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.mbp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.mbp-card .card-header-blue {
  background: var(--sw-blue);
  color: #fff;
  padding: 16px 24px;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ─── Section card (dashboard) ──────────────────────────────────────────────── */
.section-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.section-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sw-blue), var(--sw-yellow));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.section-card:hover {
  border-color: var(--sw-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.section-card:hover::after { transform: scaleX(1); }

.section-card .section-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--sw-blue-light);
  color: var(--sw-blue);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.section-card h5 { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.section-card .q-count { font-size: .85rem; color: var(--text-muted); }

/* ─── Auth pages ────────────────────────────────────────────────────────────── */
.mbp-auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--sw-blue-light) 0%, #fff 60%);
  display: flex;
  align-items: center;
  padding: 40px 0;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .auth-logo .flag { font-size: 3rem; }

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sw-blue);
  text-align: center;
  margin-bottom: 4px;
}

.auth-card p.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 28px;
}

.form-label { font-weight: 500; color: var(--text-main); margin-bottom: 4px; }

.form-control, .form-select {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--sw-blue);
  box-shadow: 0 0 0 3px rgba(0,106,167,.12);
}

.flag-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--sw-blue) 0%, var(--sw-blue) 50%, var(--sw-yellow) 50%);
  border-radius: 2px;
  margin-bottom: 28px;
}

/* ─── Training page ─────────────────────────────────────────────────────────── */
.training-header {
  background: var(--sw-blue);
  color: #fff;
  padding: 16px 0;
  position: sticky;
  top: 64px;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}

.training-progress-bar {
  height: 6px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
  overflow: hidden;
}

.training-progress-bar .progress-fill {
  height: 100%;
  background: var(--sw-yellow);
  border-radius: 3px;
  transition: width .4s ease;
}

.question-container {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 16px;
}

.question-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px;
  margin-bottom: 24px;
}

.question-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sw-blue-light);
  color: var(--sw-blue);
  border-radius: 100px;
  padding: 4px 16px;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 28px;
}

/* Answer options */
.answer-option {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  user-select: none;
  position: relative;
}

.answer-option:hover:not(.answered) {
  border-color: var(--sw-blue);
  background: var(--sw-blue-light);
}

.answer-option .opt-letter {
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dee2e6;
  color: #495057;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.answer-option .opt-text { font-size: 1rem; flex: 1; }

/* States after answering */
.answer-option.correct {
  border-color: #198754;
  background: #d1e7dd;
}
.answer-option.correct .opt-letter {
  background: #198754;
  color: #fff;
}

.answer-option.wrong {
  border-color: #dc3545;
  background: #f8d7da;
}
.answer-option.wrong .opt-letter {
  background: #dc3545;
  color: #fff;
}

.answer-option.answered { cursor: not-allowed; }

.answer-feedback {
  display: none;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 16px;
  font-weight: 500;
}
.answer-feedback.show { display: flex; align-items: flex-start; gap: 10px; }
.answer-feedback.correct-fb { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.answer-feedback.wrong-fb   { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }

/* Nav buttons */
.training-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sw-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-nav:hover:not(:disabled) { background: var(--sw-blue-dark); color: #fff; transform: translateY(-1px); }
.btn-nav:disabled { opacity: .45; cursor: not-allowed; }
.btn-nav.btn-nav-prev { background: #6c757d; }
.btn-nav.btn-nav-prev:hover { background: #495057; color: #fff; }

/* ─── Free limit banner ─────────────────────────────────────────────────────── */
.limit-banner {
  background: linear-gradient(135deg, var(--sw-blue), var(--sw-blue-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 600px;
  margin: 60px auto;
  box-shadow: var(--shadow-lg);
}

.limit-banner .banner-icon { font-size: 3rem; margin-bottom: 16px; }
.limit-banner h3 { font-weight: 800; margin-bottom: 12px; }
.limit-banner p  { opacity: .9; margin-bottom: 24px; }

/* ─── Dashboard ─────────────────────────────────────────────────────────────── */
.dashboard-header {
  background: linear-gradient(135deg, var(--sw-blue) 0%, #003e65 100%);
  color: #fff;
  padding: 50px 0 60px;
}

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

.subscription-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: .9rem;
}

.subscription-badge.active {
  background: rgba(25,135,84,.2);
  border: 1px solid rgba(25,135,84,.4);
  color: #75e0a3;
}

.subscription-badge.free {
  background: rgba(254,204,2,.2);
  border: 1px solid rgba(254,204,2,.4);
  color: var(--sw-yellow);
}

.subscription-badge.expired {
  background: rgba(220,53,69,.2);
  border: 1px solid rgba(220,53,69,.4);
  color: #ff8a8a;
}

.free-progress-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

/* ─── Payment page ──────────────────────────────────────────────────────────── */
.payment-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
}

.payment-card .payment-header {
  background: var(--sw-blue);
  color: #fff;
  padding: 32px;
  text-align: center;
}

.payment-card .payment-body { padding: 32px; }

.price-display {
  text-align: center;
  margin: 24px 0;
}
.price-display .price-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--sw-blue);
  line-height: 1;
}
.price-display .price-period { color: var(--text-muted); font-size: .95rem; }

.feature-list { list-style: none; padding: 0; margin: 24px 0; }
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .95rem;
}
.feature-list li .fi { color: #198754; font-size: 1rem; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.mbp-footer {
  background: #0a1628;
  color: rgba(255,255,255,.75);
  padding: 50px 0 24px;
  margin-top: 60px;
}

.footer-brand { color: #fff; font-size: 1.2rem; font-weight: 800; }
.footer-title  { color: rgba(255,255,255,.9); font-weight: 600; margin-bottom: 14px; }

.footer-links { padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,.65); text-decoration: none; transition: color var(--transition); font-size: .9rem; }
.footer-links a:hover { color: var(--sw-yellow); }

.footer-divider { border-color: rgba(255,255,255,.1); margin: 32px 0 20px; }
.mbp-footer .text-muted { color: rgba(255,255,255,.6) !important; }

/* ─── Admin ─────────────────────────────────────────────────────────────────── */
.admin-body { background: #f0f4f8; min-height: 100vh; }

.admin-sidebar {
  width: 260px;
  background: var(--sw-blue);
  min-height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  overflow-y: auto;
}

.admin-sidebar .sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
}

.admin-sidebar .sidebar-logo .flag { font-size: 1.5rem; }

.admin-sidebar .nav-link {
  color: rgba(255,255,255,.8);
  padding: 12px 20px;
  border-radius: 8px;
  margin: 2px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  font-size: .95rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.admin-sidebar .nav-link.active { background: rgba(254,204,2,.2); color: var(--sw-yellow); }

.admin-sidebar .nav-section {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: 16px 20px 6px;
}

.admin-content {
  margin-right: 260px;
  min-height: 100vh;
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.admin-topbar h4 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--sw-blue); }

.admin-main { padding: 28px 24px; }

.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border-right: 4px solid var(--sw-blue);
  transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--sw-blue-light);
  color: var(--sw-blue);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card .stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--text-main); }
.stat-card .stat-lbl { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }

.admin-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-card .admin-card-header {
  background: #fff;
  padding: 18px 24px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card .admin-card-header h5 {
  font-weight: 700;
  color: var(--sw-blue);
  margin: 0;
}

.admin-table { margin: 0; }
.admin-table thead th {
  background: #f8f9fa;
  font-weight: 700;
  color: var(--text-muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid #e9ecef;
  padding: 12px 16px;
}
.admin-table tbody td { padding: 14px 16px; vertical-align: middle; border-bottom: 1px solid #f0f0f0; }
.admin-table tbody tr:hover { background: #f8fbff; }
.admin-table tbody tr:last-child td { border-bottom: none; }

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge-active   { background: #d1e7dd; color: #0f5132; border-radius: 6px; padding: 4px 10px; font-size: .8rem; font-weight: 600; }
.badge-inactive { background: #f8d7da; color: #842029; border-radius: 6px; padding: 4px 10px; font-size: .8rem; font-weight: 600; }
.badge-pending  { background: #fff3cd; color: #664d03; border-radius: 6px; padding: 4px 10px; font-size: .8rem; font-weight: 600; }

/* ─── Google Translate override ─────────────────────────────────────────────── */
#google_translate_element .goog-te-combo {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px;
  color: #fff;
  padding: 4px 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: .85rem;
  cursor: pointer;
}

body > .skiptranslate { display: none !important; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mbp-hero  { padding: 60px 0 50px; }
  .mbp-hero h1 { font-size: 1.7rem; }
  .question-card { padding: 22px 18px; }
  .question-text { font-size: 1.05rem; }
  .auth-card { padding: 28px 20px; }
  .admin-sidebar { display: none; }
  .admin-content { margin-right: 0; }
}

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp .4s ease forwards; }

.animate-delay-1 { animation-delay: .1s; }
.animate-delay-2 { animation-delay: .2s; }
.animate-delay-3 { animation-delay: .3s; }

/* ─── Country flag icons (CSS-based, no emoji dependency) ────────────────────── */
.flag-icon {
  display: inline-block;
  width: 22px; height: 15px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  vertical-align: middle;
  flex-shrink: 0;
}
/* Saudi Arabia — green */
.flag-ar {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 3 2%22%3E%3Crect width=%223%22 height=%222%22 fill=%22%23006c35%22/%3E%3C/svg%3E");
}
/* UK Union Jack */
.flag-en {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 60 30%22%3E%3Crect width=%2260%22 height=%2230%22 fill=%22%23012169%22/%3E%3Cpath d=%22M0,0L60,30M60,0L0,30%22 stroke=%22%23fff%22 stroke-width=%226%22/%3E%3Cpath d=%22M0,0L60,30M60,0L0,30%22 stroke=%22%23C8102E%22 stroke-width=%224%22/%3E%3Crect y=%2211%22 width=%2260%22 height=%228%22 fill=%22%23fff%22/%3E%3Crect x=%2224%22 width=%2212%22 height=%2230%22 fill=%22%23fff%22/%3E%3Crect y=%2212%22 width=%2260%22 height=%226%22 fill=%22%23C8102E%22/%3E%3Crect x=%2226%22 width=%228%22 height=%2230%22 fill=%22%23C8102E%22/%3E%3C/svg%3E");
}
/* Sweden — blue with yellow Nordic cross */
.flag-sv {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 10%22%3E%3Crect width=%2216%22 height=%2210%22 fill=%22%23006AA7%22/%3E%3Crect x=%225%22 y=%220%22 width=%222%22 height=%2210%22 fill=%22%23FECC02%22/%3E%3Crect x=%220%22 y=%224%22 width=%2216%22 height=%222%22 fill=%22%23FECC02%22/%3E%3C/svg%3E");
}
/* Globe placeholder (used before JS sets the flag) */
.flag-globe {
  background: #888;
  border-radius: 50%;
}
