/* ==========================================================================
   SMART SCHOOL MASTER CLOUD PLATFORM - DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep Indigo, Emerald Accents, Glassmorphism, Micro-Animations
   ========================================================================== */

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

:root {
  /* Color Palette */
  --bg-dark: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-surface-glass: rgba(15, 23, 42, 0.75);
  --bg-card: rgba(30, 41, 59, 0.6);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);

  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --emerald-gradient: linear-gradient(135deg, #10b981 0%, #047857 100%);

  --amber: #f59e0b;
  --rose: #f43f5e;
  --cyan: #06b6d4;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-english: 'Outfit', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px var(--primary-glow);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-arabic);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body[dir="ltr"] {
  font-family: var(--font-english);
}

/* Dynamic Background Glow Orbs */
.bg-glow-orb-1, .bg-glow-orb-2 {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(140px);
  opacity: 0.22;
}
.bg-glow-orb-1 {
  top: -150px;
  right: -100px;
  background: radial-gradient(circle, var(--primary) 0%, rgba(99, 102, 241, 0) 70%);
}
.bg-glow-orb-2 {
  bottom: 10%;
  left: -150px;
  background: radial-gradient(circle, var(--emerald) 0%, rgba(16, 185, 129, 0) 70%);
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Glassmorphism Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth), border-color var(--transition-base), box-shadow var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-emerald {
  background: var(--emerald-gradient);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--emerald-glow);
}
.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--emerald-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

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

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-primary { background: rgba(99, 102, 241, 0.18); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-amber   { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-rose    { background: rgba(244, 63, 94, 0.18); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }

/* Announcement Top Banner */
.top-banner {
  background: linear-gradient(90deg, #4338ca, #059669);
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 100;
}
.top-banner a {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  text-decoration: underline;
}

/* Public Header Navigation */
.landing-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 90;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}
.landing-header .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  font-size: 1.25rem;
  color: #ffffff;
}
.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 15px var(--primary-glow);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}
.nav-links a {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}
.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Language Switcher */
.lang-switch {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Hero Section */
.hero-section {
  padding: 5.5rem 0 4rem;
  position: relative;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  margin-bottom: 1.5rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  color: #a5b4fc;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1050px;
  margin: 0 auto;
}
.hero-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}
.hero-stat-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--emerald);
  margin-bottom: 0.3rem;
}
.hero-stat-lbl {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Section Common */
.section {
  padding: 5rem 0;
  position: relative;
}
.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem;
}
.section-tag {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: block;
}
.section-title {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}
.feature-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.feature-card.highlight {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
}
.feature-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}
.feature-title {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}
.feature-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Pricing Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.8rem;
}
.pricing-card {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.pricing-card.featured {
  border: 2px solid var(--primary);
  background: linear-gradient(180deg, rgba(49, 46, 129, 0.3) 0%, rgba(15, 23, 42, 0.9) 100%);
  transform: translateY(-8px);
}
.featured-badge-ribbon {
  position: absolute;
  top: 18px;
  right: -32px;
  transform: rotate(45deg);
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 2.5rem;
  text-transform: uppercase;
}
.pricing-header {
  margin-bottom: 1.5rem;
}
.pricing-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.pricing-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 42px;
}
.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 1.5rem 0;
}
.pricing-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ffffff;
}
.pricing-currency {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.pricing-features-list {
  list-style: none;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex-grow: 1;
}
.pricing-features-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-main);
}
.pricing-features-list li.disabled {
  color: var(--text-dim);
  text-decoration: line-through;
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition-base);
}
.faq-question {
  padding: 1.4rem 1.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-answer {
  padding: 0 1.6rem 1.4rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.98rem;
  display: none;
}
.faq-item.open .faq-answer {
  display: block;
}
.faq-item.open {
  border-color: var(--border-glow);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.testimonial-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.testimonial-quote {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}
.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}

/* Contact / Lead Form */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: center;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}
.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-base);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
}
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }
.alert-error   { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.3); color: #fb7185; }

/* Admin Dashboard Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 270px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 99;
}
body[dir="ltr"] .admin-sidebar {
  border-left: none;
  border-right: 1px solid var(--border-subtle);
}
.admin-main {
  margin-right: 270px;
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}
body[dir="ltr"] .admin-main {
  margin-right: 0;
  margin-left: 270px;
}
.admin-nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 2rem;
  flex-grow: 1;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.admin-header {
  height: 70px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}
.admin-content {
  padding: 2.5rem;
  flex-grow: 1;
}

/* Admin Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}
body[dir="ltr"] .data-table {
  text-align: left;
}
.data-table th {
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Copy License Key Pill */
.license-key-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: #38bdf8;
  cursor: pointer;
}
.license-key-pill:hover {
  border-color: #38bdf8;
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  background: var(--bg-surface);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .contact-container { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { margin: 0 !important; }
}
