/* ============================================================
   DigiALM Academy — premium dark theme
   ============================================================ */
:root {
  --bg: #070b16;
  --bg-2: #0a0f1e;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ecf6;
  --text-dim: #94a0bb;
  --violet: #7c6cff;
  --indigo: #5b8cff;
  --cyan: #38d9f5;
  --amber: #ffb454;
  --emerald: #3ddc97;
  --rose: #ff6b8b;
  --grad: linear-gradient(120deg, #7c6cff, #5b8cff 55%, #38d9f5);
  --radius: 18px;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Sora', var(--font-body);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(124, 108, 255, 0.45); }

h1, h2, h3, h4, .display-font { font-family: var(--font-display); }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7de8fa; }
.text-dim { color: var(--text-dim) !important; }

/* ---------- buttons ---------- */
.btn { border-radius: 12px; font-weight: 600; letter-spacing: .01em; }
.btn-primary-grad {
  background: var(--grad);
  border: 0;
  color: #fff;
  box-shadow: 0 8px 24px rgba(91, 140, 255, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary-grad:hover, .btn-primary-grad:focus {
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(91, 140, 255, 0.5);
}
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); color: #fff; }
.btn-outline-light { border-radius: 12px; }

/* ---------- nav ---------- */
.site-nav {
  padding: 14px 0;
  transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}
.site-nav.scrolled {
  background: rgba(7, 11, 22, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  padding: 8px 0;
}
.navbar-toggler { border-color: var(--border); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(124, 108, 255, 0.4);
}
.brand-text { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #fff; }
.brand-text em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav .nav-link { color: var(--text-dim); font-weight: 600; font-size: .92rem; padding: .5rem .85rem; }
.site-nav .nav-link:hover { color: #fff; }
@media (max-width: 991.98px) {
  .site-nav .navbar-collapse {
    background: rgba(10, 15, 30, 0.98);
    border: 1px solid var(--border);
    border-radius: 16px; padding: 14px; margin-top: 10px;
  }
  .site-nav .navbar-collapse .d-flex { flex-direction: column; align-items: stretch !important; }
  .site-nav .navbar-collapse .btn { width: 100%; margin-top: 6px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 150px 0 80px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 108, 255, 0.22), transparent 60%),
    radial-gradient(700px 420px at -10% 20%, rgba(56, 217, 245, 0.12), transparent 55%),
    var(--bg-2);
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124, 108, 255, 0.14);
  border: 1px solid rgba(124, 108, 255, 0.35);
  color: #cdc6ff; font-size: .8rem; font-weight: 700;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 12px var(--emerald); }
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.02em;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--text-dim); font-size: 1.08rem; max-width: 34rem; margin: 18px 0 30px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 38px; }
.hero-stat .num { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; }
.hero-stat .lbl { color: var(--text-dim); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- auth card ---------- */
.auth-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.auth-tabs { display: flex; background: rgba(0, 0, 0, 0.25); padding: 6px; gap: 6px; }
.auth-tab {
  flex: 1; text-align: center; border: 0; background: transparent;
  color: var(--text-dim); font-weight: 700; font-size: .95rem;
  padding: 11px; border-radius: 12px; transition: all .2s ease;
}
.auth-tab.active { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(91, 140, 255, 0.4); }
.auth-body { padding: 28px; }
@media (min-width: 576px) { .auth-body { padding: 34px; } }
.auth-body h2 { font-size: 1.35rem; font-weight: 700; }
.auth-body .sub { color: var(--text-dim); font-size: .9rem; margin-bottom: 20px; }

.form-label { font-size: .83rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.form-control, .form-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: .72rem .95rem;
}
.form-control:focus, .form-select:focus {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--indigo);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.2);
}
.form-control::placeholder { color: #5b6580; }
.form-check-label { color: var(--text-dim); font-size: .86rem; }
.auth-note { font-size: .8rem; color: var(--text-dim); text-align: center; margin-top: 14px; }

/* ---------- flashes / alerts ---------- */
.flash-wrap { position: fixed; top: 84px; right: 18px; z-index: 2000; max-width: 92vw; }
.flash {
  background: rgba(16, 22, 40, 0.96);
  border: 1px solid var(--border);
  border-left: 4px solid var(--indigo);
  color: var(--text);
  border-radius: 14px; padding: 13px 18px;
  margin-bottom: 10px; font-size: .92rem; font-weight: 600;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: slideIn .25s ease;
}
.flash.error { border-left-color: var(--rose); }
.flash.success { border-left-color: var(--emerald); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }

/* ---------- sections ---------- */
.section { padding: 84px 0 40px; position: relative; }
.section-head { margin-bottom: 34px; }
.section-eyebrow {
  font-size: .78rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 10px; display: inline-block;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; }
.section-sub { color: var(--text-dim); max-width: 40rem; margin-top: 10px; }
.eyebrow-amber { color: var(--amber); }
.eyebrow-emerald { color: var(--emerald); }
.eyebrow-violet { color: var(--violet); }

/* ---------- course cards ---------- */
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  height: 100%;
}
.course-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
.course-thumb {
  height: 148px; position: relative;
  display: grid; place-items: center;
  font-size: 3rem; color: rgba(255, 255, 255, 0.9);
}
.accent-amber .course-thumb { background: linear-gradient(135deg, #2a1c07, #8a5a1d); }
.accent-emerald .course-thumb { background: linear-gradient(135deg, #062019, #12714e); }
.accent-violet .course-thumb { background: linear-gradient(135deg, #17102e, #4c3bb8); }
.course-thumb::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(300px 120px at 70% 0%, rgba(255,255,255,.18), transparent 60%);
}
.course-thumb i { filter: drop-shadow(0 8px 18px rgba(0,0,0,.4)); position: relative; }
.course-cat, .course-off, .course-owned {
  position: absolute; font-size: .68rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.course-cat { top: 12px; left: 12px; background: rgba(0, 0, 0, 0.45); color: #fff; backdrop-filter: blur(6px); }
.course-off { top: 12px; right: 12px; background: var(--rose); color: #fff; }
.course-owned { bottom: 12px; right: 12px; background: var(--emerald); color: #04160f; }
.course-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.course-title { font-size: 1.08rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.course-title a { color: var(--text); }
.course-title a:hover { color: #fff; }
.course-tagline { color: var(--text-dim); font-size: .88rem; flex: 1; }
.course-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  color: var(--text-dim); font-size: .8rem; font-weight: 600;
  padding: 12px 0; border-top: 1px solid var(--border);
}
.course-meta i { margin-right: 5px; color: var(--indigo); }
.course-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price-now { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.price-mrp { color: var(--text-dim); font-size: .85rem; margin-left: 7px; }

/* ---------- why strip ---------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.why-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; height: 100%;
}
.why-card .ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(124, 108, 255, 0.16); color: var(--violet); font-size: 1.3rem; margin-bottom: 16px;
}
.why-card h3 { font-size: 1.02rem; font-weight: 700; }
.why-card p { color: var(--text-dim); font-size: .88rem; margin: 0; }

/* ---------- steps ---------- */
.step-card { text-align: center; padding: 12px; }
.step-num {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 16px;
  display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem;
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 26px rgba(91, 140, 255, 0.35);
}
.step-card h3 { font-size: 1rem; font-weight: 700; }
.step-card p { color: var(--text-dim); font-size: .86rem; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 60px 0 30px; margin-top: 70px;
}
.footer-h { font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: var(--text-dim); font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-hr { border-color: var(--border); margin: 34px 0 20px; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: 130px 0 50px; background: radial-gradient(700px 320px at 80% -20%, rgba(124,108,255,.18), transparent 60%), var(--bg-2); }
.page-hero h1 { font-weight: 800; letter-spacing: -0.02em; }

/* ---------- dashboard / panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; height: 100%;
}
.stat-card .num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; }
.stat-card .lbl { color: var(--text-dim); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.table-dark-site { --bs-table-bg: transparent; --bs-table-border-color: var(--border); color: var(--text); }
.table-dark-site th { color: var(--text-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.badge-status { font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.badge-paid { background: rgba(61, 220, 151, 0.15); color: var(--emerald); }
.badge-created { background: rgba(255, 180, 84, 0.15); color: var(--amber); }
.badge-failed, .badge-draft { background: rgba(255, 107, 139, 0.15); color: var(--rose); }
.badge-published { background: rgba(56, 217, 245, 0.15); color: var(--cyan); }
.badge-archived { background: rgba(148, 160, 187, 0.15); color: var(--text-dim); }

/* ---------- admin ---------- */
.admin-shell { min-height: 100vh; }
.admin-side {
  background: var(--bg-2); border-right: 1px solid var(--border);
  padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.admin-side .nav-link {
  color: var(--text-dim); font-weight: 600; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 4px; font-size: .92rem;
}
.admin-side .nav-link:hover { color: #fff; background: var(--surface); }
.admin-side .nav-link.active { color: #fff; background: rgba(124, 108, 255, 0.18); }
.admin-side .nav-link i { margin-right: 9px; }
.admin-main { padding: 30px; }
@media (max-width: 991.98px) {
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-main { padding: 20px; }
}

/* ---------- curriculum ---------- */
.curr-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.curr-item:last-child { border-bottom: 0; }
.curr-num {
  flex: 0 0 32px; height: 32px; border-radius: 10px;
  background: rgba(124, 108, 255, 0.15); color: var(--violet);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.locked-row { opacity: .55; }

/* ---------- misc ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state i { font-size: 2.6rem; display: block; margin-bottom: 14px; color: var(--violet); }
.toast-zone { position: fixed; bottom: 20px; right: 20px; z-index: 3000; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flash { animation: none; }
  .course-card, .btn { transition: none; }
}
