/* ... existing code ... */

/* Colorful page background */
:root {
  /* Updated: modern, softer palette + surface/text vars */
  --bg-1: #f59fb9;  /* soft rose */
  --bg-2: #ffd48a;  /* warm amber */
  --bg-3: #7dd3fc;  /* cool sky */
  --bg-4: #a78bfa;  /* violet */

  --text-color: #0f172a;         /* slate-900 */
  --muted: rgba(15,23,42,0.68);
  --surface-bg: rgba(255, 255, 255, 0.6);
  --surface-border: rgba(255, 255, 255, 0.28);
  --shadow-color: rgba(16, 24, 40, 0.08);
}

body {
  /* Smooth, vibrant gradient across the page */
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-1) 0%, var(--bg-2) 35%, var(--bg-3) 70%, var(--bg-4) 100%) !important;
  background-attachment: fixed; /* subtle parallax effect when scrolling */

  /* Added: modern text color */
  color: var(--text-color);
}

/* Inserted: ensure full viewport coverage and mobile fallback */
html, body {
  min-height: 100%;
}

@media (max-width: 767px) {
  /* Some mobile browsers ignore background-attachment: fixed */
  body {
    background-attachment: scroll;
  }
}

/* Inserted: dark mode theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #0f172a;  /* slate-900 */
    --bg-2: #1e293b;  /* slate-800 */
    --bg-3: #334155;  /* slate-700 */
    --bg-4: #4c1d95;  /* violet-900 */

    --text-color: #e5e7eb;        /* gray-200 */
    --muted: rgba(229,231,235,0.72);
    --surface-bg: rgba(17, 24, 39, 0.55);
    --surface-border: rgba(255, 255, 255, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.35);
  }
}

/* Inserted: glassmorphic surface for cards/sections */
.surface {
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 10px 28px var(--shadow-color);
}

/* Inserted: modern primary button */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #22c55e);
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

/* Optional: animated gradient for sections (e.g., hero) */
.gradient-bg {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
}

/* Inserted: motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .gradient-bg {
    animation: none !important;
  }
  .btn-primary {
    transition: none !important;
  }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Theme presets: applied via `body[data-theme="..."]` */
body[data-theme="pastel"] {
  --bg-1: #fff1f2;
  --bg-2: #fff7ed;
  --bg-3: #f0f9ff;
  --bg-4: #f5f3ff;
  --text-color: #0f172a;
  --surface-bg: rgba(255,255,255,0.8);
  --surface-border: rgba(0,0,0,0.04);
  --shadow-color: rgba(16,24,40,0.06);
  --brand: #d946ef;
  --brand-dark: #7c3aed;
}

body[data-theme="dark"] {
  --bg-1: #071028;
  --bg-2: #0b1220;
  --bg-3: #0f1724;
  --bg-4: #111827;
  --text-color: #e5e7eb;
  --surface-bg: rgba(17,24,39,0.6);
  --surface-border: rgba(255,255,255,0.06);
  --shadow-color: rgba(0,0,0,0.5);
  --brand: #8b5cf6;
  --brand-dark: #6d28d9;
}

body[data-theme="default"] {
  /* fallback to root variables; keep consistent name */
}

/* small swatches/buttons for theme picker */
.theme-picker { display:flex; gap:8px; align-items:center; margin-top:12px; }
.theme-swatch { width:40px; height:40px; border-radius:10px; border:2px solid rgba(0,0,0,0.06); cursor:pointer; box-shadow:0 6px 18px rgba(16,24,40,0.06); display:flex; align-items:center; justify-content:center; position:relative; }
.theme-swatch[data-theme="pastel"] { background: linear-gradient(90deg, #fff1f2, #fff7ed); }
.theme-swatch[data-theme="default"] { background: linear-gradient(90deg, #f59fb9, #a78bfa); }
.theme-swatch[data-theme="dark"] { background: linear-gradient(90deg, #0b1220, #111827); border-color: rgba(255,255,255,0.08); }
.theme-swatch.active { box-shadow: 0 8px 28px rgba(99,102,241,0.18); transform: translateY(-2px); }
.theme-swatch:focus { outline: 3px solid rgba(99,102,241,0.22); }

/* label under swatch */
.theme-swatch-label { font-size:12px; color:var(--muted); text-align:center; margin-top:6px; display:block; }

.theme-picker-item { display:flex; flex-direction:column; align-items:center; gap:4px; }

/* Admin dashboard background */
body.admin-dashboard {
  background-image: url('../hijab-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: #f7f7f8;
}

body.admin-dashboard::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.78);
  pointer-events: none;
  z-index: -1;
}

/* Admin centered layout: keeps sidebar + content centered on page */
.admin-center { display:flex; gap:20px; align-items:flex-start; max-width:1100px; margin: 0 auto; }
.admin-center > aside { flex: 0 0 260px; }
.admin-center > section { flex: 1 1 0; }

/* Footer and visitor theme picker styles */
.footer { padding: 18px 0; margin-top: 28px; color: var(--text-color); }
.footer .footer-inner { padding: 10px 14px; gap:12px; }
.footer .footer-brand { font-weight:700; }
.theme-picker { gap:12px; }
.theme-picker .theme-swatch { width:44px; height:44px; border-radius:10px; }
.theme-swatch-label { color: var(--muted); }

/* Ensure readable text on surfaces */
.text-contrast { color: var(--text-color); }
.surface, .footer .footer-inner { color: #000; }
.surface h1, .surface h2, .surface h3, .surface h4, .surface h5, .surface h6 { color: #000 !important; }
.surface p { color: #000 !important; }
.surface strong { color: #000 !important; }
.surface li { color: #000 !important; }
.surface label { color: #000 !important; }
.surface .input, .surface .select, .surface textarea { color: #000 !important; background: rgba(255,255,255,0.9); }
.surface .price { color: #000 !important; }
.surface .badge { color: #000 !important; }
.surface td, .surface th { color: #000 !important; }
/* Ensure card/surface text is always dark/readable on light backgrounds */
.card h3, .card h4 { color: #000 !important; }
.card .price { color: #000 !important; }
/* Header & hero text contrast */
header.hero h1 { color: #000 !important; }
header.hero p { color: #333 !important; }
/* Main content headings */
main h1 { color: #000 !important; }
main h2 { color: #000 !important; }
.payment-panel { margin-top:8px; }
.payment-panel .surface { border-radius:12px; }
.payment-radio { width:16px; height:16px; }

@media (max-width:600px) {
  .payment-panels { flex-direction:column; }
}