/* ============================================================
   css/style.css — عُمق (Umq) PWA Styles
   ============================================================ */

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

:root {
  --purple: #51246a;
  --gold: #C7AE6A;
  --dark-bg: #170a1e;
  --card-bg: #1f0d2d;
  --gold-light: rgba(199, 174, 106, 0.15);
  --gold-hover: rgba(199, 174, 106, 0.3);
  --text-primary: #F0EEF8;
  --text-secondary: #B0AEC8;
  --border: rgba(199, 174, 106, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { direction: rtl; }
html[lang="en"] { direction: ltr; }

body {
  font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Glass Cards ─────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.glass-card-hover {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.glass-card-hover:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(199, 174, 106, 0.15);
}

/* ── Buttons ──────────────────────────────────── */
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b99a45);
  color: #1a1a2e;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(199, 174, 106, 0.4);
  opacity: 0.95;
}
.btn-gold:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: 600;
}
.btn-outline:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-purple {
  background: var(--purple);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}
.btn-purple:hover { opacity: 0.85; }

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.35); }

/* ── Form Elements ───────────────────────────── */
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus { border-color: var(--gold); }
.form-input::placeholder { color: var(--text-secondary); }

.form-label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 500;
}

/* ── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Hero Section ────────────────────────────── */
.hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(81,36,106,0.8) 0%, transparent 70%),
              linear-gradient(180deg, #170a1e 0%, #0d0514 100%);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Package Cards ───────────────────────────── */
.pkg-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.pkg-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.pkg-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 40px rgba(199, 174, 106, 0.15);
}
.pkg-card:hover::before { opacity: 1; }

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  background: linear-gradient(160deg, #4a1f62 0%, #2a0f3a 100%);
  border-left: 2px solid rgba(199,174,106,0.6);
  box-shadow: -6px 0 50px rgba(0,0,0,0.9), inset -1px 0 0 rgba(199,174,106,0.15);
  width: 272px;
  min-height: 100vh;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

html[lang="en"] .sidebar {
  border-left: none;
  border-right: 1px solid rgba(199,174,106,0.25);
  right: auto;
  left: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-radius: 12px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  position: relative;
}
.sidebar-link i {
  font-size: 17px;
  width: 22px;
  text-align: center;
  transition: transform 0.2s, filter 0.2s;
}
.sidebar-link:hover {
  background: rgba(199,174,106,0.12);
  color: var(--gold);
  transform: translateX(-3px);
}
html[lang="en"] .sidebar-link:hover { transform: translateX(3px); }
.sidebar-link:hover i { transform: scale(1.2); filter: drop-shadow(0 0 6px rgba(199,174,106,0.7)); }
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(199,174,106,0.18) 0%, rgba(199,174,106,0.05) 100%);
  color: var(--gold);
  border-right: 3px solid var(--gold);
  font-weight: 600;
}
.sidebar-link.active i { filter: drop-shadow(0 0 8px rgba(199,174,106,0.8)); }
html[lang="en"] .sidebar-link.active { border-right: none; border-left: 3px solid var(--gold); }

.main-content {
  margin-right: 260px;
  min-height: 100vh;
  padding: 24px;
}
html[lang="en"] .main-content { margin-right: 0; margin-left: 260px; }

/* ── Modal ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Pricing ─────────────────────────────────── */
.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  transition: all 0.3s;
}
.pricing-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(199, 174, 106, 0.2);
  transform: scale(1.03);
}
.pricing-card:hover:not(.featured) { border-color: rgba(236,204,92,0.5); }

/* ── Badge ───────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-gold { background: var(--gold-light); color: var(--gold); border: 1px solid rgba(199,174,106,0.3); }
.badge-purple { background: rgba(81,36,106,0.5); color: #c49ee8; border: 1px solid rgba(81,36,106,0.5); }
.badge-green { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-red { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }

/* ── Stats ───────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* ── Alert Banner ────────────────────────────── */
.alert-banner {
  background: rgba(236, 204, 92, 0.12);
  border: 1px solid rgba(236, 204, 92, 0.4);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--gold);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* ── Loading ─────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(199, 174, 106, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(23, 10, 30, 0.9);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
}

/* ── Toast ───────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px; left: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  min-width: 240px;
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
.toast-success { background: rgba(34,197,94,0.2); border: 1px solid rgba(34,197,94,0.5); color: #4ade80; }
.toast-error { background: rgba(239,68,68,0.2); border: 1px solid rgba(239,68,68,0.5); color: #f87171; }
.toast-info { background: rgba(59,130,246,0.2); border: 1px solid rgba(59,130,246,0.5); color: #60a5fa; }

/* ── Typing Indicator ────────────────────────── */
.typing-dots span {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: dot 1.2s infinite;
  margin: 0 2px;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot { 0%,80%,100%{transform:scale(0.6);opacity:0.4} 40%{transform:scale(1);opacity:1} }

/* ── Tabs ────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 4px;
}
.tab {
  flex: 1;
  padding: 8px 16px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
}
.tab.active { background: var(--gold); color: #1a1a2e; font-weight: 700; }

/* ── AI Result ───────────────────────────────── */
.ai-result {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(236,204,92,0.2);
  border-radius: 12px;
  padding: 20px;
  line-height: 1.8;
  font-size: 14px;
  color: var(--text-primary);
  max-height: 500px;
  overflow-y: auto;
  word-break: break-word;
}
.ai-result h1,.ai-result h2,.ai-result h3 { color: var(--gold); margin: 12px 0 6px; font-weight: 700; }
.ai-result p { margin-bottom: 10px; }
.ai-result ul,.ai-result ol { padding-right: 24px; margin-bottom: 10px; }
.ai-result li { margin-bottom: 4px; }
.ai-result strong { color: #fff; font-weight: 700; }
.ai-result table { width:100%; border-collapse:collapse; margin:12px 0; }
.ai-result th { background:rgba(199,174,106,0.15); color:var(--gold); padding:8px; border:1px solid rgba(199,174,106,0.2); }
.ai-result td { padding:8px; border:1px solid rgba(255,255,255,0.1); }
.ai-result code { background:rgba(255,255,255,0.08); padding:2px 6px; border-radius:4px; font-size:13px; }

/* ── Mobile Top Navbar ───────────────────────── */
.mobile-topbar {
  display: flex !important;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 62px;
  background: linear-gradient(180deg, #2a1040 0%, #1a0b28 100%);
  border-bottom: 1px solid rgba(199,174,106,0.22);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5), 0 1px 0 rgba(199,174,106,0.1);
  z-index: 9999;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 8px;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--gold);
  font-weight: bold;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  flex: 1;
  justify-content: center;
}
.topbar-logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 16px;
}
.topbar-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.topbar-btn {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(199,174,106,0.08);
  border: 1px solid rgba(199,174,106,0.15);
  color: var(--gold);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.topbar-btn:hover {
  background: rgba(199,174,106,0.2);
  border-color: rgba(199,174,106,0.4);
  box-shadow: 0 0 10px rgba(199,174,106,0.2);
  transform: scale(1.05);
}
.topbar-menu-btn {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(199,174,106,0.1);
  border: 1.5px solid rgba(199,174,106,0.3);
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 0 12px rgba(199,174,106,0.15);
}
.topbar-menu-btn:hover {
  background: rgba(199,174,106,0.22);
  box-shadow: 0 0 18px rgba(199,174,106,0.3);
  transform: scale(1.05);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(100%);
    box-shadow: none;
    padding-top: 62px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: -12px 0 48px rgba(0,0,0,0.7); }
  html[lang="en"] .sidebar { transform: translateX(-100%); }
  html[lang="en"] .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0 !important; margin-left: 0 !important; padding: 16px; padding-top: 76px !important; }
}
@media (min-width: 1024px) {
  .mobile-topbar { display: none !important; }
  .sidebar { transform: none !important; }
}

/* ── Print ───────────────────────────────────── */
/* ══ Chips الإعدادات والاقتراحات الذكية ══ */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.chip-setting {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(199,174,106,0.22);
  background: rgba(199,174,106,0.05);
  color: rgba(199,174,106,0.75);
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all .17s ease;
  user-select: none;
}
.chip-setting:hover {
  background: rgba(199,174,106,0.15);
  border-color: rgba(199,174,106,0.5);
  color: #fff;
  transform: translateY(-1px);
}
.chip-setting.active {
  background: rgba(199,174,106,0.2);
  border-color: var(--gold, #C7AE6A);
  color: #fff;
  font-weight: 600;
}

@media print {
  .sidebar, .modal-overlay, .toast-container, nav, .no-print { display: none !important; }
  .main-content { margin: 0 !important; }
  body { background: white; color: black; }
  .glass-card, .pkg-card, .pricing-card { background: white !important; border: 1px solid #ddd !important; }
}

/* ── Gradient Text ───────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #fff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Gold line ───────────────────────────────── */
.gold-line {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: none;
  margin: 24px 0;
}

/* ── Floating action ─────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #b99a45);
  color: #170a1e;
  font-size: 24px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(199,174,106,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  z-index: 200;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(199,174,106,0.5); }

/* ── Favorite Button ──────────────────────── */
.fav-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.3); font-size: 16px;
  transition: all 0.2s; padding: 4px;
}
.fav-btn:hover, .fav-btn.active { color: #ef4444; transform: scale(1.2); }

/* ── Light Mode ───────────────────────────── */
body.light-mode {
  --dark-bg: #f5f0fa;
  --card-bg: #ffffff;
  --text-primary: #170a1e;
  --text-secondary: #51246a;
  --border: rgba(81,36,106,0.2);
}
body.light-mode .glass-card,
body.light-mode .glass-card-hover {
  background: rgba(81,36,106,0.06);
  border-color: rgba(81,36,106,0.15);
}
body.light-mode .sidebar { background: #fff; border-color: rgba(81,36,106,0.15); }
body.light-mode .sidebar-link { color: #51246a; }
body.light-mode .sidebar-link:hover { background: rgba(81,36,106,0.08); }
body.light-mode .form-input { background: rgba(81,36,106,0.08); border-color: rgba(81,36,106,0.2); color: #170a1e; }

/* ── Quick Edit Buttons ───────────────────── */
.quick-edit-btn {
  transition: all 0.2s;
}
.quick-edit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(81,36,106,0.4);
}
.quick-edit-btn:active {
  transform: translateY(0);
}

/* ── WhatsApp Button ──────────────────────── */
.btn-whatsapp {
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.3);
  color: #25d366;
}
.btn-whatsapp:hover {
  background: rgba(37,211,102,0.2);
}

/* ═══════════════════════════════════════════════════════════
   THEMES v8 — عُمق (Umq)
   Dark (default) · Dawn (فجر) · Light (نور)
═══════════════════════════════════════════════════════════ */

/* ── Dawn Theme (فجر — دافئ وحيوي) ──────────────────────── */
body.dawn-mode {
  --dark-bg:      #1a0f2e;
  --card-bg:      #241540;
  --gold:         #e8c97a;
  --gold-light:   rgba(232, 201, 122, 0.15);
  --gold-hover:   rgba(232, 201, 122, 0.3);
  --purple:       #7c3aed;
  --text-primary: #f5f0ff;
  --text-secondary: #c4b5e8;
  --border: rgba(232, 201, 122, 0.25);
}
body.dawn-mode body {
  background: var(--dark-bg);
}
body.dawn-mode .sidebar {
  background: linear-gradient(160deg, #3b1f6e 0%, #1a0f2e 100%);
  border-color: rgba(232,201,122,0.4);
}
body.dawn-mode .glass-card,
body.dawn-mode .glass-card-hover {
  background: rgba(124,58,237,0.08);
  border-color: rgba(232,201,122,0.18);
}
body.dawn-mode .form-input {
  background: rgba(124,58,237,0.1);
  border-color: rgba(232,201,122,0.2);
  color: var(--text-primary);
}

/* ── Light Theme (نور — إضاءة كاملة) ──────────────────────── */
body.light-mode {
  --dark-bg:       #f0ebfa;
  --card-bg:       #ffffff;
  --gold:          #9b7a2f;
  --gold-light:    rgba(155,122,47,0.1);
  --gold-hover:    rgba(155,122,47,0.2);
  --purple:        #51246a;
  --text-primary:  #170a1e;
  --text-secondary:#6b4f82;
  --border:        rgba(81,36,106,0.18);
}
body.light-mode {
  background: var(--dark-bg);
  color: var(--text-primary);
}
body.light-mode .glass-card,
body.light-mode .glass-card-hover {
  background: rgba(255,255,255,0.85);
  border-color: rgba(81,36,106,0.15);
  box-shadow: 0 2px 16px rgba(81,36,106,0.08);
}
body.light-mode .glass-card-hover:hover {
  background: #fff;
  border-color: rgba(81,36,106,0.35);
  box-shadow: 0 6px 24px rgba(81,36,106,0.15);
}
body.light-mode .sidebar {
  background: linear-gradient(160deg, #fff 0%, #f5f0fa 100%);
  border-color: rgba(81,36,106,0.15);
  box-shadow: -4px 0 30px rgba(81,36,106,0.1);
}
body.light-mode .sidebar-link { color: #51246a; }
body.light-mode .sidebar-link:hover { background: rgba(81,36,106,0.07); }
body.light-mode .form-input {
  background: rgba(255,255,255,0.9);
  border-color: rgba(81,36,106,0.2);
  color: #170a1e;
}
body.light-mode .form-input::placeholder { color: #9d7bb5; }
body.light-mode .hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(81,36,106,0.15) 0%, transparent 70%),
              linear-gradient(180deg, #f0ebfa 0%, #e8dff5 100%);
}
body.light-mode .hero-title {
  background: linear-gradient(135deg, #170a1e 30%, #51246a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-mode .text-gradient {
  background: linear-gradient(135deg, #170a1e 30%, #9b7a2f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-mode .btn-gold {
  background: linear-gradient(135deg, #9b7a2f, #c7a84e);
  color: #fff;
}
body.light-mode .gold-line {
  background: linear-gradient(90deg, transparent, rgba(81,36,106,0.3), transparent);
}
body.light-mode ::-webkit-scrollbar-thumb { background: rgba(81,36,106,0.3); }
body.light-mode .mobile-topbar { background: rgba(240,235,250,0.95); border-bottom: 1px solid rgba(81,36,106,0.1); }
body.light-mode .proactive-widget { background: rgba(81,36,106,0.06); border-color: rgba(81,36,106,0.15); }
body.light-mode .proactive-item { background: rgba(255,255,255,0.8); border-color: rgba(81,36,106,0.1); color: #3d1f52; }
body.light-mode .proactive-item:hover { background: rgba(81,36,106,0.1); border-color: rgba(81,36,106,0.3); color: #170a1e; }
body.light-mode .quick-action-chip { background: rgba(255,255,255,0.8); border-color: rgba(81,36,106,0.15); color: #51246a; }
body.light-mode .quick-action-chip:hover { background: rgba(81,36,106,0.1); border-color: rgba(81,36,106,0.3); color: #170a1e; }

/* ── Theme Toggle Button ──────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 30px;
  padding: 3px 4px;
  cursor: pointer;
}
.theme-option {
  width: 30px; height: 28px;
  border: none; border-radius: 24px;
  background: transparent;
  cursor: pointer; font-size: 15px;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.theme-option:hover { background: rgba(255,255,255,0.1); }
.theme-option.active {
  background: rgba(199,174,106,0.2);
  box-shadow: 0 0 0 1px rgba(199,174,106,0.4);
}
body.light-mode .theme-toggle { background: rgba(81,36,106,0.08); border-color: rgba(81,36,106,0.15); }
body.light-mode .theme-option:hover { background: rgba(81,36,106,0.1); }
body.light-mode .theme-option.active { background: rgba(81,36,106,0.15); box-shadow: 0 0 0 1px rgba(81,36,106,0.3); }
body.dawn-mode .theme-toggle { background: rgba(124,58,237,0.1); border-color: rgba(232,201,122,0.2); }

/* ═══════════════════════════════════════════════════════════
   ALIVE ANIMATIONS — روح حية
═══════════════════════════════════════════════════════════ */

/* ── Pulse / Breathe — للشعار والرسائل ────────────────────── */
@keyframes umqBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(199,174,106,0); }
  50%       { box-shadow: 0 0 0 8px rgba(199,174,106,0.12); }
}
@keyframes umqPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.03); }
}
@keyframes umqFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-4px); }
}
@keyframes umqShimmerText {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes umqSparkle {
  0%   { opacity:0; transform: scale(0) rotate(0deg); }
  50%  { opacity:1; transform: scale(1.2) rotate(180deg); }
  100% { opacity:0; transform: scale(0) rotate(360deg); }
}
@keyframes umqReveal {
  from { opacity:0; transform: translateY(12px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes umqGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(199,174,106,0.2); }
  50%       { box-shadow: 0 0 28px rgba(199,174,106,0.5); }
}
@keyframes umqRainbow {
  0%   { border-color: rgba(199,174,106,0.3); }
  33%  { border-color: rgba(124,58,237,0.4); }
  66%  { border-color: rgba(199,174,106,0.3); }
  100% { border-color: rgba(124,58,237,0.4); }
}

/* ── Alive Elements ───────────────────────────────────────── */
.umq-breathe { animation: umqBreath 3s ease-in-out infinite; }
.umq-float   { animation: umqFloat 4s ease-in-out infinite; }
.umq-glow    { animation: umqGlow 2.5s ease-in-out infinite; }
.umq-reveal  { animation: umqReveal 0.4s ease forwards; }
.umq-pulse-border { animation: umqRainbow 4s ease-in-out infinite; }

/* ── Message Arrival Animation ────────────────────────────── */
.msg-bubble {
  animation: umqReveal 0.3s ease forwards;
}
.msg-bubble.assistant-msg::before {
  content: '';
  display: none;
}

/* ── Sparkle on new AI messages ───────────────────────────── */
.msg-sparkle {
  position: absolute;
  width: 8px; height: 8px;
  pointer-events: none;
  animation: umqSparkle 0.8s ease forwards;
  font-size: 12px;
}

/* ── Stage bar progress glow ──────────────────────────────── */
.stage-step.active {
  animation: umqGlow 2s ease-in-out infinite;
}

/* ── Welcome Screen Alive ─────────────────────────────────── */
.welcome-logo-circle {
  animation: umqBreath 3s ease-in-out infinite;
}
.welcome-tagline-shimmer {
  background: linear-gradient(90deg, rgba(199,174,106,0.7) 0%, #fff 40%, rgba(199,174,106,0.7) 60%, rgba(199,174,106,0.7) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: umqShimmerText 3s linear infinite;
}

/* ── Proactive suggestions entrance ──────────────────────── */
.proactive-widget {
  animation: umqReveal 0.5s ease forwards;
}
.proactive-item {
  animation: umqReveal 0.3s ease forwards;
}
.proactive-item:nth-child(1) { animation-delay: 0.1s; }
.proactive-item:nth-child(2) { animation-delay: 0.2s; }
.proactive-item:nth-child(3) { animation-delay: 0.3s; }

/* ── Persona card pulse on hover ──────────────────────────── */
.onboarding-role-card:hover .role-icon {
  animation: umqPulse 0.8s ease-in-out 2;
}

/* ── Gold button shimmer on hover ─────────────────────────── */
.btn-gold {
  position: relative;
  overflow: hidden;
}
.btn-gold::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: rgba(255,255,255,0.15);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn-gold:hover::after { left: 120%; }

/* ── Input focus ring ─────────────────────────────────────── */
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(199,174,106,0.15);
  animation: none;
}

/* ── Loading skeleton ─────────────────────────────────────── */
@keyframes umqSkeleton {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: umqSkeleton 1.5s ease infinite;
  border-radius: 8px;
}

/* ── Toast improvement ────────────────────────────────────── */
.toast {
  animation: umqReveal 0.3s ease forwards;
}

/* ── Mobile alive ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .umq-breathe, .umq-float, .umq-glow, .umq-pulse-border,
  .btn-gold::after, .welcome-tagline-shimmer {
    animation: none !important;
  }
}
