/* ═══════════════════════════════════════════════════════════════════
   DABY LANGUAGE PLATFORM — style.css  v7  (Holographic Dark ONLY)
   · Dark holographic glassmorphic is the ONLY mode — permanently.
   · Light mode has been completely removed.
   · body.light class does nothing (defined but empty for safety).
   · backdrop-filter with @supports fallback for all browsers.
   · -webkit-backdrop-filter for Safari / iOS.
═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─────────────────────────────────────────────────────────────────
   DARK HOLOGRAPHIC TOKENS — the only theme
───────────────────────────────────────────────────────────────── */
:root {
  --bg:          #080a10;
  --bg2:         #0e1118;
  --bg3:         #151923;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --accent:      #e2a84b;
  --accent-soft: rgba(226,168,75,0.10);
  --accent-glow: rgba(226,168,75,0.30);
  --blue:        #60a5fa;
  --blue-mid:    #3b82f6;
  --blue-soft:   rgba(96,165,250,0.12);
  --blue-glass:  rgba(59,130,246,0.08);
  --blue-border: rgba(96,165,250,0.22);
  --green:       #3ecf8e;
  --green-soft:  rgba(62,207,142,0.10);
  --red:         #f76f6f;
  --red-soft:    rgba(247,111,111,0.10);
  --purple:      #a78bfa;
  --purple-soft: rgba(167,139,250,0.12);
  --text:        #e8eaf2;
  --text-muted:  #7a8099;
  --shadow:      0 20px 60px rgba(0,0,0,0.6);
  --shadow-sm:   0 4px 16px rgba(0,0,0,0.35);
  --shadow-blue: 0 8px 32px rgba(59,130,246,0.18);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  /* Structural / page-level tokens */
  --body-bg:           #070d18;
  --accent-cyan:       rgba(0,200,255,0.70);
  --accent-gold-line:  rgba(226,168,75,0.65);
  --header-bg:         rgba(7,13,24,0.92);
  --header-border:     rgba(0,200,255,0.10);
  --card-bg:           rgba(14,17,28,0.88);
  --card-border:       rgba(0,200,255,0.10);
  --menu-btn-bg:       rgba(12,18,35,0.80);
  --menu-btn-border:   rgba(0,200,255,0.08);
  --adm-btn-bg:        rgba(255,255,255,0.028);
  --adm-btn-border:    rgba(255,255,255,0.08);
  --adm-card-bg:       rgba(7,12,22,0.88);
  --adm-card-border:   rgba(0,200,255,0.10);
  /* Zero English holographic tokens */
  --ze-glass-bg:       rgba(0,20,45,0.55);
  --ze-glass-border:   rgba(0,200,255,0.22);
  --ze-text-bright:    #e0f4ff;
  --ze-text-dim:       rgba(160,210,240,0.7);
  /* Brand gradients */
  --brand-gradient:    linear-gradient(135deg,#e8b04a,#f5d080,#c8922a);
  --ze-brand-gradient: linear-gradient(135deg,#00e5ff 0%,#818cf8 100%);
  font-family: 'Sora', 'Segoe UI', sans-serif;
}

/* ─────────────────────────────────────────────────────────────────
   body.light — intentionally empty; light mode is REMOVED.
   This prevents any residual class from causing issues.
───────────────────────────────────────────────────────────────── */
body.light {
  /* LIGHT MODE DISABLED — intentionally empty */
}

/* ─────────────────────────────────────────────────────────────────
   html[data-theme='light'] — also disabled
───────────────────────────────────────────────────────────────── */
html[data-theme='light'] body {
  /* LIGHT MODE DISABLED — intentionally empty */
}

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

html, body {
  background: var(--body-bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse 85% 55% at 50% -6%,  rgba(0,110,230,0.22)  0%, transparent 58%),
    radial-gradient(ellipse 55% 48% at 0% 75%,   rgba(90,55,210,0.13)  0%, transparent 55%),
    radial-gradient(ellipse 50% 42% at 100% 80%,  rgba(0,190,255,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 60% 105%,  rgba(0,80,180,0.12)  0%, transparent 55%);
}

/* Holographic grid overlay — always on */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,200,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.028) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* Holographic top accent line — cyan → gold */
body::after {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-cyan) 28%,
    var(--accent-gold-line) 62%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(0,200,255,0.25);
  opacity: 0.9;
  pointer-events: none;
}

body > * { position: relative; z-index: 1; }

a { color: var(--accent); }
img { max-width: 100%; }

/* ─────────────────────────────────────────────────────────────────
   GLASS UTILITY
───────────────────────────────────────────────────────────────── */
.glass {
  background: rgba(14,17,24,0.88);
  border: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .glass {
    background: rgba(14,17,24,0.72);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
  }
}

/* ═══════════════════════════════════════════════════════════════
   PLATFORM HEADER
═══════════════════════════════════════════════════════════════ */
.platform-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 1px 0 rgba(0,200,255,0.06);
}
@supports (backdrop-filter: blur(1px)) {
  .platform-header {
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
  }
}

.ph-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; gap: 8px;
  height: 52px;
}
.ph-brand {
  font-size: 15px; font-weight: 700; color: var(--accent);
  letter-spacing: -0.3px; text-decoration: none; margin-right: 6px;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.ph-brand-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse-dot 3s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 8px var(--accent-glow); }
  50%      { box-shadow: 0 0 14px var(--accent-glow), 0 0 24px rgba(200,133,42,0.15); }
}
.ph-sep { width: 1px; height: 22px; background: var(--border2); margin: 0 4px; flex-shrink: 0; }
.ph-nav {
  display: flex; align-items: center; gap: 2px;
  flex: 1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.ph-nav::-webkit-scrollbar { display: none; }
.ph-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; white-space: nowrap;
  transition: all .15s; border: 1px solid transparent;
  cursor: pointer; background: transparent;
  font-family: 'Sora', sans-serif;
}
.ph-pill:hover  { color: var(--text); background: var(--bg3); border-color: var(--border2); }
.ph-pill.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-glow); }
.ph-pill-fr { color: var(--blue); }
.ph-pill-fr:hover, .ph-pill-fr.active { background: var(--blue-soft); border-color: var(--blue-border); color: var(--blue); }
.ph-pill-admin { color: var(--purple); }
.ph-pill-admin:hover { background: var(--purple-soft); border-color: rgba(124,58,237,0.25); color: var(--purple); }
.ph-icon { font-size: 14px; line-height: 1; }
.ph-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.ph-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a06020);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.ph-theme-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.ph-theme-btn:hover { background: var(--bg2); transform: scale(1.08); }

/* Floating theme toggle — decorative, always shows moon (dark mode) */
.theme-toggle { position: fixed; top: 14px; right: 16px; z-index: 999; }
.theme-toggle-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.theme-toggle-btn:hover { background: var(--bg3); transform: scale(1.08); }

/* ═══════════════════════════════════════════════════════════════
   WORLD CLOCK BAR
═══════════════════════════════════════════════════════════════ */
.clock-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 6px 20px;
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.clock-bar::-webkit-scrollbar { display: none; }
.clock-city {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 14px; border-right: 1px solid var(--border2);
  flex-shrink: 0; min-width: 120px;
}
.clock-city:first-child { padding-left: 0; }
.clock-city:last-child  { border-right: none; }
.clock-flag { font-size: 15px; line-height: 1; }
.clock-info { display: flex; flex-direction: column; }
.clock-name {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-muted); line-height: 1.2;
}
.clock-time {
  font-size: 14px; font-weight: 700; color: var(--text);
  font-family: 'JetBrains Mono', monospace; line-height: 1.2;
}
.clock-time.accent { color: var(--accent); }
.clock-date { font-size: 9px; color: var(--text-muted); line-height: 1.2; margin-top: 1px; }

/* ═══════════════════════════════════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════════════════════════════════ */
.page-center {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center; padding: 32px 16px;
}
.container { width: 100%; max-width: 440px; }
.page-admin { min-height: 100vh; }
.page-content { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.page-header { margin-bottom: 22px; }
.page-header h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 4px; }
.page-header p  { font-size: 13px; color: var(--text-muted); }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 50px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 1px 0 rgba(0,200,255,0.06);
  position: sticky; top: 0; z-index: 300;
  gap: 12px;
}
@supports (backdrop-filter: blur(1px)) {
  .topbar {
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
  }
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-decoration: none; padding: 5px 11px 5px 8px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.back-link::before {
  content: '←'; font-size: 15px; color: var(--accent); transition: transform .15s;
}
.back-link:hover {
  color: var(--text); background: var(--accent-soft); border-color: var(--accent-glow);
}
.back-link:hover::before { transform: translateX(-3px); }
.topbar-left .bc-sep  { color: var(--border2); font-size: 18px; user-select: none; }
.topbar-left .bc-page { font-size: 13px; font-weight: 600; color: var(--text); }

/* ═══════════════════════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,200,255,0.04);
  position: relative; overflow: hidden;
  transition: border-color .22s, box-shadow .22s;
}
@supports (backdrop-filter: blur(1px)) {
  .card { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
.card:hover {
  border-color: rgba(0,200,255,0.18);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 30px rgba(0,120,255,0.08);
}
.card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    rgba(0,200,255,0.15),
    rgba(226,168,75,0.12) 50%,
    transparent 80%
  );
  pointer-events: none;
}
.card-sm { padding: 18px 16px; }
.menu-card { max-width: 620px; margin: 0 auto; }

h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 8px; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; font-family: 'Sora', sans-serif;
  cursor: pointer; border: none; text-decoration: none; transition: all .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #a06020 100%);
  color: #fff;
  box-shadow: 0 3px 12px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--accent-glow); }
.btn-primary:active { transform: none; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border2); color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════
   FORM CONTROLS
═══════════════════════════════════════════════════════════════ */
input[type="text"], input[type="email"], input[type="url"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 13px; color: var(--text);
  font-size: 13px; font-family: 'Sora', sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer;
}
select option { background: var(--bg2); color: var(--text); }
textarea { resize: vertical; min-height: 80px; }
.form-group { margin-bottom: 15px; }
.form-label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-muted); margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════════════ */
.success, .error {
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.success { background: var(--green-soft); border: 1px solid rgba(22,163,74,0.25); color: var(--green); }
.error   { background: var(--red-soft);   border: 1px solid rgba(220,38,38,0.25);  color: var(--red); }

/* ═══════════════════════════════════════════════════════════════
   BADGES & CHIPS
═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-glow); border-radius: 99px;
  padding: 2px 10px; font-size: 11px; font-weight: 600;
}
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 4px 11px;
  border-radius: 99px; cursor: pointer; border: none;
  font-family: 'Sora', sans-serif; transition: all .13s;
}
.chip-blue { background: var(--blue-soft); color: var(--blue); border: 1px solid var(--blue-border); }
.chip-blue:hover { background: rgba(37,99,235,0.16); }
.chip-red  { background: var(--red-soft); color: var(--red); border: 1px solid rgba(220,38,38,0.22); }
.chip-red:hover  { background: rgba(220,38,38,0.16); }

/* ═══════════════════════════════════════════════════════════════
   STATS ROW
═══════════════════════════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 10px; margin-bottom: 22px;
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 12px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.stat-card:hover {
  border-color: var(--accent-glow); transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted); }
.stat-value { font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-sub   { font-size: 10px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   ADMIN GRID & TABLE
═══════════════════════════════════════════════════════════════ */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 680px) { .admin-grid { grid-template-columns: 1fr; } }

.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted);
  padding: 8px 12px; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--accent-soft); }
.student-name  { font-size: 13px; font-weight: 600; }
.student-email { font-size: 11px; color: var(--text-muted); }
.actions-cell  { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form   { display: inline; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN DASHBOARD ELEMENTS
═══════════════════════════════════════════════════════════════ */
.adm-ribbon { display: flex; align-items: stretch; flex-wrap: wrap; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; overflow: hidden; margin-bottom: 24px; position: relative; z-index: 1; }
.adm-ribbon-item { flex: 1 1 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 10px; text-align: center; transition: background .18s; min-width: 80px; }
.adm-ribbon-item:hover { background: rgba(34,211,238,.07); }
.adm-ribbon-val   { font-size: 24px; font-weight: 700; font-family: 'JetBrains Mono', monospace; line-height: 1; background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.adm-ribbon-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: var(--text-muted); margin-top: 6px; }
.adm-ribbon-sep   { width: 1px; background: rgba(255,255,255,.07); flex-shrink: 0; }
.adm-ribbon-arrears .adm-ribbon-val { background: linear-gradient(135deg,#fb7185,#fda4af); -webkit-background-clip: text; background-clip: text; }

.adm-card {
  max-width: 860px; margin: 0 auto 36px; padding: 24px 28px 20px;
  background: var(--adm-card-bg); border: 1px solid var(--adm-card-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(0,200,255,0.04);
  position: relative; overflow: hidden;
}
@supports (backdrop-filter: blur(1px)) {
  .adm-card { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
}

.adm-identity { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.07); position: relative; z-index: 1; }
.adm-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 20px var(--accent-glow); animation: pulse-dot 3s ease-in-out infinite; }
.adm-identity-title { font-size: 17px; font-weight: 700; letter-spacing: -.3px; color: var(--text); }
.adm-identity-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-style: italic; }
.adm-identity-who   { margin-left: auto; font-size: 11px; color: var(--text-muted); font-style: italic; }

.adm-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
@media (max-width: 540px) { .adm-menu { grid-template-columns: 1fr; } }
.adm-sec { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 14px 0 6px; }
.adm-sec::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.adm-footer { text-align: center; padding-top: 14px; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.adm-logout { font-size: 12px; color: var(--red); text-decoration: none; transition: color .14s; font-weight: 600; }
.adm-logout:hover { color: #b91c1c; }

.adm-btn {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border-radius: var(--radius-md); text-decoration: none; color: var(--text);
  background: var(--adm-btn-bg); border: 1px solid var(--adm-btn-border);
  transition: all .18s; position: relative; overflow: hidden;
}
.adm-btn:hover {
  background: rgba(34,211,238,.06); border-color: rgba(34,211,238,.28);
  transform: translateY(-2px); box-shadow: var(--shadow-blue); color: var(--text);
}
.adm-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; background: rgba(255,255,255,.04); }
.adm-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.adm-title   { font-size: 13px; font-weight: 600; color: var(--text); }
.adm-caption { font-size: 11px; color: var(--text-muted); }
.adm-arrow   { font-size: 16px; color: var(--text-muted); flex-shrink: 0; }

.menu-button {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--menu-btn-border);
  border-radius: var(--radius-md);
  text-decoration: none; color: var(--text);
  background: var(--menu-btn-bg);
  transition: all .20s; position: relative; overflow: hidden;
}
@supports (backdrop-filter: blur(1px)) {
  .menu-button { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.menu-button:hover {
  border-color: rgba(0,200,255,0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,100,255,0.14), 0 0 0 1px rgba(0,200,255,0.08);
}
.menu-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), #a06020);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; box-shadow: 0 3px 10px var(--accent-glow);
  flex-shrink: 0;
}
.menu-title   { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-caption { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.menu-arrow   { font-size: 16px; color: var(--text-muted); flex-shrink: 0; }

/* Quick bar */
.qb-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 99px;
  font-size: 12px; font-weight: 600; text-decoration: none;
  color: rgba(180,200,240,.85); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10); transition: all .14s;
  cursor: pointer; font-family: 'Sora', sans-serif; white-space: nowrap;
}
.qb-btn:hover { color: #eef2ff; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.20); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════
   ZERO ENGLISH
═══════════════════════════════════════════════════════════════ */
.ze-topbar-brand-name {
  font-weight: 700; letter-spacing: -.2px;
  background: var(--ze-brand-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.ze-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0,10,25,0.85);
  border-bottom: 1px solid rgba(0,200,255,0.15);
  padding: 0 20px;
  display: flex; align-items: center; gap: 14px; height: 56px;
}
@supports (backdrop-filter: blur(1px)) {
  .ze-nav { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
}
.ze-nav-back {
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; color: rgba(0,200,255,0.7); font-size: 12px; font-weight: 700;
  letter-spacing: .4px; transition: color .18s;
  padding: 6px 14px; border: 1px solid rgba(0,200,255,0.2);
  border-radius: 10px; background: rgba(0,200,255,0.05);
}
.ze-nav-back:hover { color: #00e5ff; border-color: rgba(0,200,255,0.4); background: rgba(0,200,255,0.1); }
.ze-hero {
  background: var(--ze-glass-bg);
  border: 1px solid var(--ze-glass-border);
  border-radius: 24px; padding: 32px 36px;
  position: relative; overflow: hidden; margin-bottom: 32px;
  box-shadow: 0 0 60px rgba(0,130,255,0.08), inset 0 1px 0 rgba(0,200,255,0.15);
}
@supports (backdrop-filter: blur(1px)) {
  .ze-hero { backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5); }
}
.ze-hero::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,220,255,0.55), transparent);
}
.ze-hero-title {
  font-size: 28px; font-weight: 800; letter-spacing: -0.8px;
  background: linear-gradient(135deg, #00e5ff 0%, #60a5fa 55%, #c4b5fd 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 20px rgba(0,200,255,0.3));
  margin-bottom: 8px; line-height: 1.15;
}
.ze-content-frame {
  background: var(--ze-glass-bg);
  border: 1px solid var(--ze-glass-border);
  border-radius: 20px; padding: 32px;
  box-shadow: 0 0 40px rgba(0,100,200,0.06);
  position: relative; overflow: hidden;
}
@supports (backdrop-filter: blur(1px)) {
  .ze-content-frame { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
}
.ze-content-frame::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,200,255,0.3), transparent);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }
.empty-state-icon { font-size: 30px; margin-bottom: 10px; }

/* ═══════════════════════════════════════════════════════════════
   LESSON GRID
═══════════════════════════════════════════════════════════════ */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; margin: 14px 0;
}
.lesson-box {
  display: block; padding: 18px 16px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-md); text-decoration: none; color: var(--text);
  transition: all .18s;
}
.lesson-box:hover {
  border-color: var(--blue-border);
  transform: translateY(-2px); box-shadow: var(--shadow-blue);
}
.lesson-box h3 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }

.lesson-container { max-width: 780px; margin: 0 auto; padding: 20px 16px; }
.lesson-section {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 12px;
  transition: border-color .18s;
}
.lesson-section:hover { border-color: var(--border2); }
.lesson-section h3 {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent); margin-bottom: 9px;
}
.lesson-section h4 { font-size: 13px; font-weight: 600; margin: 9px 0 5px; }
.dialogue {
  background: var(--bg2); border-left: 3px solid var(--accent);
  padding: 7px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px; font-style: italic; margin: 4px 0;
}
.lesson-pdf-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius-sm);
  background: var(--blue-soft); color: var(--blue);
  border: 1px solid var(--blue-border);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Sora', sans-serif; transition: all .13s;
}
.lesson-pdf-btn:hover { background: rgba(37,99,235,0.16); }
.lesson-video-player { width: 100%; border-radius: var(--radius-sm); background: #000; margin: 4px 0; }
.lesson-pdf-frame { width: 100%; height: 480px; border: none; border-radius: var(--radius-sm); margin: 4px 0; }
.lesson-media-image { width: 100%; border-radius: var(--radius-sm); max-height: 400px; object-fit: contain; }
.lesson-media-section { border-color: var(--blue-border); background: var(--blue-glass); }

/* ═══════════════════════════════════════════════════════════════
   MISC UTILITIES
═══════════════════════════════════════════════════════════════ */
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.muted { color: var(--text-muted); font-size: 13px; }
.logout-btn {
  display: inline-block; margin-top: 18px; padding: 8px 20px;
  background: var(--red-soft); color: var(--red);
  border-radius: var(--radius-sm); text-decoration: none;
  font-size: 13px; font-weight: 600;
  border: 1px solid rgba(220,38,38,0.22); transition: all .13s;
}
.logout-btn:hover { background: rgba(220,38,38,0.16); }

/* Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ═══════════════════════════════════════════════════════════════
   FRENCH LESSON
═══════════════════════════════════════════════════════════════ */
.fr-lesson-wrap { max-width: 800px; margin: 0 auto; padding: 24px 16px 56px; }
.fr-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #065f46 80%);
  border-radius: var(--radius-xl); padding: 28px 30px; margin-bottom: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
  border: 1px solid rgba(96,165,250,0.20);
}
.fr-hero-title { font-size: 32px; font-weight: 700; color: #fff; letter-spacing: -1px; margin-bottom: 5px; }
.fr-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 14px;
  transition: border-color .18s;
}
.fr-section:hover { border-color: var(--blue-border); }
.fr-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.fr-text { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 7px; }
.pt-text { font-size: 13px; color: var(--green); font-style: italic; line-height: 1.6; padding-left: 10px; border-left: 2px solid rgba(62,207,142,0.35); }
.fr-dialogue {
  background: var(--bg3); border-left: 4px solid var(--blue-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px; margin-bottom: 10px;
}
.fr-meaning { background: var(--accent-soft); border: 1px solid var(--accent-glow); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 7px; }
.fr-finale {
  background: var(--bg3); border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg); padding: 26px; text-align: center; margin-top: 22px;
  box-shadow: var(--shadow-blue);
}
.fr-finale-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   Z-INDEX LAYERING
═══════════════════════════════════════════════════════════════ */
.page-admin, .page-content, .theme-toggle, .topbar,
.page-header, .admin-grid, .card, .adm-card { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ph-inner    { padding: 0 12px; height: 48px; }
  .ph-pill     { font-size: 11px; padding: 4px 7px; }
  .ph-brand    { font-size: 13px; }
  .clock-city  { min-width: 105px; padding: 3px 10px; }
  .clock-time  { font-size: 12px; }
  .fr-hero-title { font-size: 24px; }
  .admin-menu  { grid-template-columns: 1fr; }
  .adm-menu    { grid-template-columns: 1fr; }
  .adm-card    { padding: 16px 14px 14px; margin: 0 10px 24px; }
  .page-content { padding: 16px 14px; }
  .card        { padding: 18px 14px; border-radius: var(--radius-md); }
  .topbar      { padding: 0 12px; height: 46px; }
  .stats-row   { grid-template-columns: repeat(2, 1fr); }
  .lesson-grid { grid-template-columns: 1fr 1fr; }
  .admin-grid  { grid-template-columns: 1fr; }
  .btn         { padding: 8px 16px; }
  .page-header h1 { font-size: 18px; }
  .ze-hero { padding: 20px 18px; }
  .ze-content-frame { padding: 18px 14px; }
  .ze-nav { padding: 0 12px; height: 50px; }
  .clock-city:nth-child(n+4) { display: none; }
}
@media (max-width: 400px) {
  .lesson-grid { grid-template-columns: 1fr; }
  .stats-row   { grid-template-columns: 1fr 1fr; }
  .clock-city:nth-child(n+3) { display: none; }
}
@media (pointer: coarse) {
  .btn, .chip, .qb-btn, .adm-btn, .menu-button, .ph-pill { min-height: 44px; }
}

/* ═══════════════════════════════════════════════════════════════
   STAT VALUE GRADIENTS (admin/dashboard pages)
═══════════════════════════════════════════════════════════════ */
.rev-stat-val, .vd-stat-val {
  background: linear-gradient(135deg, #e2a84b, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* ─────────────────────────────────────────────────────
   PART 6 — ADD NEW CSS
───────────────────────────────────────────────────── */

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

@media (max-width: 600px) {
  .rating-btns {
    grid-template-columns: repeat(2, 1fr);
  }

  .flashcard {
    aspect-ratio: auto;
    min-height: 220px;
  }

  .card-face {
    padding: 24px 20px;
  }

  .card-text {
    font-size: 20px;
  }

  .completed-analytics {
    grid-template-columns: repeat(2,1fr);
  }

  .analytics-strip {
    grid-template-columns: repeat(2,1fr);
  }
}

/* ── SEARCH BAR ── */

.search-bar-wrap {
  position: relative;
  max-width: 340px;
  margin-left: auto;
}

.search-bar {
  width: 100%;
  background: rgba(0,10,30,0.6);
  border: 1px solid rgba(0,200,255,0.15);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  padding: 8px 36px 8px 14px;
  outline: none;
  transition: border-color .2s;
}

.search-bar:focus {
  border-color: rgba(0,200,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,200,255,0.07);
}

.search-bar::placeholder {
  color: rgba(0,200,255,0.25);
}

.search-bar-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
  opacity: .4;
}

/* ── SEARCH RESULTS MODAL ── */

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(8,14,28,0.98);
  border: 1px solid rgba(0,200,255,0.2);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background .15s;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.search-result-item:hover {
  background: rgba(0,200,255,0.06);
}

.search-result-item:last-child {
  border-bottom: none;
}

.sr-front {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.sr-back {
  font-size: 12px;
  color: var(--green);
}

.sr-deck {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.sr-meta {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.sr-star {
  font-size: 14px;
}

/* ── TOPBAR EXTRAS ── */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-icon-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all .18s;
  color: var(--text);
  position: relative;
}

.topbar-icon-btn:hover {
  background: rgba(0,200,255,0.08);
  border-color: rgba(0,200,255,0.25);
}

.topbar-icon-btn .badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  border: 1px solid var(--bg);
}

/* ── STREAK WIDGET ── */

.streak-widget {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 10px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
}

.streak-widget .streak-num {
  font-size: 17px;
  font-family: 'JetBrains Mono', monospace;
}

/* ── CARD ACTIONS ── */

.card-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  justify-content: flex-end;
  width: 100%;
  max-width: 620px;
}

.card-action-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all .18s;
  color: var(--muted);
  font-family: 'Sora', sans-serif;
}

.card-action-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.card-action-btn.bookmarked {
  color: var(--amber);
  border-color: rgba(251,191,36,0.35);
  background: rgba(251,191,36,0.07);
}

.undo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(248,113,113,0.07);
  border: 1px solid rgba(248,113,113,0.25);
  color: #f87171;
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  transition: all .18s;
  opacity: 0;
  pointer-events: none;
}

.undo-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.undo-btn:hover {
  background: rgba(248,113,113,0.15);
}

/* ── SESSION TIMER ── */

.session-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.session-timer .timer-dot {
  width: 5px;
  height: 5px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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