:root {
  --adam-red: #aa2419;
  --adam-red-dark: #8c1d14;
  --ink: #1c1c1e;
  --muted: #6b6b70;
  --line: #e8e8ea;
  --soft: #faf7f5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", Arial, sans-serif;
  background: var(--soft);
  color: var(--ink);
  line-height: 1.7;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 18px 64px; }
.topbar {
  background: var(--adam-red);
  color: #fff;
  padding: 14px 0;
}
.topbar .wrap { padding-bottom: 0; display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 700; font-size: 20px; }
.brand small { display: block; font-weight: 400; font-size: 12px; opacity: .85; }
.logo-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--adam-red);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; flex: none;
}
nav.site-nav {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 8px 0; margin-bottom: 24px;
}
nav.site-nav .wrap { padding-bottom: 0; display: flex; gap: 16px; flex-wrap: wrap; }
nav.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 2px; }
nav.site-nav a.active, nav.site-nav a:hover { color: var(--adam-red); border-bottom: 2px solid var(--adam-red); }
h1 { font-size: 26px; margin: 18px 0 6px; }
h2 { font-size: 20px; margin: 34px 0 10px; color: var(--adam-red-dark); }
p.lead { color: var(--muted); margin: 0 0 8px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; margin: 14px 0;
}
.module {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin: 12px 0; background: #fff;
  transition: box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.module.ready { border-right: 4px solid var(--adam-red); }
.module.ready:hover { background: #fdf3f4; box-shadow: 0 6px 18px rgba(170,36,25,.10); transform: translateY(-1px); }
.module.soon { opacity: .65; }
.module .m-name { font-weight: 700; }
.module .m-detail { font-size: 13px; color: var(--muted); }
.badge {
  display: inline-block; font-size: 11px; border-radius: 999px;
  padding: 2px 10px; margin-inline-start: 8px;
  background: #fdecea; color: var(--adam-red); font-weight: 700;
}
.badge.gray { background: #eee; color: var(--muted); }
.badge.green { background: #e8f6ec; color: #146c2e; }
ul.points li { margin: 8px 0; }
.note { font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 12px; }
.video-slot {
  border: 2px dashed var(--line); border-radius: 14px; background: #fff;
  padding: 34px 20px; text-align: center; color: var(--muted);
}
.video-slot .play {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--adam-red); color: #fff; font-size: 22px;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.q-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: #fff; }
.q-title { font-weight: 700; margin-bottom: 8px; }
.q-opt {
  display: block; width: 100%; text-align: right; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--soft);
  padding: 10px 14px; margin: 6px 0; cursor: pointer;
}
.q-opt:hover { border-color: var(--adam-red); }
.q-opt.selected { background: var(--adam-red); color: #fff; border-color: var(--adam-red); }
.result-box {
  border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-weight: 700;
}
.result-box.ok { background: #e8f6ec; color: #146c2e; }
.result-box.warn { background: #fff4e5; color: #8a4b00; }
.chat-box { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.chat-log { padding: 16px; min-height: 120px; }
.msg { max-width: 85%; border-radius: 14px; padding: 10px 14px; margin: 8px 0; white-space: pre-wrap; }
.msg.customer { background: #f0f0f2; margin-inline-start: 0; }
.msg.me { background: var(--adam-red); color: #fff; margin-inline-start: auto; }
.msg.system { background: #fff4e5; color: #8a4b00; max-width: 100%; font-size: 14px; }
.chat-input { display: flex; gap: 8px; border-top: 1px solid var(--line); padding: 10px; }
.chat-input textarea {
  flex: 1; font: inherit; resize: none; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-height: 46px;
}
.btn {
  font: inherit; font-weight: 700; border: none; border-radius: 10px;
  background: var(--adam-red); color: #fff; padding: 10px 18px; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--adam-red-dark); }
.btn.secondary { background: #fff; color: var(--adam-red); border: 1px solid var(--adam-red); }
.rubric { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 12px 0; }
.rubric li { margin: 6px 0; }
.self-check { display: flex; gap: 8px; align-items: flex-start; }
.self-check input { margin-top: 6px; }
footer { margin-top: 40px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.form-field { margin: 12px 0; }
.form-field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.form-field input {
  width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff;
}
.form-error { background: #fdecea; color: var(--adam-red); border-radius: 10px; padding: 10px 14px; margin: 10px 0; font-size: 14px; display: none; }
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-size: 30px; }
.user-chip { margin-inline-start: auto; font-size: 13px; color: #fff; font-weight: 700; background: rgba(255,255,255,.2); padding: 4px 14px; border-radius: 999px; }

.brand-logo { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.card, .module, .q-block, .chat-box { box-shadow: 0 1px 3px rgba(28,28,30,.06); }
.hero .brand-hero-logo { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 4px 14px rgba(170,36,25,.25); margin-bottom: 14px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 14px; position: sticky; top: 0; background: var(--soft); padding: 10px 0; z-index: 5; }
.tabs button { font: inherit; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.tabs button.active { background: var(--adam-red); border-color: var(--adam-red); color: #fff; }
.tab-section { display: none; }
.tab-section.active { display: block; }

/* ===== Udemy-inspired course-platform polish (white/red, Adam brand) ===== */
.topbar { background: linear-gradient(135deg, var(--adam-red) 0%, var(--adam-red-dark) 100%); box-shadow: 0 2px 10px rgba(140,29,20,.3); }
.brand { font-size: 17px; letter-spacing: .3px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 18px 64px; }

/* ===== Minimal polished entry page (no course details outside) ===== */
.entry-main {
  min-height: calc(100vh - 210px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 18px 56px;
  background:
    radial-gradient(700px 340px at 50% 12%, rgba(170,36,25,.09), transparent 65%),
    var(--soft);
}
.entry-main .brand-hero-logo {
  width: 110px; height: 110px; border-radius: 28px;
  box-shadow: 0 14px 34px rgba(170,36,25,.28);
  margin-bottom: 18px;
}
.entry-name { font-size: 26px; font-weight: 800; letter-spacing: .3px; color: var(--adam-red-dark); }
.entry-ctas { justify-content: center; margin-top: 30px; }

.hero-band {
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(170,36,25,.10), transparent 60%),
    radial-gradient(700px 300px at 10% 110%, rgba(170,36,25,.08), transparent 60%),
    var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 46px 0 54px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-bottom: 0; }
.hero-kicker { display: inline-block; background: #fdecea; color: var(--adam-red); font-weight: 800; font-size: 13px; border-radius: 999px; padding: 5px 14px; margin-bottom: 14px; }
.hero-text h1 { font-size: 40px; line-height: 1.35; margin: 0 0 12px; letter-spacing: -.2px; }
.hero-text .lead { font-size: 17px; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn-lg { padding: 13px 30px; font-size: 16px; border-radius: 12px; }
.btn.ghost { background: #fff; color: var(--adam-red); border: 1.5px solid var(--adam-red); }
.btn.ghost:hover { background: #fdf3f4; }
.hero-stats { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 26px; color: var(--adam-red); line-height: 1.2; }
.hero-stats .stat span { font-size: 13px; color: var(--muted); }
.hero-visual { position: relative; }
.hero-img { width: 100%; border-radius: 18px; box-shadow: 0 16px 40px rgba(28,28,30,.16); display: block; }
.hero-float {
  position: absolute; bottom: 18px; inset-inline-start: -14px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 26px rgba(28,28,30,.16); padding: 10px 16px;
  display: flex; align-items: center; gap: 10px; max-width: 300px;
}
.hero-float b { display: block; font-size: 13px; color: #146c2e; }
.hero-float span:last-child { font-size: 12px; color: var(--muted); }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: #1e8e3e; flex: none; box-shadow: 0 0 0 4px rgba(30,142,62,.18); }

.section-title { text-align: center; font-size: 26px; margin: 48px 0 6px; color: var(--ink); }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 16px; margin: 12px 0 8px; }
.feature { text-align: center; padding: 24px 16px; margin: 0; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(28,28,30,.09); }
.feature .f-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; background: #fdecea; display: flex; align-items: center; justify-content: center; font-size: 25px; }
.feature b { display: block; margin-bottom: 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); }

.cta-band { background: linear-gradient(135deg, var(--adam-red) 0%, var(--adam-red-dark) 100%); margin-top: 52px; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 38px; padding-bottom: 38px; flex-wrap: wrap; }
.cta-in h2 { color: #fff; margin: 0 0 4px; font-size: 24px; }
.cta-in p { color: rgba(255,255,255,.85); margin: 0; font-size: 14px; }
.cta-btn { background: #fff; color: var(--adam-red); font-weight: 800; }
.cta-btn:hover { background: #fdf3f4; }
.site-footer { border-top: 1px solid var(--line); padding: 22px 0; margin-top: 0; }
.site-footer .wrap-wide { padding-bottom: 0; color: var(--muted); font-size: 13px; }
.site-footer-in { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding: 22px 0 0; margin-top: 36px; }
.footer-credit { display: block; font-size: 12px; font-weight: 700; color: #b91c1c; margin-top: 6px; text-align: center; }

.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 0; }
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-nav { display: flex; align-items: center; gap: 18px; }
.topbar-nav a { color: rgba(255,255,255,.92); text-decoration: none; font-size: 14px; font-weight: 700; }
.topbar-nav a:hover { color: #fff; text-decoration: underline; }
.topbar-nav .topbar-cta { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 6px 16px; }
.topbar-nav .topbar-cta:hover { background: rgba(255,255,255,.28); text-decoration: none; }

.welcome {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  border-right: 5px solid var(--adam-red);
  padding: 20px 24px; margin: 26px 0 20px;
  box-shadow: 0 1px 3px rgba(28,28,30,.06);
}
.welcome h1 { margin: 0 0 4px; font-size: 24px; }
.welcome .lead { margin: 0; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 6px; }
.course-card {
  display: block; text-decoration: none; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(28,28,30,.06); transition: transform .15s, box-shadow .15s;
}
a.course-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(28,28,30,.13); }
.course-card .thumb { position: relative; aspect-ratio: 16/9; background: #f3e9e7; }
.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card .thumb-plain {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6e1810 0%, var(--adam-red) 60%, #c14237 100%);
  color: rgba(255,255,255,.30); font-size: 56px; font-weight: 800;
}
.thumb-badge { position: absolute; top: 12px; inset-inline-start: 12px; box-shadow: 0 2px 8px rgba(28,28,30,.18); }
.course-body { padding: 16px 18px 14px; }
.course-body .m-name { font-weight: 800; line-height: 1.5; font-size: 15.5px; }
.course-body .m-detail { font-size: 13px; color: var(--muted); margin-top: 5px; }
.m-meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px -18px -14px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: #fff; }
.course-card.soon { opacity: .7; }

.video-list { display: grid; gap: 16px; }
.video-card { padding: 16px; }
.video-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; }
.video-frame video { width: 100%; height: 100%; display: block; }
.watch-badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 12px; background: #eee; color: var(--muted); }
.watch-badge.done { background: #e8f6ec; color: #146c2e; }
.watch-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.watch-bar { flex: 1; height: 8px; border-radius: 999px; background: #eee; overflow: hidden; }
.watch-fill { height: 100%; width: 0; background: var(--adam-red); border-radius: 999px; transition: width .3s; }
.watch-label { font-size: 12px; color: var(--muted); min-width: 36px; text-align: center; }

.pdf-frame { width: 100%; height: 65vh; min-height: 420px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pdf-links { display: flex; gap: 10px; margin: 12px 0 0; }

.lock-card { text-align: center; padding: 34px 20px; }
.lock-icon { font-size: 30px; margin-bottom: 8px; }
.tabs button.locked { opacity: .75; }

.quiz-card .q-title { font-size: 17px; margin: 12px 0; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.timer-label { font-weight: 800; color: var(--adam-red); font-size: 15px; }
.timer-bar { height: 8px; border-radius: 999px; background: #eee; overflow: hidden; margin-top: 8px; }
.timer-fill { height: 100%; width: 100%; background: var(--adam-red); transition: width .25s linear; }
.timer-fill.low { background: #d97706; }
.q-opt.readonly { cursor: default; }
.q-opt.readonly:hover { border-color: var(--line); }
.q-opt.correct { background: #e8f6ec; border-color: #146c2e; color: #146c2e; font-weight: 700; }
.q-opt.wrong { background: #fdecea; border-color: var(--adam-red); color: var(--adam-red); }
.result-box.bad { background: #fdecea; color: var(--adam-red); }

.rubric li.crit { display: flex; gap: 8px; align-items: flex-start; list-style: none; }
.rubric ul { padding-inline-start: 4px; }
.rubric li.crit input { margin-top: 6px; accent-color: #146c2e; }
.rubric li.crit.unmet input { accent-color: var(--adam-red); }
.rubric li.crit.met span { color: #146c2e; }
.rubric li.crit.unmet span { color: var(--adam-red); }
.msg.pending { opacity: .85; }
.note.bonus-met { color: #146c2e; }

.search-row { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.search-input { flex: 1 1 240px; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: #fff; }
.table-card { overflow-x: auto; padding: 12px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.items-table th, .items-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.items-table th { color: var(--adam-red-dark); position: sticky; top: 0; background: #fff; }
.items-table tr:hover td { background: var(--soft); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-text h1 { font-size: 30px; }
  .hero-float { inset-inline-start: 8px; }
}
@media (max-width: 640px) {
  .hero-band { padding: 30px 0 38px; }
  .hero-text h1 { font-size: 26px; }
  .hero-stats { gap: 18px; }
  .topbar-in { flex-wrap: wrap; row-gap: 6px; padding-top: 4px; padding-bottom: 4px; }
  .topbar .brand { font-size: 13px; }
  .user-chip { font-size: 11px; padding: 3px 10px; }
  .topbar-nav { gap: 12px; margin-inline-start: auto; }
  .topbar-nav a:not(.topbar-cta):not(#logout-btn) { display: none; }
  .cta-in { justify-content: center; text-align: center; }
  .pdf-frame { height: 55vh; min-height: 320px; }
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.m-progress { margin-top: 10px; }
.pbar { height: 6px; border-radius: 999px; background: #f0e4e2; overflow: hidden; }
.pfill { height: 100%; background: var(--adam-red); border-radius: 999px; transition: width .4s; }
.ptext { font-size: 12px; color: var(--muted); margin-top: 6px; }


/* ---- Udemy-like lesson layout: curriculum sidebar + content pane ---- */
.m-meta .mi { width: 14px; height: 14px; vertical-align: -2px; }
.lesson-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; margin-top: 16px; }
.curr-side { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; position: sticky; top: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.curr-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: start; font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); background: none; border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.curr-item:hover { background: var(--soft); }
.curr-item.active { background: #fdecea; color: var(--adam-red); }
.curr-item.locked { color: var(--muted); }
.curr-item .curr-label { flex: 1; }
.icn { width: 16px; height: 16px; display: inline-flex; flex: none; }
.icn svg { width: 100%; height: 100%; }
.icn-play { color: var(--adam-red); }
.icn-done { color: #1e8e3e; }
.curr-item.locked .icn { color: var(--muted); }
@media (max-width: 800px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .curr-side { position: static; display: flex; overflow-x: auto; gap: 6px; padding: 8px; }
  .curr-item { width: auto; white-space: nowrap; }
}


/* ---- admin panel ---- */
.admin-link { color: #fff; font-weight: 700; text-decoration: underline; margin-inline-start: 12px; }
table.grades { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grades th, table.grades td { padding: 8px 10px; text-align: start; border-bottom: 1px solid var(--line); }
table.grades th { color: var(--muted); font-weight: 700; }
table.grades tr:last-child td { border-bottom: 0; }


/* ---- landing exterior (imagery) ---- */
.entry-hero {
  background: linear-gradient(160deg, #b32b1e 0%, var(--adam-red) 45%, #7e160c 100%);
  padding: 84px 20px 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.entry-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}
.entry-hero-inner { position: relative; }
.entry-hero .brand-hero-logo {
  width: 104px; height: 104px; border-radius: 50%;
  background: #fff; padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  margin-bottom: 18px;
}
.entry-hero .entry-name { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.25); font-size: 30px; }
.entry-hero .entry-ctas { margin-top: 34px; }
.btn.ghost.light { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); }
.btn.ghost.light:hover { background: rgba(255,255,255,.12); }
.entry-strip { margin-top: -44px; padding: 0 20px; }
.entry-photo {
  display: block; width: 100%; max-width: 980px; margin: 0 auto;
  border-radius: 20px; box-shadow: 0 20px 50px rgba(28,28,30,.22);
  border: 5px solid #fff; object-fit: cover; max-height: 340px;
}
@media (max-width: 640px) {
  .entry-hero { padding: 56px 16px 72px; }
  .entry-hero .entry-name { font-size: 23px; }
  .entry-photo { max-height: 190px; }
}
.entry-hero .btn:not(.ghost) { background: #fff; color: var(--adam-red); border-color: #fff; }
.entry-hero .btn:not(.ghost):hover { background: #fdecea; }

/* ---- Udemy-like exterior (reference-led) ---- */
.topbar-light { background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar-light .brand { color: var(--adam-red-dark); }
.topbar-light .brand-logo { box-shadow: none; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-auth { display: flex; align-items: center; gap: 14px; }
.topbar-auth .auth-login { font-weight: 700; color: var(--ink); text-decoration: none; }
.topbar-auth .auth-login:hover { color: var(--adam-red); }
.btn-sm { padding: 8px 18px; font-size: 14px; border-radius: 8px; }

.ud-hero {
  background:
    linear-gradient(100deg, rgba(126,22,12,.88) 0%, rgba(170,36,25,.72) 38%, rgba(170,36,25,.30) 70%, rgba(170,36,25,.18) 100%),
    var(--adam-red);
  min-height: 480px;
  display: flex;
  align-items: center;
}
.ud-hero-in { width: 100%; }
/* Approved lifestyle hero (user-approved 2026-11-23): Saudi pharmacist, candid,
   calm negative space on the image's left side carries the white card. */
.ud-hero-img {
  background:
    linear-gradient(270deg, rgba(20,8,6,.08) 0%, rgba(20,8,6,0) 42%),
    url("adam-hero.png?v=1") center / cover no-repeat,
    var(--soft);
}
.ud-hero-img .ud-hero-in { display: flex; justify-content: flex-end; }
.ud-card .brand-hero-logo { width: 84px; height: 84px; border-radius: 50%; background: #fff; padding: 5px; box-shadow: 0 4px 14px rgba(170,36,25,.22); margin-bottom: 14px; }
.ud-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(20,8,6,.35);
  max-width: 460px;
  padding: 34px 34px 30px;
}
.ud-kicker {
  display: inline-block; background: #fdecea; color: var(--adam-red);
  font-weight: 800; font-size: 13px; border-radius: 999px; padding: 5px 14px; margin-bottom: 14px;
}
.ud-card h1 { font-size: 30px; letter-spacing: -.2px; margin: 0 0 10px; color: var(--ink); }
.ud-card .lead { font-size: 16px; margin: 0 0 8px; }
.ud-card .hero-ctas { margin-top: 20px; }

.ud-feats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  padding-top: 40px; padding-bottom: 48px;
}
.ud-feat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.ud-feat b { display: block; font-size: 16px; margin: 10px 0 4px; }
.ud-feat p { margin: 0; font-size: 13.5px; color: var(--muted); }
.ud-icn {
  width: 38px; height: 38px; border-radius: 10px; background: #fdecea; color: var(--adam-red);
  display: inline-flex; align-items: center; justify-content: center; padding: 8px;
}
.img-credit { display: block; font-size: 11.5px; opacity: .75; margin-top: 4px; }
.img-credit a { color: inherit; }

@media (max-width: 760px) {
  .ud-hero { min-height: 560px; align-items: flex-end; padding-bottom: 22px;
    background:
      linear-gradient(180deg, rgba(126,22,12,.35) 0%, rgba(126,22,12,.90) 78%),
      var(--adam-red);
  }
  .ud-hero-img {
    background:
      linear-gradient(180deg, rgba(20,8,6,0) 32%, rgba(20,8,6,.45) 100%),
      url("adam-hero.png?v=1") 74% center / cover no-repeat,
      var(--soft);
  }
  .ud-card { max-width: none; padding: 24px 22px; }
  .ud-card h1 { font-size: 24px; }
  .ud-feats { grid-template-columns: 1fr; padding-top: 26px; padding-bottom: 34px; }
  .topbar-light .brand { font-size: 14px; }
}


/* bounded fixes: logo card + mobile crop */
.ud-card { text-align: center; }
.ud-card .brand-hero-logo { width: 84px; height: 84px; border-radius: 50%; background: #fff; padding: 5px; box-shadow: 0 4px 14px rgba(170,36,25,.22); margin-bottom: 14px; }
.ud-card h1 { font-size: 26px; }
.ud-card .hero-ctas { justify-content: center; }
@media (max-width: 760px) {
  .ud-hero { min-height: 0; align-items: stretch; padding-bottom: 0; padding-top: 200px;
    background:
      linear-gradient(180deg, rgba(170,36,25,.05) 0%, rgba(126,22,12,.35) 60%, rgba(126,22,12,.55) 100%),
      var(--adam-red);
  }
  .ud-hero-in { padding: 0 16px 26px; }
}

/* === Coursera-style split hero (replaces photo-overlay hero) === */
.ud-hero {
  background:
    radial-gradient(900px 480px at 88% -10%, #fdecea 0%, rgba(253,236,234,0) 60%),
    #fff;
  min-height: 0;
  padding: 56px 0 64px;
  display: flex;
  align-items: center;
}
.ud-hero-in {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  width: 100%;
  padding: 0;
}
.ud-copy { text-align: right; padding: 0 8px; }
.ud-copy .brand-hero-logo {
  width: 76px; height: 76px; border-radius: 20px; background: #fff;
  padding: 6px; box-shadow: 0 10px 30px rgba(170,36,25,.18);
  margin-bottom: 22px;
}
.ud-copy h1 {
  font-size: 46px; line-height: 1.15; letter-spacing: -.5px;
  margin: 0; color: var(--ink); font-weight: 800;
}
.ud-copy .hero-ctas { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.ud-media { position: relative; }
.ud-media::before {
  content: ""; position: absolute; z-index: 0;
  width: 62%; height: 58%; left: -26px; bottom: -26px;
  background: var(--adam-red); border-radius: 28px;
}
.ud-media::after {
  content: ""; position: absolute; z-index: 0;
  width: 120px; height: 120px; right: -22px; top: -22px;
  background: radial-gradient(circle, #f3c1bb 2.6px, transparent 2.6px) 0 0 / 22px 22px;
}
.ud-media-frame {
  position: relative; z-index: 1;
  border-radius: 28px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(60,12,8,.22);
  aspect-ratio: 4 / 4.6;
}
.ud-media-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; display: block; }

@media (max-width: 900px) {
  .ud-hero-in { grid-template-columns: 1fr .9fr; gap: 32px; }
  .ud-copy h1 { font-size: 34px; }
}
@media (max-width: 760px) {
  .ud-hero { padding: 28px 0 40px; }
  .ud-hero-in { grid-template-columns: 1fr; gap: 30px; padding: 0; }
  .ud-media { order: -1; padding: 0 6px; }
  .ud-media-frame { aspect-ratio: 16 / 11; border-radius: 20px; }
  .ud-media::before { width: 55%; height: 45%; left: -14px; bottom: -14px; border-radius: 20px; }
  .ud-copy { text-align: center; padding: 0 6px; }
  .ud-copy .brand-hero-logo { margin: 0 auto 16px; width: 64px; height: 64px; border-radius: 16px; }
  .ud-copy h1 { font-size: 26px; }
  .ud-copy .hero-ctas { justify-content: center; margin-top: 22px; }
  .ud-copy .hero-ctas .btn { flex: 1 1 auto; text-align: center; }
}

/* landing overflow guard */
body { overflow-x: hidden; }

/* === Final landing: chic + simple, brand-only, no photos (user 08:16) === */
.ud-hero {
  background:
    radial-gradient(720px 360px at 50% -12%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(circle, rgba(255,255,255,.10) 1.6px, transparent 1.6px) 0 0 / 26px 26px,
    linear-gradient(155deg, #c22e22 0%, var(--adam-red) 45%, #7e160c 100%);
  min-height: 66vh;
  padding: 0;
  display: flex;
  align-items: center;
}
.ud-hero-in { display: block; padding: 0; }
.ud-copy { text-align: center; padding: 40px 16px; max-width: 720px; margin: 0 auto; }
.ud-copy .brand-hero-logo {
  width: 92px; height: 92px; border-radius: 50%;
  background: #fff; padding: 7px; margin: 0 auto 22px;
  box-shadow: 0 14px 36px rgba(40,6,3,.35);
}
.ud-copy h1 {
  color: #fff; font-size: 42px; line-height: 1.2; letter-spacing: -.3px;
  margin: 0; font-weight: 800;
  text-shadow: 0 2px 14px rgba(60,10,6,.25);
}
.ud-copy .hero-ctas { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-on-red { background: #fff; color: var(--adam-red); box-shadow: 0 10px 26px rgba(40,6,3,.28); }
.btn-on-red:hover { background: #fdecea; }
.ud-copy .btn-lg { min-width: 170px; text-align: center; }
@media (max-width: 760px) {
  .ud-hero { min-height: 72vh; }
  .ud-copy h1 { font-size: 28px; }
  .ud-copy .brand-hero-logo { width: 76px; height: 76px; margin-bottom: 18px; }
  .ud-copy .hero-ctas { flex-direction: column; align-items: stretch; margin-top: 26px; }
  .ud-copy .btn-lg { width: 100%; }
}

/* admin page header (scoped; other pages use topbar-light/topbar-in) */
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 22px; }
.admin-topbar .brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.admin-topbar img.logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 3px; }
.admin-topbar .user-chip { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 700; }

/* admin content manager */
.sub-h { font-size: 15px; margin: 18px 0 8px; }
.cform { display: grid; gap: 8px; margin: 8px 0; }
.cform input[type="text"], .cmod input[type="text"] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.cmod { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; display: grid; gap: 8px; }
.cmod-head { display: flex; align-items: center; gap: 10px; }
.cmod-head .m-title { font-weight: 700; }
.cmod-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmod-row .m-pdf { max-width: 280px; }
.cvid { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.cvid .v-title { max-width: 260px; }
.cvid .v-drive { max-width: 300px; }
.btn.danger { background: #fff; color: var(--adam-red); border: 1.5px solid var(--adam-red); }
.btn.danger:hover { background: #fdf3f4; }
.badge.gray { background: #eee; color: #555; }

/* admin link in trainee topbar */
.topbar .admin-link { color: #fff; text-decoration: none; font-size: 13.5px; font-weight: 700; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 6px 16px; margin-inline-start: auto; order: -1; }

/* login divider for admin entry */
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Mobile: admin tables scroll inside a bounded wrapper, never the page */
.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-scroll table.grades { min-width: 560px; }

/* Topic subsections inside a module (two-level Classroom hierarchy) */
.curr-topic { padding: 12px 12px 4px; font-weight: 700; font-size: 13px; color: #7a1d14; border-top: 1px solid #f0e6e4; margin-top: 8px; text-align: right; }
.topic-h { margin: 18px 0 8px; color: #AA2419; font-size: 16px; }

/* Topic-focused navigation */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.topic-card { display: flex; flex-direction: column; gap: 6px; text-align: right; padding: 16px; border: 1px solid #f0e0dd; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.topic-card:hover, .topic-card:focus-visible { border-color: #AA2419; box-shadow: 0 2px 10px rgba(170,36,25,.12); outline: none; }
.topic-card b { font-size: 15px; }
.topic-counts { font-size: 12.5px; color: #8a5550; }
.topic-playlist { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 18px; }
.topic-back-row { margin: 0 0 8px; }
@media (max-width: 640px) { .topic-grid { grid-template-columns: 1fr; } }

/* === Homepage lifestyle hero (user-approved 2026-11-23 14:19, supersedes brand-only landing) === */
.ud-hero.ud-hero-img {
  background:
    linear-gradient(270deg, rgba(20,8,6,.10) 0%, rgba(20,8,6,0) 42%),
    url("adam-hero.png?v=1") center / cover no-repeat,
    var(--soft);
  min-height: 520px;
  padding: 0;
  display: flex;
  align-items: center;
}
.ud-hero.ud-hero-img .ud-hero-in { display: flex; justify-content: flex-end; width: 100%; }
.ud-hero.ud-hero-img .ud-card {
  background: rgba(255,255,255,.96);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(20,8,6,.25);
  max-width: 440px;
  padding: 32px 32px 28px;
  text-align: center;
}
.ud-hero.ud-hero-img .brand-hero-logo {
  width: 84px; height: 84px; border-radius: 50%;
  background: #fff; padding: 5px;
  box-shadow: 0 4px 14px rgba(170,36,25,.22);
  margin: 0 auto 14px; display: block;
}
.ud-hero.ud-hero-img .ud-card h1 { font-size: 28px; margin: 0 0 8px; color: var(--ink); letter-spacing: -.2px; }
.ud-hero.ud-hero-img .ud-card .lead { font-size: 15px; margin: 0; }
.ud-hero.ud-hero-img .hero-ctas { margin-top: 22px; justify-content: center; }
@media (max-width: 760px) {
  .ud-hero.ud-hero-img {
    min-height: 560px;
    align-items: flex-end;
    padding-bottom: 22px;
    background:
      linear-gradient(180deg, rgba(20,8,6,0) 30%, rgba(20,8,6,.48) 100%),
      url("adam-hero.png?v=1") 74% center / cover no-repeat,
      var(--soft);
  }
  .ud-hero.ud-hero-img .ud-hero-in { justify-content: stretch; }
  .ud-hero.ud-hero-img .ud-card { max-width: none; width: 100%; padding: 24px 22px; }
  .ud-hero.ud-hero-img .ud-card h1 { font-size: 22px; }
}

/* === Internal polish (user 2026-11-23 14:25: nicer inner design) === */
.topic-card {
  border-radius: 14px;
  border: 1px solid #f3e4e1;
  box-shadow: 0 1px 3px rgba(170,36,25,.05);
  transition: border-color .15s, box-shadow .18s, transform .18s, background .18s;
}
.topic-card:hover, .topic-card:focus-visible {
  border-color: #AA2419;
  box-shadow: 0 8px 22px rgba(170,36,25,.14);
  transform: translateY(-2px);
  background: #fffdfb;
}
.topic-card b { font-size: 15.5px; line-height: 1.55; }
.topic-counts { color: #96605a; }
.topic-h { font-size: 17px; }
.page-head, .lesson-head { letter-spacing: -.1px; }
.module { box-shadow: 0 1px 4px rgba(170,36,25,.05); }
.module .m-name { font-size: 15.5px; }
.card { border-radius: 16px; }
.tabs button { transition: background .15s, color .15s, border-color .15s; }

/* === Internal round 2: width, bidi-safe bilingual hierarchy, player polish === */
#lesson-root h1 { unicode-bidi: plaintext; }
#lesson-root h2 { unicode-bidi: plaintext; }
.topic-grid { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.topic-card { align-items: flex-start; text-align: start; padding: 18px; min-height: 96px; }
.topic-card .t-line { display: block; width: 100%; }
.topic-card .t-sub { font-size: 13px; font-weight: 600; color: #96605a; margin-top: 3px; line-height: 1.5; }
.topic-card .topic-counts { margin-top: auto; padding-top: 8px; }
.video-card { border-radius: 16px; overflow: hidden; box-shadow: 0 4px 18px rgba(170,36,25,.08); }
.video-head { padding: 4px 2px 12px; }
.video-head b { unicode-bidi: plaintext; display: block; }
.topic-playlist { gap: 8px; }
.topic-playlist .curr-item { border: 1px solid #f3e4e1; background: #fff; padding: 12px 14px; border-radius: 12px; transition: border-color .15s, box-shadow .15s, background .15s; }
.topic-playlist .curr-item:hover { border-color: #AA2419; box-shadow: 0 3px 12px rgba(170,36,25,.10); background: #fffdfb; }
.topic-playlist .curr-item.active { border-color: #AA2419; background: #fdecea; }
.topic-back-row .btn.secondary { border-radius: 999px; }
.module .m-name { unicode-bidi: plaintext; }
@media (max-width: 760px) {
  .topic-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .topic-card { min-height: 0; padding: 14px; }
}
@media (max-width: 520px) {
  .topic-grid { grid-template-columns: 1fr; }
}

/* Topic modules: slim sidebar, full-width topics canvas */
.lesson-layout.layout-topics { grid-template-columns: 168px 1fr; gap: 18px; }
.lesson-layout.layout-topics .topic-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 760px) {
  .lesson-layout.layout-topics { grid-template-columns: 1fr; }
}
