/* moaha-website.css — Moaha SaaS Landing Pages */

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --primary:   #5e64ff;
  --primary-d: #4a50d4;
  --dark:      #1a1a2e;
  --accent:    #e94560;
  --light:     #f8f9fa;
  --text:      #333;
  --muted:     #6c757d;
  --border:    #dee2e6;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.14);
  --font-en:   'Cairo', sans-serif;
  --font-ar:   'Cairo', sans-serif;
  --transition: .25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en);
  color: var(--text);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* RTL body */
body.rtl {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
}

/* ─── Language-specific text ─────────────────────────────────────────────── */
body .ar { display: none; }
body .en { display: inline; }
body.rtl .ar { display: inline; }
body.rtl .en { display: none; }
body .ar-block { display: none; }
body .en-block { display: block; }
body.rtl .ar-block { display: block; }
body.rtl .en-block { display: none; }

/* ─── Navbar ─────────────────────────────────────────────────────────────── */
.moaha-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: .875rem 0;
}

.moaha-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-brand span { color: var(--dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

#lang-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: .35rem .7rem;
  font-size: .85rem;
  cursor: pointer;
  color: var(--muted);
  transition: all var(--transition);
  font-weight: 600;
}

#lang-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary-moaha {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .6rem 1.4rem;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary-moaha:hover {
  background: var(--primary-d);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-moaha {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: .55rem 1.3rem;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-outline-moaha:hover {
  background: var(--primary);
  color: #fff;
}

.btn-lg-moaha {
  padding: .875rem 2.25rem;
  font-size: 1.1rem;
  border-radius: 10px;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .6rem 1.4rem;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-accent:hover {
  background: #c73850;
  color: #fff;
  transform: translateY(-1px);
}

/* ─── Hero Section ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #16213e 60%, #0f3460 100%);
  color: #fff;
  padding: 7rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(94,100,255,.2) 0%, transparent 70%);
  top: -200px; left: -200px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(233,69,96,.15) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(94,100,255,.25);
  border: 1px solid rgba(94,100,255,.5);
  color: #a5a8ff;
  border-radius: 20px;
  padding: .35rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero h1 .highlight {
  color: var(--primary);
  position: relative;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,.8);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

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

/* ─── Section Basics ─────────────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-dark { background: var(--dark); color: #fff; }
.section-light { background: var(--light); }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .label {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: .75rem;
}

.section-dark .section-header h2 { color: #fff; }

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

.section-dark .section-header p { color: rgba(255,255,255,.7); }

/* ─── Feature Cards ──────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

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

.feature-icon {
  width: 52px; height: 52px;
  background: rgba(94,100,255,.12);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--dark);
}

.feature-card p {
  color: var(--muted);
  font-size: .93rem;
  margin: 0;
}

/* ─── Pricing Cards ──────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.75rem;
  max-width: 980px;
  margin: 0 auto;
}

.pricing-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  position: relative;
  transition: all var(--transition);
}

.pricing-card:hover { box-shadow: var(--shadow-lg); }

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: .25rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-card .plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .25rem;
}

.pricing-card .plan-price {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: .75rem 0 .25rem;
}

.pricing-card .plan-price sup {
  font-size: 1.25rem;
  font-weight: 600;
  vertical-align: super;
}

.pricing-card .plan-period {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 1.5rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .45rem 0;
  font-size: .93rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.plan-features li:last-child { border: none; }

.plan-features .check { color: #22c55e; font-weight: 700; }
.plan-features .cross { color: #ef4444; }

/* ─── Stats Row ──────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-item .label {
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  margin-top: .4rem;
}

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

.testimonial-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.testimonial-card .quote {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.author-info .name { font-weight: 700; font-size: .9rem; }
.author-info .title { font-size: .82rem; color: var(--muted); }

.stars { color: #f59e0b; font-size: .85rem; margin-bottom: .25rem; }

/* ─── CTA Section ────────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  color: #fff;
  padding: 5rem 0;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.btn-white {
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 8px;
  padding: .875rem 2.25rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition);
}

.btn-white:hover {
  background: rgba(255,255,255,.9);
  color: var(--primary-d);
  transform: translateY(-1px);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.moaha-footer {
  background: var(--dark);
  color: rgba(255,255,255,.8);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: .88rem;
  line-height: 1.7;
  color: rgba(255,255,255,.6);
  margin-top: .75rem;
}

.footer-col h4 {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li { margin-bottom: .5rem; }

.footer-col a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .88rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: #fff; }

.footer-divider {
  border-color: rgba(255,255,255,.1);
  margin: 0 0 1.5rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: .5rem;
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 0 auto;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--dark);
  margin-bottom: .4rem;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .6rem .9rem;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--text);
  background: #fff;
  appearance: auto;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94,100,255,.15);
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background var(--transition), border-color var(--transition);
  vertical-align: middle;
}
.form-group input[type="checkbox"]:checked,
.form-group input[type="radio"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.form-group input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.form-group input[type="radio"] {
  border-radius: 50%;
}
.form-group input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.form-group textarea { resize: vertical; min-height: 120px; }

.subdomain-preview {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.subdomain-preview:focus-within { border-color: var(--primary); }

.subdomain-preview input {
  border: none;
  border-radius: 0;
  flex: 1;
  box-shadow: none !important;
}

.subdomain-preview input:focus { box-shadow: none; }

.subdomain-suffix {
  background: var(--light);
  border-left: 1.5px solid var(--border);
  padding: .6rem .9rem;
  font-size: .9rem;
  color: var(--muted);
  white-space: nowrap;
}

body.rtl .subdomain-suffix {
  border-left: none;
  border-right: 1.5px solid var(--border);
}

.captcha-box {
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  letter-spacing: .05em;
}

/* Alert messages */
.alert-moaha {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: .93rem;
  margin-bottom: 1.25rem;
  border: 1.5px solid;
}

.alert-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.alert-error   { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

/* ─── Page headers (inner pages) ─────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
  color: #fff;
  padding: 4rem 0 3.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: .75rem;
}

.page-header p {
  color: rgba(255,255,255,.75);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ─── Contact page ───────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-info-card {
  background: var(--light);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item .icon {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.contact-item .text h4 { font-weight: 700; font-size: .9rem; margin-bottom: .2rem; }
.contact-item .text p  { color: var(--muted); font-size: .88rem; margin: 0; }

/* ─── Portal page ────────────────────────────────────────────────────────── */
.portal-header {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.portal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.portal-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--dark);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .93rem;
}

.info-row:last-child { border: none; }
.info-row .key { color: var(--muted); }
.info-row .val { font-weight: 600; color: var(--dark); }

.badge-plan {
  display: inline-block;
  background: rgba(94,100,255,.12);
  color: var(--primary);
  border-radius: 6px;
  padding: .2rem .7rem;
  font-size: .82rem;
  font-weight: 700;
}

.badge-status-active   { background: #f0fdf4; color: #15803d; border-radius: 6px; padding: .2rem .7rem; font-size: .82rem; font-weight: 700; }
.badge-status-pending  { background: #fefce8; color: #a16207; border-radius: 6px; padding: .2rem .7rem; font-size: .82rem; font-weight: 700; }
.badge-status-suspended{ background: #fef2f2; color: #b91c1c; border-radius: 6px; padding: .2rem .7rem; font-size: .82rem; font-weight: 700; }

/* ─── About page ─────────────────────────────────────────────────────────── */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.value-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.value-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}

.value-card .icon { font-size: 2rem; margin-bottom: .75rem; }
.value-card h4 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }
.value-card p { font-size: .88rem; color: var(--muted); margin: 0; }

/* ─── Pricing Toggle ─────────────────────────────────────────────────────── */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.billing-toggle label { font-weight: 600; color: var(--text); cursor: pointer; }

.toggle-switch {
  position: relative;
  width: 48px; height: 26px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 4px; bottom: 4px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

.annual-badge {
  background: #dcfce7;
  color: #15803d;
  border-radius: 6px;
  padding: .15rem .55rem;
  font-size: .78rem;
  font-weight: 700;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    padding: 1rem;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: .5rem;
  }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .mission-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .hero { padding: 4rem 0 3.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 1.5rem; }
}

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.w-100 { width: 100%; }
.text-muted { color: var(--muted); }
.fw-bold { font-weight: 700; }
.small { font-size: .85rem; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-inline-end: .4rem;
}

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

.hidden { display: none !important; }

/* ── Admin Bar ─────────────────────────────────────────────────────────── */
#moaha-admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  height: 38px;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  font-size: .78rem;
  font-family: 'Cairo', sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
#moaha-admin-bar .ab-brand {
  display: flex; align-items: center; gap: .5rem;
  color: #fff; font-weight: 700; letter-spacing: .3px;
}
#moaha-admin-bar .ab-brand .ab-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #5e64ff;
}
#moaha-admin-bar .ab-links {
  display: flex; align-items: center; gap: .25rem;
}
#moaha-admin-bar .ab-links a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  padding: .3rem .65rem;
  border-radius: 5px;
  transition: background .15s, color .15s;
  white-space: nowrap;
  font-weight: 500;
}
#moaha-admin-bar .ab-links a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
#moaha-admin-bar .ab-links a.ab-primary {
  background: #5e64ff;
  color: #fff;
  font-weight: 700;
}
#moaha-admin-bar .ab-links a.ab-primary:hover {
  background: #4a50d4;
}
#moaha-admin-bar .ab-links .ab-sep {
  width: 1px; height: 16px; background: rgba(255,255,255,.15); margin: 0 .2rem;
}
#moaha-admin-bar .ab-user {
  color: rgba(255,255,255,.5); font-size: .72rem; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Push page content down when admin bar is visible */
body.has-admin-bar { padding-top: 38px; }
body.has-admin-bar .moaha-navbar { top: 38px; }

/* ── Admin nav dropdown ────────────────────────────────────────────────── */
.admin-nav-dropdown {
  position: relative; display: inline-block;
}
.admin-nav-dropdown .admin-nav-btn {
  display: flex; align-items: center; gap: .35rem;
  background: #5e64ff; color: #fff;
  border: none; border-radius: 8px; padding: .4rem .9rem;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.admin-nav-dropdown .admin-nav-btn:hover { background: #4a50d4; }
.admin-nav-dropdown .admin-nav-btn .caret {
  font-size: .65rem; opacity: .8; transition: transform .2s;
}
.admin-nav-dropdown.open .admin-nav-btn .caret { transform: rotate(180deg); }
.admin-nav-menu {
  display: none; position: absolute; top: calc(100% + 8px);
  right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  min-width: 210px; z-index: 9999; overflow: hidden;
  animation: dropIn .15s ease;
}
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.admin-nav-dropdown.open .admin-nav-menu { display: block; }
.admin-nav-menu a, .admin-nav-menu button {
  display: flex; align-items: center; gap: .65rem;
  width: 100%; padding: .65rem 1rem;
  color: var(--dark); text-decoration: none;
  font-size: .85rem; font-weight: 500;
  border: none; background: none; cursor: pointer; text-align: left;
  font-family: inherit; transition: background .12s;
}
.admin-nav-menu a:hover, .admin-nav-menu button:hover { background: #f5f6ff; }
.admin-nav-menu .menu-section {
  padding: .4rem 1rem .25rem;
  font-size: .68rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  border-top: 1px solid var(--border); margin-top: .25rem;
}
.admin-nav-menu .menu-section:first-child { border-top: none; margin-top: 0; }
.admin-nav-menu .menu-icon { font-size: 1rem; width: 20px; text-align: center; }
.admin-nav-menu .logout-btn { color: #dc2626; }
.admin-nav-menu .logout-btn:hover { background: #fef2f2; }

/* ─── Login Page ─────────────────────────────────────────────────────────── */
body[frappe-session-status="logged-out"] {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%) !important;
  min-height: 100vh;
  font-family: var(--font-en);
}
body[frappe-session-status="logged-out"] .page-content-wrapper,
body[frappe-session-status="logged-out"] .container {
  background: transparent !important;
  padding-top: 0 !important;
  max-width: 100% !important;
}
body[frappe-session-status="logged-out"] .for-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}
/* Brand header above card */
body[frappe-session-status="logged-out"] .page-card-head {
  text-align: center;
  margin-bottom: 1.25rem;
}
body[frappe-session-status="logged-out"] .app-logo { display: none !important; }
body[frappe-session-status="logged-out"] .page-card-head::before {
  content: "موا‍ها | Moaha";
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #5e64ff;
  letter-spacing: -.5px;
  margin-bottom: .35rem;
}
body[frappe-session-status="logged-out"] .page-card-head h4 {
  font-size: 0 !important;
  margin: 0;
}
body[frappe-session-status="logged-out"] .page-card-head h4::after {
  content: "Sign in to your account";
  font-size: .9rem;
  font-weight: 400;
  color: rgba(255,255,255,.55);
}
/* Card */
body[frappe-session-status="logged-out"] .login-content.page-card {
  background: rgba(255,255,255,.06) !important;
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.35) !important;
  padding: 2rem 2rem 1.5rem !important;
  width: 100%;
  max-width: 400px;
}
/* Inputs */
body[frappe-session-status="logged-out"] .form-control {
  background: rgba(255,255,255,.08) !important;
  border: 1.5px solid rgba(255,255,255,.15) !important;
  border-radius: 8px !important;
  color: #fff !important;
  padding: .6rem .9rem !important;
  font-size: .95rem !important;
}
body[frappe-session-status="logged-out"] .form-control:focus {
  background: rgba(255,255,255,.12) !important;
  border-color: #5e64ff !important;
  box-shadow: 0 0 0 3px rgba(94,100,255,.25) !important;
  outline: none !important;
}
body[frappe-session-status="logged-out"] .form-control::placeholder {
  color: rgba(255,255,255,.3) !important;
}
/* Icons & toggle */
body[frappe-session-status="logged-out"] .field-icon use { color: rgba(255,255,255,.4) !important; }
body[frappe-session-status="logged-out"] .toggle-password { color: rgba(255,255,255,.4) !important; }
/* Login button */
body[frappe-session-status="logged-out"] .btn-login {
  background: #5e64ff !important;
  border-color: #5e64ff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: .95rem !important;
  padding: .65rem 1.5rem !important;
  width: 100% !important;
  color: #fff !important;
  transition: background .2s !important;
}
body[frappe-session-status="logged-out"] .btn-login:hover {
  background: #4a50d4 !important;
  border-color: #4a50d4 !important;
}
/* Forgot password & links */
body[frappe-session-status="logged-out"] .forgot-password-message a,
body[frappe-session-status="logged-out"] .login-divider,
body[frappe-session-status="logged-out"] .text-muted { color: rgba(255,255,255,.4) !important; }
body[frappe-session-status="logged-out"] .forgot-password-message a:hover { color: #5e64ff !important; }
/* "or" + social section */
body[frappe-session-status="logged-out"] .btn-login-option {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.15) !important;
  color: rgba(255,255,255,.7) !important;
  border-radius: 8px !important;
}
body[frappe-session-status="logged-out"] .btn-login-option:hover {
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
}
