/* ============================================================
   css/styles.css  –  Ancient Scripts Design System
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700&family=Inter:wght@300;400;500;600&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  --stone: #C4A882;
  --papyrus: #F5E6C8;
  --dark-ink: #1A1208;
  --gold: #D4AF37;
  --gold-light: #F0C840;
  --gold-dim: #8B6914;
  --bg: #0D0B08;
  --bg-2: #12100C;
  --bg-card: rgba(26, 18, 8, 0.75);
  --surface: rgba(212, 175, 55, 0.06);
  --border: rgba(212, 175, 55, 0.18);
  --border-glow: rgba(212, 175, 55, 0.45);
  --text-main: #F5E6C8;
  --text-muted: rgba(245, 230, 200, 0.55);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --shadow-gold: 0 0 32px rgba(212, 175, 55, 0.2);
  --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.7);
  --transition: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

img,
svg {
  max-width: 100%;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ═══════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: rgba(13, 11, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.nav-logo .logo-symbol {
  font-size: 1.6rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: var(--surface);
}

.nav-links .nav-admin {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.nav-links .nav-admin:hover {
  border-color: var(--border-glow);
  background: rgba(212, 175, 55, 0.08);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ═══════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  background: rgba(212, 175, 55, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.1;
  font-weight: 700;
  background: linear-gradient(135deg, var(--papyrus) 0%, var(--gold) 50%, var(--stone) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.hero-title-ar {
  font-family: 'Amiri', serif;
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-top: 8px;
  opacity: 0.85;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 24px auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #B8940A 100%);
  color: var(--dark-ink);
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.55);
}

.btn-outline {
  border: 1.5px solid var(--border-glow);
  color: var(--gold);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  transform: translateY(-3px);
}

.btn-danger {
  background: rgba(220, 50, 50, 0.12);
  color: #FF6B6B;
  border: 1px solid rgba(220, 50, 50, 0.3);
}

.btn-danger:hover {
  background: rgba(220, 50, 50, 0.22);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════
   SECTION COMMONS
═══════════════════════════════════════════════ */
.section {
  padding: 100px 48px;
}

.section-sm {
  padding: 60px 48px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--papyrus);
}

.section-title span {
  color: var(--gold);
}

.section-desc {
  margin-top: 16px;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.divider {
  width: 80px;
  height: 2px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ═══════════════════════════════════════════════
   LETTER CARDS GRID
═══════════════════════════════════════════════ */
.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.letter-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(12px);
}

.letter-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.letter-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-gold);
}

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

.card-code {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 16px;
}

.card-svg-wrap {
  width: 100%;
  aspect-ratio: 1;
  max-width: 180px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card-svg-wrap svg {
  width: 90%;
  height: 90%;
  color: var(--gold);
  transition: transform 0.5s ease;
}

.letter-card:hover .card-svg-wrap svg {
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.6));
}

.card-body {
  text-align: center;
}

.card-name-en {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--papyrus);
  margin-bottom: 4px;
}

.card-name-ar {
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 10px;
  direction: rtl;
}

.card-meaning {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.card-meaning::before,
.card-meaning::after {
  content: '⸻';
  opacity: 0.3;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-symbol {
  font-size: 1.6rem;
}

.card-stages-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stages-dots {
  display: flex;
  gap: 3px;
}

.stages-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-dim);
}

.stages-dots span.active {
  background: var(--gold);
}

.card-civ {
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-dim);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════
   SEARCH & FILTER BAR
═══════════════════════════════════════════════ */
.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

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

.search-input {
  width: 100%;
  padding: 12px 20px 12px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

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

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.filter-select {
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
}

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

.filter-select option {
  background: var(--bg-2);
}

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.92) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-deep), var(--shadow-gold);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 32px 36px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title-group .modal-code {
  font-size: 0.72rem;
  color: var(--gold-dim);
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.modal-title-group h2 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--papyrus);
}

.modal-title-group .modal-ar {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--gold);
  direction: rtl;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--gold);
  border-color: var(--border-glow);
}

.modal-body {
  padding: 32px 36px;
}

.modal-desc {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* ═══════════════════════════════════════════════
   JOURNEY / TIMELINE (MODAL & PAGE)
═══════════════════════════════════════════════ */
.journey-section {
  margin-top: 8px;
}

.journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.journey-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--papyrus);
}

.journey-controls {
  display: flex;
  gap: 8px;
}

.journey-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.journey-btn:hover {
  border-color: var(--border-glow);
  color: var(--gold);
}

.journey-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border-color: var(--border-glow);
}

.journey-stage-display {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
  min-height: 260px;
}

.stage-svg-area {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.stage-svg-area svg {
  width: 90%;
  height: 90%;
  color: var(--gold);
}

.stage-svg-area .stage-era-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--gold-dim);
  white-space: nowrap;
  background: rgba(13, 11, 8, 0.9);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.stage-info {
  flex: 1;
}

.stage-num {
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stage-name-en {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--papyrus);
  margin-bottom: 4px;
}

.stage-name-ar {
  font-family: 'Amiri', serif;
  font-size: 1rem;
  color: var(--gold);
  direction: rtl;
  margin-bottom: 16px;
}

.stage-period {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.stage-desc {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.92rem;
}

.stage-desc-ar {
  font-family: 'Amiri', serif;
  color: var(--text-muted);
  direction: rtl;
  margin-top: 10px;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* Timeline dots */
.journey-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 8px;
  position: relative;
  padding-bottom: 8px;
}

.journey-timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: rgba(212, 175, 55, 0.22);
  border-radius: 999px;
  z-index: 0;
}

.timeline-progress {
  position: absolute;
  top: 18px;
  left: 18px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-light));
  border-radius: 999px;
  z-index: 1;
  transition: width 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.timeline-step.active .step-dot {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark-ink);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  transform: scale(1.2);
}

.timeline-step.passed .step-dot {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-dim);
  color: var(--gold-dim);
}

.step-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  line-height: 1.3;
}

.timeline-step.active .step-label {
  color: var(--gold);
}

/* ═══════════════════════════════════════════════
   ABOUT / FEATURES SECTION
═══════════════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-gold);
}

.feature-icon {
  font-size: 2.4rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--papyrus);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════════ */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 48px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

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

.stat-num {
  font-family: 'Cinzel', serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════
   ALEF SHOWCASE (Landing Page)
═══════════════════════════════════════════════ */
.alef-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.alef-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.alef-stages-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.alef-stage-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.alef-stage-mini .mini-svg {
  width: 80px;
  height: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.alef-stage-mini svg {
  width: 65%;
  height: 65%;
  color: var(--gold);
}

.alef-stage-mini.active .mini-svg {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.1);
}

.alef-stage-mini .mini-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
}

.alef-arrow {
  color: var(--gold-dim);
  font-size: 1.2rem;
}

.alef-text .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.alef-text h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--papyrus);
  margin-bottom: 16px;
}

.alef-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════
   ADMIN LOGIN PAGE
═══════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.07) 0%, transparent 60%), var(--bg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '𐤀𐤁𐤂𐤃𐤄𐤅𐤆𐤇𐤈𐤉𐤊𐤋𐤌𐤍𐤎𐤏𐤐𐤑𐤒𐤓𐤔𐤕';
  position: absolute;
  font-size: 8rem;
  color: rgba(212, 175, 55, 0.03);
  letter-spacing: 0.5rem;
  line-height: 1.4;
  white-space: nowrap;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 52px 44px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-deep);
}

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

.login-logo .symbol {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

.login-logo h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem;
  color: var(--gold);
}

.login-logo p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--stone);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.92rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-glow);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold) 0%, #B8940A 100%);
  color: var(--dark-ink);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.45);
}

.login-error {
  background: rgba(220, 50, 50, 0.12);
  border: 1px solid rgba(220, 50, 50, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #FF6B6B;
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: none;
}

.login-error.show {
  display: block;
}

/* ═══════════════════════════════════════════════
   ADMIN PANEL
═══════════════════════════════════════════════ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 72px;
}

.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 28px 16px;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 0 12px;
  margin-bottom: 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
  margin-bottom: 2px;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: var(--surface);
  color: var(--papyrus);
}

.sidebar-link .icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.admin-main {
  flex: 1;
  padding: 36px 40px;
  overflow: auto;
}

.admin-page {
  display: none;
}

.admin-page.active {
  display: block;
}

.admin-page-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--papyrus);
  margin-bottom: 8px;
}

.admin-page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 36px;
}

.admin-tools {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

/* Admin table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--surface);
}

.admin-table .td-code {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--gold-dim);
}

.admin-table .td-symbol {
  font-size: 1.5rem;
}

.admin-table .td-actions {
  display: flex;
  gap: 6px;
}

/* Add / Edit form */
.admin-form {
  max-width: 680px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-textarea {
  width: 100%;
  padding: 12px 18px;
  min-height: 100px;
  resize: vertical;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.6;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--border-glow);
}

.form-select {
  width: 100%;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
}

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

.form-select option {
  background: var(--bg-2);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* Stats cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
}

.admin-stat-card .stat-val {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
}

.admin-stat-card .stat-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════
   LETTERS PAGE HEADER
═══════════════════════════════════════════════ */
.page-hero {
  padding: 90px 48px 36px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.07), transparent 55%);
}

.page-hero h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--papyrus);
}

.page-hero p {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 0.98rem;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer .footer-logo {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
  font-size: 0.82rem;
}

.footer-links a:hover {
  color: var(--gold);
}

/* ═══════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

.rtl {
  direction: rtl;
}

.text-gold {
  color: var(--gold);
}

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

.font-cinzel {
  font-family: 'Cinzel', serif;
}

.font-amiri {
  font-family: 'Amiri', serif;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.88rem;
  box-shadow: var(--shadow-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 240px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-color: rgba(74, 222, 128, 0.3);
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.3);
}

.toast-icon {
  font-size: 1.1rem;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .alef-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .admin-sidebar {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 14px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 72px 0 0;
    background: var(--bg-2);
    padding: 28px 20px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }

  .hamburger {
    display: flex;
  }

  .section {
    padding: 60px 20px;
  }

  .page-hero {
    padding: 90px 20px 28px;
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
  }

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

  .journey-stage-display {
    flex-direction: column;
  }

  .stage-svg-area {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }

  .modal-header,
  .modal-body {
    padding: 24px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    gap: 32px;
  }
}