:root {
  --primary: #FF7A59;
  --secondary: #2D2A6E;
  --accent: #FFC857;
  --bg: #FFFFFF;
  --radius: 14px;
}

* { font-family: 'Tajawal', 'Segoe UI', sans-serif; }

body { background: #F7F7FB; color: #22223B; }

/* ---------- Public site ---------- */
.site-navbar { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.site-navbar .nav-link { font-weight: 500; color: #22223B; }
.site-navbar .nav-link:hover { color: var(--primary); }
.site-navbar .navbar-brand { color: var(--secondary); font-size: 1.3rem; }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 85%, black); border-color: transparent; }
.btn-outline-secondary { border-color: var(--secondary); color: var(--secondary); }
.btn-outline-secondary:hover { background: var(--secondary); border-color: var(--secondary); }
a { color: var(--secondary); text-decoration: none; }

.hero-section {
  background: linear-gradient(135deg, color-mix(in srgb, var(--secondary) 92%, black) 0%, var(--secondary) 60%, var(--primary) 140%);
  color: #fff; padding: 90px 0 110px; position: relative; overflow: hidden;
}
.hero-section h1 { font-weight: 900; font-size: 2.6rem; }
.hero-section .btn-accent { background: var(--accent); color: #22223B; border: none; font-weight: 700; }

.card-program, .card-feature, .card-plan, .card-workshop {
  border: none; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease; height: 100%;
}
.card-program:hover, .card-plan:hover, .card-workshop:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.icon-circle {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--primary) 15%, white); color: var(--primary); font-size: 1.4rem;
}
.section-title { font-weight: 900; color: var(--secondary); }
.badge-price { background: var(--accent); color: #22223B; font-weight: 700; }

.site-footer { background: var(--secondary); color: #e8e8f5; }
.site-footer a { color: #cfcff0; }
.site-footer a:hover { color: #fff; }

/* ---------- App shell (portal + admin) ---------- */
.app-shell { min-height: 100vh; }
.app-sidebar {
  width: 250px; background: var(--secondary); color: #fff; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { padding: 20px 18px; font-weight: 900; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-nav { display: flex; flex-direction: column; padding: 12px; gap: 2px; }
.sidebar-nav a {
  color: #d8d8f0; padding: 10px 14px; border-radius: 10px; font-size: .92rem; display: flex; align-items: center; gap: 10px;
}
.sidebar-nav a i { width: 18px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: var(--primary); color: #fff; font-weight: 700; }
.sidebar-nav a .badge { margin-right: auto; }

.app-main { flex: 1; min-width: 0; }
.app-topbar { background: #fff; padding: 14px 24px; box-shadow: 0 2px 10px rgba(0,0,0,.04); position: sticky; top: 0; z-index: 10; }
.app-content { padding: 24px; }

.stat-card { border-radius: var(--radius); border: none; box-shadow: 0 4px 18px rgba(0,0,0,.05); }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 900; color: var(--secondary); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }

.table-card { border-radius: var(--radius); border: none; box-shadow: 0 4px 18px rgba(0,0,0,.05); }
.table thead th { background: #F7F7FB; font-weight: 700; color: var(--secondary); border: none; font-size: .85rem; }

.badge-info { background: #E0ECFF; color: #1D4ED8; }
.badge-warning { background: #FFF3CD; color: #92700A; }
.badge-success { background: #D8F5E3; color: #147A45; }
.badge-danger { background: #FDE0E0; color: #B91C1C; }
.badge-muted { background: #ECECEC; color: #666; }

.qr-scan-box { max-width: 420px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.qr-result-flash { animation: flashResult .6s ease; }
@keyframes flashResult { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }

@media (max-width: 991px) {
  .app-sidebar { position: fixed; right: -260px; z-index: 1050; transition: right .25s ease; }
  .app-sidebar.show { right: 0; }
}

@media print {
  .app-sidebar, .app-topbar, .no-print { display: none !important; }
  .app-content { padding: 0; }
}
