:root {
  --bg: #141b26;
  --surface: #1d2634;
  --surface-2: #27313f;
  --border: #334052;
  --text: #ffffff;
  --text-2: #c9d1dc;
  --muted: #8a96a6;
  --accent: #3fc77a;
  --accent-hi: #5fd98f;
  --accent-lo: #22a85f;
  --accent-2: #ea535f;
  --gold: #f2b632;
  --s1: #3fc77a;
  --s2: #ea535f;
  --s3: #3987e5;
  --good: #3fc77a;
  --bad: #ea535f;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(20,27,38,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav-links { display: flex; gap: 26px; color: var(--text-2); font-size: 14px; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: .15s; font-family: inherit;
}
.btn-primary { background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); color: #0b1a12; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 90px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px -200px auto auto; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(57,135,229,.18), transparent 60%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.pill { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--text-2); margin-bottom: 20px; }
.pill b { color: var(--gold); }
h1 { font-size: 54px; line-height: 1.08; letter-spacing: -1.5px; margin-bottom: 20px; }
h1 .grad { background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--text-2); margin-bottom: 30px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 40px; }
.hero-stats .num { font-size: 26px; font-weight: 800; }
.hero-stats .lbl { font-size: 13px; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.chart-card h3 { font-size: 15px; font-weight: 600; }
.chart-card .sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-box { position: relative; height: 260px; }

/* Sections */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: 36px; letter-spacing: -.8px; margin-bottom: 10px; }
.section-head p { color: var(--text-2); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.section-head h2 { text-transform: uppercase; font-weight: 800; }
.section-head h2::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--accent); margin: 14px auto 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.course { display: flex; flex-direction: column; gap: 12px; transition: .2s; }
.course:hover { transform: translateY(-4px); border-color: #3d4b5e; }
.course .icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.course h3 { font-size: 19px; }
.course p { color: var(--text-2); font-size: 14px; flex: 1; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); display: inline-block; }
.course-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.course ul { list-style: none; font-size: 14px; color: var(--text-2); display: grid; gap: 6px; }
.course li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Pricing */
.pricing { max-width: 460px; margin: 0 auto; text-align: center; border: 1px solid var(--accent); position: relative; padding: 36px; }
.pricing .badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #111; padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.price { font-size: 56px; font-weight: 800; letter-spacing: -2px; }
.price small { font-size: 16px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.pricing ul { list-style: none; text-align: left; margin: 24px 0; display: grid; gap: 10px; color: var(--text-2); }
.pricing li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-inline-end: 10px; }

/* Map */
#map, #adminMap { height: 440px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.map-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.city-list { display: grid; gap: 10px; align-content: start; }
.city { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; cursor: pointer; }
.city:hover { border-color: var(--accent); }
.city .name { font-weight: 600; }
.city .country { font-size: 12px; color: var(--muted); }
.status { font-size: 12px; font-weight: 600; }
.status.live { color: var(--accent); }
.status.soon { color: var(--muted); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface) !important; color: var(--text) !important; }

/* Testimonials */
.quote p { color: var(--text-2); margin-bottom: 14px; font-size: 15px; }
.quote .who { font-weight: 600; font-size: 14px; }
.quote .who span { color: var(--muted); font-weight: 400; display: block; font-size: 13px; }

footer { border-top: 1px solid var(--border); padding: 30px 0; color: var(--muted); font-size: 13px; }
footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Auth */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 34px; }
.auth-card h2 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 24px; font-size: 14px; }
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit; margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.demo-creds { margin-top: 20px; padding: 14px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.demo-creds code { color: var(--text); }
.demo-creds button { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.error { color: var(--bad); font-size: 13px; margin-bottom: 12px; min-height: 18px; }

/* App layout (dashboard / admin) */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.sidebar { border-inline-end: 1px solid var(--border); padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar a { padding: 10px 14px; border-radius: 10px; color: var(--text-2); font-size: 14px; }
.sidebar a.active, .sidebar a:hover { background: var(--surface); color: var(--text); }
.main { padding: 30px; min-width: 0; }
.main h1 { font-size: 28px; letter-spacing: -.5px; margin-bottom: 4px; }
.main .page-sub { color: var(--text-2); margin-bottom: 26px; }
.kpi .lbl { font-size: 13px; color: var(--muted); }
.kpi .val { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 4px 0; }
.kpi .delta { font-size: 13px; font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.mt { margin-top: 20px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-2); }
td:first-child { color: var(--text); }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text-2); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.icon-btn:hover { color: var(--bad); border-color: var(--bad); }

.video-card { padding: 0; overflow: hidden; }
.thumb { aspect-ratio: 16/9; display: grid; place-items: center; font-size: 42px; position: relative; }
.thumb .play { width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; font-size: 20px; }
.thumb .dur { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.video-card .body { padding: 16px; }
.video-card h4 { font-size: 15px; margin-bottom: 6px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress div { height: 100%; background: var(--accent); border-radius: 99px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--accent); color: #111; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(10px); transition: .25s; z-index: 2000; }
.toast.show { opacity: 1; transform: none; }
.user-chip { font-size: 13px; color: var(--text-2); }

@media (max-width: 900px) {
  h1 { font-size: 38px; }
  .hero-grid, .map-wrap, .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; border-inline-end: none; border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .main { padding: 20px 16px; }
  .hero-stats { gap: 22px; }
}

/* Video player modal */
.thumb .play { transition: .15s; }
.video-card:hover .play { background: #e62117; transform: scale(1.08); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: none; place-items: center; z-index: 3000; padding: 16px; }
.modal.open { display: grid; }
.modal-box { width: 100%; max-width: 960px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.modal-head h3 { font-size: 16px; }
.video-frame { aspect-ratio: 16/9; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.admin-thumb { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 10px; background: var(--surface-2); }

/* ---------- Go Trades brand ---------- */
.brand { display: inline-flex; align-items: center; }
.brand-img { height: 46px; width: auto; display: block; }
.brand-img-lg { width: 210px; height: auto; display: block; }

/* Hero with skyline */
.hero.skyline { padding: 110px 0 90px; background: linear-gradient(90deg, rgba(20,27,38,.94) 0%, rgba(20,27,38,.72) 45%, rgba(20,27,38,.3) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%), url(../img/skyline.jpg) center/cover no-repeat; }
.hero.skyline::before { display: none; }
.hero.skyline h1 { text-transform: uppercase; font-weight: 900; font-style: italic; font-family: "Montserrat", sans-serif; letter-spacing: -1px; }
.hero.skyline .chart-card { background: rgba(29,38,52,.84); backdrop-filter: blur(8px); }

/* Black stats band with gold icons */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); background: #0f1620; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 10px; }
.stat-band > div { text-align: center; padding: 0 16px; border-inline-start: 1px solid rgba(63,199,122,.45); }
.stat-band > div:first-child { border-inline-start: none; }
.stat-band .ico { font-size: 26px; color: var(--accent); margin-bottom: 6px; }
.stat-band .big { font-size: 34px; font-weight: 900; color: var(--accent); font-family: "Montserrat", sans-serif; line-height: 1.1; }
.stat-band .t { font-weight: 700; font-size: 16px; }
.stat-band .d { color: var(--text-2); font-size: 13px; }

/* Light section like the flyer */
.light { background: #fff; color: #1a1a1a; }
.light .section-head p, .light p { color: #3b3f4a; }
.light .overview { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.light h2.left { font-size: 30px; text-transform: uppercase; font-weight: 800; letter-spacing: -.5px; margin-bottom: 12px; }
.light h2.left::after { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: 8px; }
.exp { display: flex; gap: 18px; align-items: center; margin-top: 24px; }
.exp .ring { width: 72px; height: 72px; flex: none; border-radius: 50%; border: 3px solid var(--accent); display: grid; place-items: center; font-size: 28px; }
.exp b { font-size: 20px; display: block; color: #111; }
.terms { width: 100%; border: 1px solid #f1d7ad; border-radius: 10px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.terms td { color: #333; border-bottom: 1px solid #f1d7ad; padding: 12px 16px; background: #fffaf2; }
.terms tr:nth-child(odd) td { background: #fdf1de; }
.terms tr:last-child td { border-bottom: none; }
.terms td:first-child { font-weight: 600; color: #111; width: 45%; }

/* Numbered steps */
.steps { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 20px; }
.step { text-align: center; flex: 1; }
.step .n { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); color: #fff; font-size: 30px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(224,134,15,.3); }
.step b { display: block; font-size: 16px; color: #111; }
.step span { font-size: 13px; color: #555; }
.step-arrow { color: var(--accent); font-size: 26px; padding-top: 16px; }

/* Footer like the flyer */
footer.brand-footer { background: #0f1620; padding: 36px 0; }
footer.brand-footer .container { align-items: center; }
.cities { display: flex; align-items: center; gap: 22px; color: #fff; letter-spacing: 3px; font-size: 15px; }
.cities i { width: 2px; height: 22px; background: var(--accent); display: inline-block; }
.footer-left { display: flex; align-items: center; gap: 28px; }
.footer-left .vr { width: 2px; height: 56px; background: var(--accent); }

@media (max-width: 900px) {
  .stat-band { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .stat-band > div:nth-child(3) { border-inline-start: none; }
  .light .overview { grid-template-columns: 1fr; }
  .steps { flex-wrap: wrap; justify-content: center; }
  .step { flex: 0 0 30%; }
  .step-arrow { display: none; }
  .brand.lg .wordmark { font-size: 34px; }
}

/* Dark map: invert standard OSM tiles */
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.4); }
.leaflet-container { background: #141b26; }
.leaflet-control-attribution { background: rgba(0,0,0,.6) !important; color: #888 !important; }
.leaflet-control-attribution a { color: #bbb !important; }

/* Checkout */
.checkout { width: 100%; max-width: 900px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.checkout .card { padding: 30px; }
.order-list { list-style: none; margin: 20px 0; display: grid; gap: 10px; color: var(--text-2); font-size: 14px; }
.order-list li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-inline-end: 10px; }
.order-total { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 16px; font-size: 20px; font-weight: 800; }
.order-total span:last-child { color: var(--accent); }
.demo-note { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px dashed #3d4b5e; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }
.welcome-banner { background: linear-gradient(90deg, rgba(63,199,122,.18), rgba(63,199,122,.04)); border: 1px solid rgba(63,199,122,.4); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 22px; }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; } }

/* ---------- Language toggle ---------- */
.lang-toggle { background: transparent; border: 1px solid var(--accent); color: var(--accent); border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: "Cairo", "Inter", sans-serif; transition: .15s; }
.lang-toggle:hover { background: var(--accent); color: #111; }
.lang-toggle[lang="en"] { font-family: "Inter", sans-serif; }

/* ---------- Arabic / right-to-left ---------- */
[dir="rtl"] body { font-family: "Cairo", "Inter", sans-serif; line-height: 1.7; }
[dir="rtl"] .brand { direction: ltr; }                       /* logo stays as designed */
[dir="rtl"] body *:not(.brand):not(.brand *) { letter-spacing: 0 !important; }  /* spacing breaks Arabic letters */
[dir="rtl"] .hero.skyline h1 { font-family: "Cairo", sans-serif; font-style: normal; font-weight: 900; font-size: 60px; line-height: 1.25; }
[dir="rtl"] .hero.skyline { background: linear-gradient(270deg, rgba(20,27,38,.94) 0%, rgba(20,27,38,.72) 45%, rgba(20,27,38,.3) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%), url(../img/skyline.jpg) center/cover no-repeat; }
[dir="rtl"] .section-head h2, [dir="rtl"] .light h2.left { font-weight: 800; line-height: 1.4; }
[dir="rtl"] .stat-band .big { font-family: "Cairo", sans-serif; }
[dir="rtl"] .cities { font-size: 18px; font-weight: 700; }
[dir="rtl"] .thumb .dur { right: auto; left: 8px; }
[dir="rtl"] .toast { right: auto; left: 24px; }
[dir="rtl"] .leaflet-container { direction: ltr; }
[dir="rtl"] .leaflet-popup-content { text-align: right; font-family: "Cairo", sans-serif; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="password"], [dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
@media (max-width: 900px) { [dir="rtl"] .hero.skyline h1 { font-size: 42px; } }

/* ---------- Checkout: payment options ---------- */
.checkout { max-width: 980px; grid-template-columns: 1fr 1.15fr; }
.iqd-line { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--text-2); }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 5px; margin-bottom: 22px; }
.pay-tab { background: transparent; border: none; color: var(--text-2); font: inherit; font-weight: 700; font-size: 14px; padding: 11px 8px; border-radius: 9px; cursor: pointer; transition: .15s; }
.pay-tab:hover { color: var(--text); }
.pay-tab.active { background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); color: #111; }
.pay-foot { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 12px; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin: 6px 0 14px; }
.step-title span { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #111; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.pay-method { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--bg); transition: .15s; margin: 0; }
.pay-method:hover { border-color: #4a4a4a; }
.pay-method input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.pay-method:has(input:checked) { border-color: var(--accent); background: rgba(63,199,122,.08); box-shadow: 0 0 0 3px rgba(63,199,122,.12); }
.pay-method:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pm-badge { min-width: 46px; height: 32px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; background: var(--surface-2); border: 1px solid #3d4b5e; font-family: "Inter", sans-serif; }
.pay-method:has(input:checked) .pm-badge { background: var(--accent); color: #111; border-color: var(--accent); }
.pm-text b { display: block; font-size: 14px; color: var(--text); }
.pm-text small { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: block; }
.pay-box { background: var(--bg); border: 1px solid rgba(63,199,122,.35); border-radius: 12px; padding: 6px 16px 14px; margin-bottom: 18px; }
.pay-box .row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pay-box .row span { color: var(--muted); flex: 1; }
.pay-box .row b { color: var(--text); }
.pay-box .row:first-child b { color: var(--accent); font-size: 18px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; direction: ltr; unicode-bidi: isolate; }
.copy-btn { background: var(--surface-2); border: 1px solid #3d4b5e; color: var(--text-2); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.pay-hint { font-size: 12.5px; color: var(--text-2); margin-top: 12px; }
.btn-wa { background: #25d366; color: #0b2e17; }
.btn-wa:hover { filter: brightness(1.06); }
.iraq-done { text-align: center; }
.iraq-done .done-icon { width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 14px; background: rgba(37,211,102,.15); color: #25d366; display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.iraq-done h3 { font-size: 20px; margin-bottom: 14px; }
.iraq-done p { color: var(--text-2); font-size: 14px; margin-bottom: 8px; }
.done-ref { font-size: 24px; font-weight: 800; color: var(--accent); margin-bottom: 14px; }
.iraq-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 14px; border-radius: 10px; border: 1px dashed rgba(63,199,122,.5); color: var(--text); font-size: 14px; font-weight: 600; }
.iraq-link:hover { background: rgba(63,199,122,.08); }
.iraq-link small { color: var(--muted); font-weight: 500; }
.status-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-block; }
.status-pill.pending { background: rgba(63,199,122,.15); color: var(--accent); }
.status-pill.approved { background: rgba(37,211,102,.15); color: #25d366; }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; } .pay-methods { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 420px) { .pay-methods { grid-template-columns: 1fr; } .pay-method { flex-direction: row; text-align: start; } }
.icon-btn.approve { color: #25d366; border-color: rgba(37,211,102,.5); }
.icon-btn.approve:hover { background: rgba(37,211,102,.12); color: #25d366; border-color: #25d366; }
a.icon-btn { display: inline-block; }
a.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Course area ---------- */
.progress-big { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-big > div { height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); border-radius: 99px; transition: width .4s; }
.continue-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: linear-gradient(135deg, rgba(63,199,122,.16), rgba(63,199,122,.04)); border-color: rgba(63,199,122,.35); }
.continue-card .eyebrow { margin-bottom: 6px; }
.module { margin-top: 18px; padding: 0; overflow: hidden; }
.module-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; }
.module-head .num { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.module-head .num.done { background: rgba(25,158,112,.18); color: var(--good); }
.module-head h3 { font-size: 17px; }
.module-head .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.module-head .chev { margin-inline-start: auto; color: var(--muted); transition: .2s; }
.module.open .chev { transform: rotate(180deg); }
.module-body { display: none; border-top: 1px solid var(--border); }
.module.open .module-body { display: block; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); color: inherit; }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: var(--surface-2); }
.lesson-row.current { background: rgba(63,199,122,.08); }
.lesson-row .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.lesson-row.done .check { background: var(--good); border-color: var(--good); color: #fff; }
.lesson-row .ttl { flex: 1; font-weight: 500; }
.lesson-row .dur { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.module-foot { padding: 12px 20px; background: var(--surface-2); font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.module-foot a { color: var(--accent); font-weight: 600; }

/* Lesson page */
.lesson-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--border); }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.lesson-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; }
.lesson-side .lesson-row { padding: 10px 14px; }
.lesson-side .card { padding: 0; overflow: hidden; }
.lesson-side .side-head { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.side-module { padding: 8px 16px 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.locked-card { text-align: center; padding: 40px 24px; }
.locked-card .big-icon { font-size: 44px; margin-bottom: 10px; }

/* Community */
.post-form textarea { width: 100%; min-height: 90px; resize: vertical; }
.post { padding: 18px 20px; }
.post + .post { margin-top: 12px; }
.post .who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.post .who b { color: var(--text); }
.post .who .role { background: rgba(63,199,122,.15); color: var(--accent); padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.post .body { white-space: pre-wrap; line-height: 1.6; }
.post .actions { margin-top: 10px; display: flex; gap: 14px; font-size: 13px; }
.post .actions button { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.reply { margin: 12px 0 0 28px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
[dir="rtl"] .reply { margin: 12px 28px 0 0; }
.reply-form { margin-top: 10px; display: flex; gap: 8px; }
.reply-form input { flex: 1; margin: 0; }
.workshop { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.workshop:last-child { border-bottom: 0; }
.workshop .date { min-width: 54px; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 8px 6px; }
.workshop .date b { display: block; font-size: 20px; line-height: 1; color: var(--accent); }
.workshop .date span { font-size: 11px; color: var(--muted); text-transform: uppercase; }

/* Certificate */
.cert { background: #ffffff; color: #1a1a19; border: 10px double #1d9b57; padding: 56px 48px; text-align: center; border-radius: 6px; max-width: 900px; margin: 0 auto; font-family: "Inter", sans-serif; }
.cert .brand-line { font-family: "Montserrat", sans-serif; font-weight: 900; letter-spacing: .08em; font-size: 22px; }

.cert h1 { font-size: 40px; margin: 28px 0 6px; font-family: "Montserrat", sans-serif; }
.cert .name { font-size: 34px; font-weight: 800; margin: 18px 0; color: #0a0a0a; border-bottom: 2px solid #ea535f; display: inline-block; padding: 0 30px 6px; }
.cert .course { font-size: 18px; margin-top: 10px; }
.cert .meta { display: flex; justify-content: space-between; margin-top: 40px; font-size: 13px; color: #555; }
.cert .disc { margin-top: 24px; font-size: 11px; color: #777; }
@media print { nav, .no-print, .toast { display: none !important; } body { background: #fff; } .cert { border-width: 8px; margin: 0; } }

/* Broker pathway */
.broker { display: flex; gap: 16px; align-items: center; }
.broker .logo { width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-weight: 900; color: var(--accent); flex-shrink: 0; }
.disclosure { font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; line-height: 1.6; }

/* Admin extras */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.switch { cursor: pointer; }
.admin-input { margin: 0; padding: 6px 8px; font-size: 13px; }
.badge-ok { color: var(--good); } .badge-no { color: var(--bad); }

@media (max-width: 900px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .continue-card { grid-template-columns: 1fr; }
}

/* ---------- Workbook reader ---------- */
.reader { padding: 28px 32px; line-height: 1.75; font-size: 16px; max-width: 820px; }
.reader h2 { font-size: 26px; }
.reader h3 { font-size: 19px; margin: 26px 0 8px; color: var(--accent-hi); }
.reader h4 { font-size: 16px; margin: 18px 0 6px; }
.reader p { margin: 0 0 14px; color: var(--text-2); }
.reader ul, .reader ol { margin: 0 0 14px; padding-inline-start: 24px; color: var(--text-2); }
.reader li { margin-bottom: 6px; }
.reader strong { color: var(--text); }
.reader table { margin: 10px 0 18px; font-size: 14px; }
.reader .note { background: rgba(63,199,122,.1); border: 1px solid rgba(63,199,122,.35); border-radius: 10px; padding: 12px 16px; margin: 14px 0; color: var(--text); }
.reader .warn { background: rgba(230,103,103,.1); border: 1px solid rgba(230,103,103,.4); border-radius: 10px; padding: 12px 16px; margin: 14px 0; color: var(--text); }
.reader .ex { background: var(--surface-2); border-radius: 10px; padding: 12px 16px; margin: 14px 0; font-size: 15px; }
.reader figure { margin: 16px 0; }
.reader figure svg { width: 100%; height: auto; max-width: 620px; display: block; }
.reader figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.reader code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 90%; }
[dir="rtl"] .reader { font-family: "Cairo", "Inter", sans-serif; }
@media (max-width: 700px) { .reader { padding: 20px 18px; font-size: 15px; } }

/* ---------- Quiz ---------- */
.quiz-q { margin-top: 16px; }
.quiz-q .qnum { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.quiz-q h3 { font-size: 17px; margin-bottom: 14px; line-height: 1.5; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; margin: 0; font-size: 15px; color: var(--text); font-weight: 500; }
.opt:hover { background: var(--surface-2); }
.opt input { width: auto; margin: 0; accent-color: var(--accent); }
.opt .letter { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.opt:has(input:checked) { border-color: var(--accent); background: rgba(63,199,122,.08); }
.quiz-q.right { border-color: rgba(25,158,112,.5); }
.quiz-q.wrong { border-color: rgba(230,103,103,.5); }
.opt.is-answer { border-color: var(--good); background: rgba(25,158,112,.12); }
.opt.is-given { border-color: var(--bad); background: rgba(230,103,103,.12); }
.why { margin-top: 12px; font-size: 14px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 10px 14px; }

/* Module progress on the dashboard */
.module-status { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.module-status span { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.module-status span.ok { background: rgba(25,158,112,.18); color: var(--good); }
.cert-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.cert-steps div { text-align: center; padding: 10px 6px; border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.cert-steps div b { display: block; font-size: 18px; color: var(--text); }
.cert-steps div.ok { background: rgba(25,158,112,.18); color: var(--good); }
.cert-steps div.ok b { color: var(--good); }
@media (max-width: 700px) { .cert-steps { grid-template-columns: repeat(5, 1fr); } .cert-steps div { font-size: 10px; } }

/* ---- Community engagement: avatars, levels, leaderboard, likes, categories, reviews ---- */
.avatar { --sz: 38px; position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--sz); height: var(--sz); border-radius: 50%; color: #111; font-weight: 800; font-size: calc(var(--sz) * .38); flex: none; font-family: "Inter", sans-serif; letter-spacing: .02em; }
.avatar .lvl { position: absolute; right: -4px; bottom: -4px; min-width: calc(var(--sz) * .48); height: calc(var(--sz) * .48); padding: 0 3px; border-radius: 999px; background: #0f1620; color: var(--accent); border: 2px solid var(--surface); font-size: calc(var(--sz) * .3); display: flex; align-items: center; justify-content: center; font-family: "Inter", sans-serif; }
[dir="rtl"] .avatar .lvl { right: auto; left: -4px; }
.level-chip { background: rgba(63,199,122,.15); color: var(--accent); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.progress-big { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-big > div { height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); border-radius: 999px; transition: width .4s; }
.level-strip { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.level-strip .ls-stats { display: flex; gap: 18px; }
.level-strip .ls-stats div { text-align: center; }
.level-strip .ls-stats b { display: block; font-size: 18px; }
.level-strip .ls-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.lb-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.lb-boards { display: grid; gap: 16px; }
.lb-card h3 { margin-bottom: 10px; font-size: 16px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.lb-row + .lb-row { border-top: 1px solid var(--border); }
.lb-row.me { background: rgba(63,199,122,.08); }
.lb-row .rank { width: 28px; text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; flex: none; }
.lb-row .rank.top { font-size: 18px; }
.lb-row .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.lb-row .pts { color: var(--accent); font-variant-numeric: tabular-nums; }
.lb-row.sm { padding: 5px 4px; } .lb-row.sm .nm { font-size: 13px; } .lb-row.sm .rank { width: 18px; font-size: 12px; }
.lb-more { text-align: center; color: var(--muted); padding: 2px; }
.me-card { display: flex; gap: 18px; align-items: flex-start; }
.me-stats { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.me-stats div b { display: block; font-size: 20px; } .me-stats div span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.me-line { display: flex; gap: 10px; align-items: center; }
.me-line b { font-size: 13px; }
.levels { display: grid; gap: 8px; }
.level { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; }
.level.cur { border-color: var(--accent); background: rgba(63,199,122,.08); }
.level.done { opacity: .75; }
.level .ln { width: 30px; height: 30px; border-radius: 50%; background: #0f1620; color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.level.done .ln { background: var(--good); color: #fff; }
.level .lt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.level .lt span { color: var(--muted); font-size: 12px; }
.level .lp { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.rules { width: 100%; font-size: 14px; border-collapse: collapse; }
.rules td { padding: 7px 4px; border-bottom: 1px solid var(--border); }
.rules td:last-child { text-align: end; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.rules tr:last-child td { border-bottom: 0; }

.post .who { align-items: flex-start; }
.post .who > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post .who .when { width: 100%; font-size: 12px; color: var(--muted); margin-top: -2px; }
.post.pinned { border-color: rgba(63,199,122,.5); }
.post .pin { font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.post .actions { align-items: center; flex-wrap: wrap; }
.post .actions .cat { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 2px 9px; border-radius: 999px; }
.post .actions .like { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.post .actions .like.on, .post .actions .like:hover:not(:disabled) { color: var(--text); }
.post .actions .like:disabled { cursor: default; opacity: .7; }
.reply .actions { margin-top: 6px; }
.reply .who { margin-bottom: 6px; }
.feed-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; }
.feed-tabs button, .cat-pick button { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; }
.feed-tabs button.on, .cat-pick button.on { background: rgba(63,199,122,.15); border-color: var(--accent); color: var(--accent); }
.cat-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.cat-pick button { padding: 4px 10px; font-size: 12px; }
.stars { display: flex; gap: 2px; }
.stars .star { background: none; border: 0; font-size: 26px; color: var(--border); cursor: pointer; padding: 0 2px; line-height: 1; }
.stars .star.on { color: var(--accent); }
.stars-ro { color: var(--accent); font-size: 15px; letter-spacing: 1px; display: block; margin-bottom: 8px; }
.share-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.share-row .btn { padding: 7px 12px; font-size: 13px; }
.gamify-band { display: flex; align-items: center; gap: 20px; margin-top: 18px; flex-wrap: wrap; background: linear-gradient(135deg, rgba(63,199,122,.10), transparent 60%); }
.gamify-band .gb-ico { font-size: 40px; }
.gamify-band h3 { font-size: 18px; margin-bottom: 4px; }
.gamify-band p { color: var(--text-2); font-size: 14px; max-width: 640px; }
.gamify-band > div:nth-child(2) { flex: 1; min-width: 260px; }
.gamify-band .gb-levels { display: flex; flex-direction: column; gap: 6px; }
.gamify-band .gb-levels span { font-size: 12px; font-weight: 700; color: var(--accent); background: #0f1620; border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 900px) { .lb-grid { grid-template-columns: 1fr; } .me-card { flex-wrap: wrap; } .gamify-band .gb-levels { flex-direction: row; flex-wrap: wrap; } }
