/* BATRAH Sales Academy - production styles reproducing approved_design/01_APPROVED_ACADEMY_UI.html (v1.2).
   Tokens copied from the approved design system. Only change vs the approved design: the font stack -> self-hosted
   brand fonts RB Light (300, body) and RB Bold (700, headings), fallback Arial/Tahoma (the design's Latin numeral face uses
   the same stack). No inline styles (CSP style-src 'self'). */
@font-face { font-family: "RB"; font-style: normal; font-weight: 300; font-display: swap; src: url("/static/fonts/RB-Light.ttf") format("truetype"); }
@font-face { font-family: "RB"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/RB-Bold.ttf") format("truetype"); }

:root {
  --font-brand: "RB", Arial, Tahoma, sans-serif;
  --batrah-black: #000000; --batrah-ink: #0a0a0a; --batrah-charcoal: #151515; --batrah-orange: #ff4200; --batrah-amber: #ffb200;
  --batrah-white: #ffffff; --grey-100: #e8e8e8; --grey-300: #c4c4c4; --grey-500: #9a9a9a; --grey-700: #5a5a5a; --grey-800: #2a2a2a;
  --orange-10: #ffece5; --hair-dark: rgba(255,255,255,.14); --soft-dark: rgba(255,255,255,.08); --strong-dark: rgba(255,255,255,.28);
  --hair-light: rgba(0,0,0,.12); --accent-hover: #ff5c22; --accent-press: #db3800;
  --glow-ember: radial-gradient(60% 60% at 50% 100%, rgba(255,66,0,.55) 0%, rgba(255,178,0,.18) 45%, rgba(0,0,0,0) 100%);
  --glow-corner: radial-gradient(70% 70% at 100% 0%, rgba(255,66,0,.45) 0%, rgba(255,178,0,.12) 50%, rgba(0,0,0,0) 100%);
  --ease: cubic-bezier(.22,.61,.36,1); --dur: 220ms;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; font-family: var(--font-brand); font-weight: 300; font-size: 16px; line-height: 1.45; letter-spacing: 0; }
h1, h2, h3 { font-family: var(--font-brand); font-weight: 700; letter-spacing: 0; margin: 0; }
p { margin: 0; }
b, strong, .bold { font-weight: 700; }
.num { font-family: var(--font-brand); font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--batrah-orange); outline-offset: 2px; }
body.dark { background: #000; color: #fff; }
body.light { background: #fff; color: var(--batrah-ink); }
a { color: inherit; }

/* ---- buttons (Button / IconButton of the design system) ---- */
.btn { font-family: var(--font-brand); font-weight: 700; border: 1px solid transparent; border-radius: 0; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; gap: 12px; text-decoration: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn.sm { font-size: 12px; padding: 9px 18px; } .btn.md { font-size: 14px; padding: 13px 26px; } .btn.lg { font-size: 16px; padding: 18px 38px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--batrah-orange); color: #000; }
.btn.primary:hover { background: var(--accent-hover); } .btn.primary:active { background: var(--accent-press); transform: translateY(1px); }
.btn.secondary { background: transparent; color: #fff; border-color: var(--strong-dark); }
.btn.secondary:hover { background: #fff; color: #000; }
.light .btn.secondary, .on-light .btn.secondary { color: var(--batrah-ink); border-color: rgba(0,0,0,.24); }
.light .btn.secondary:hover, .on-light .btn.secondary:hover { background: var(--batrah-ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: inherit; padding: 13px 4px; }
.btn.ghost:hover { color: var(--batrah-orange); }
.btn[disabled], .btn.disabled { opacity: .38; pointer-events: none; }
.icon-btn { width: 56px; height: 56px; display: inline-grid; place-items: center; border-radius: 0; cursor: pointer; padding: 0;
  background: transparent; color: #fff; border: 1px solid var(--hair-dark); }
.icon-btn:hover { background: var(--soft-dark); } .icon-btn[aria-pressed="true"] { border-color: var(--batrah-orange); }
.icon-btn svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.6; stroke-linecap: square; }
.tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; line-height: 1; padding: 6px 10px; border: 1px solid; }
.tag.neutral { color: #666; border-color: var(--hair-light); } .tag.light { color: var(--batrah-ink); border-color: rgba(0,0,0,.24); }
.tag.accent { color: var(--batrah-orange); border-color: rgba(255,66,0,.5); background: rgba(255,66,0,.08); }
.emblem { display: block; flex-shrink: 0; fill: var(--batrah-orange); }

/* ---- form inputs (Input of the design system) ---- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--grey-300); font-weight: 700; }
.field input, .field select { font-family: var(--font-brand); font-size: 17px; font-weight: 300; color: #fff; background: transparent;
  border: 0; border-bottom: 1px solid var(--strong-dark); padding: 12px 0; border-radius: 0; }
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--batrah-orange); }
.on-light .field label { color: var(--grey-700); } .on-light .field input, .on-light .field select { color: var(--batrah-ink); border-bottom-color: rgba(0,0,0,.24); }
.field select option { color: #000; }
.msg { font-size: 15px; min-height: 1.4em; } .msg.err { color: var(--batrah-orange); } .msg.ok { color: #30c978; }
.on-light .msg.ok { color: #1d7a49; }

/* ---- login (panel "تسجيل الدخول") ---- */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-hero { flex: 999 1 560px; min-width: 0; padding: 64px 96px 72px; display: flex; flex-direction: column; justify-content: space-between; gap: 64px;
  background-image: var(--glow-corner); background-repeat: no-repeat; }
.login-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.login-top img { width: 112px; height: auto; display: block; }
.kicker-en { direction: ltr; font-weight: 700; font-size: 12px; letter-spacing: .22em; color: var(--grey-500); }
.login-copy { display: flex; flex-direction: column; gap: 32px; max-width: 640px; }
.bracket { font-size: 18px; font-weight: 700; color: var(--batrah-orange); }
.bar-title { display: flex; gap: 28px; align-items: stretch; } .bar-title::before { content: ""; width: 8px; background: var(--batrah-orange); flex-shrink: 0; }
.bar-title.thin { gap: 18px; } .bar-title.thin::before { width: 6px; }
.login-copy h1 { font-size: 76px; line-height: 1.15; color: #fff; } .login-copy h1 span { color: var(--batrah-orange); }
.lead { font-size: 22px; line-height: 1.7; color: var(--grey-300); max-width: 560px; }
.stats { display: flex; gap: 56px; flex-wrap: wrap; border-top: 1px solid var(--hair-dark); padding-top: 32px; }
.stat { display: flex; flex-direction: column; gap: 6px; } .stat .num { font-size: 48px; line-height: 1; text-align: right; }
.stat .num.accent { color: var(--batrah-orange); } .stat span:last-child { font-size: 16px; color: var(--grey-500); }
.login-panel { flex: 1 1 440px; min-width: 0; padding: 72px 64px; background: var(--batrah-ink); border-right: 1px solid var(--hair-dark);
  display: flex; flex-direction: column; justify-content: center; gap: 40px; }
.login-panel h2 { margin-top: 16px; font-size: 34px; line-height: 1.3; color: #fff; }
.login-panel p { font-size: 17px; line-height: 1.7; color: var(--grey-300); }
.login-panel form { display: flex; flex-direction: column; gap: 28px; }
.login-note { border-top: 1px solid var(--hair-dark); padding-top: 28px; font-size: 13px; color: var(--grey-500); }

/* ---- app shell + sidebar (component "الشريط الجانبي") ---- */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; background: #fff; color: var(--batrah-ink); }
.side-wrap { flex: 1 1 248px; max-width: 100%; background: #000; }
.side { width: 100%; min-height: 980px; padding: 32px 20px 28px; background: #000; color: #fff; display: flex; flex-direction: column; gap: 32px; }
.side-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-decoration: none; padding: 0 12px; }
.side-brand img { width: 88px; height: auto; display: block; }
.side-brand span { direction: ltr; font-weight: 700; font-size: 11px; letter-spacing: .22em; color: var(--grey-500); }
.side-user { display: flex; align-items: center; gap: 12px; padding: 16px 12px; border-top: 1px solid var(--hair-dark); border-bottom: 1px solid var(--hair-dark); }
.side-user .av { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; background: #fff; color: #000; font-weight: 700; font-size: 20px; }
.side-user .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.side-user .who b { font-size: 16px; } .side-user .who span { font-size: 13px; color: var(--grey-500); }
.side-groups { display: flex; flex-direction: column; gap: 28px; flex-grow: 1; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-group > span { padding: 0 12px 8px; font-size: 12px; font-weight: 700; color: var(--grey-500); }
.side-group a { display: block; padding: 10px 12px; font-size: 16px; font-weight: 300; color: var(--grey-300); text-decoration: none; border-right: 2px solid transparent; }
.side-group a[aria-current="page"] { font-weight: 700; color: #fff; background: var(--soft-dark); border-right-color: var(--batrah-orange); }
.side-group a.soon { opacity: .45; pointer-events: none; }
.side-gate { display: flex; flex-direction: column; gap: 6px; padding: 16px 12px 0; border-top: 1px solid var(--hair-dark); }
.side-gate span:first-child { font-size: 13px; color: var(--grey-500); } .side-gate b { font-size: 15px; color: var(--batrah-orange); }
.side-logout { padding: 0 12px; font-size: 14px; color: var(--grey-500); background: none; border: 0; text-align: right; cursor: pointer; font-family: var(--font-brand); }
.main { flex: 999 1 560px; min-width: 0; padding: 40px 56px 72px; background: #fff; }
.main-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--hair-light); }
.page-head .pre { font-size: 15px; color: var(--grey-700); } .page-head h1 { font-size: 40px; line-height: 1.3; color: var(--batrah-ink); }
.page-head .sub { font-size: 14px; color: var(--grey-700); }
.stack { display: flex; flex-direction: column; gap: 6px; } .stack-8 { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* admin gate (dark block) */
.gate { background: #000; color: #fff; padding: 44px 48px; display: flex; flex-direction: column; gap: 32px; background-image: var(--glow-corner);
  background-repeat: no-repeat; background-size: 60% 100%; background-position: left top; }
.gate-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.gate .bracket { font-size: 15px; } .gate h2 { font-size: 36px; line-height: 1.3; color: #fff; }
.gate p { font-size: 18px; line-height: 1.75; color: var(--grey-300); }
.gate .count .num { font-size: 64px; line-height: 1; } .gate .count .num i { font-style: normal; color: var(--grey-700); }
.gate .count span:last-child { font-size: 14px; color: var(--grey-500); }
.checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--hair-dark); border: 1px solid var(--hair-dark); }
.check { background: #000; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.check b { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.check b::before { content: ""; width: 12px; height: 12px; border: 1px solid var(--grey-500); flex-shrink: 0; }
.check.ok b::before { background: var(--batrah-orange); border-color: var(--batrah-orange); }
.check span { font-size: 13px; color: var(--grey-500); padding-right: 22px; }
.gate-note { font-size: 14px; color: var(--grey-500); }

/* kpis */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.kpi { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--batrah-ink); }
.kpi.accent { border-top-color: var(--batrah-orange); }
.kpi .num { font-size: 52px; line-height: 1; text-align: right; } .kpi .num small { font-size: 28px; color: var(--grey-500); }
.kpi > span:last-child { font-size: 15px; color: var(--grey-700); }
.cols { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.col { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--batrah-ink); }
.sec-head h3, .sec-head h2 { font-size: 22px; color: var(--batrah-ink); } .sec-head span { font-size: 13px; color: var(--grey-700); }
.list-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 0; border-bottom: 1px solid var(--hair-light); }
.list-row .n { width: 30px; flex-shrink: 0; text-align: right; font-size: 18px; color: var(--batrah-orange); }
.list-row .t { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.list-row .t b { font-size: 17px; } .list-row .t span { font-size: 14px; color: var(--grey-700); }
.meter { position: relative; height: 16px; background: var(--grey-100); direction: ltr; }
.meter .fill { height: 16px; background: var(--batrah-orange); width: 0; }
.meter .stop { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--batrah-ink); }
.meter-scale { position: relative; height: 18px; direction: ltr; font-size: 12px; color: var(--grey-700); }
.meter-scale span { position: absolute; } .meter-scale .l { left: 0; } .meter-scale .r { right: 0; } .meter-scale .m { transform: translateX(-50%); color: var(--batrah-ink); font-weight: 700; }
.cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hair-light); border: 1px solid var(--hair-light); }
.cell { background: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.cell span { font-size: 13px; color: var(--grey-700); } .cell b { font-size: 16px; }
.note { font-size: 13px; color: var(--grey-700); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* ---- voice session (panel "الجلسة الصوتية") ---- */
.call { min-height: 100vh; display: flex; flex-direction: column; background: #000; color: #fff; background-image: var(--glow-ember);
  background-repeat: no-repeat; background-size: 100% 46%; background-position: center bottom; }
.call-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 20px 40px; border-bottom: 1px solid var(--hair-dark); }
.call-head .who { display: flex; align-items: center; gap: 16px; }
.call-head .who span { display: flex; flex-direction: column; } .call-head .who small { font-size: 13px; color: var(--grey-500); } .call-head .who b { font-size: 18px; }
.rec-pill { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border: 1px solid var(--hair-dark); }
.rec-pill i { width: 10px; height: 10px; background: var(--grey-700); display: inline-block; } .rec-pill.on i { background: var(--batrah-orange); }
.rec-pill span { font-size: 14px; color: var(--grey-300); } .rec-pill .num { font-size: 18px; letter-spacing: .04em; color: #fff; }
.call-body { flex-grow: 1; display: flex; flex-wrap: wrap; }
.call-main { flex: 999 1 560px; min-width: 0; padding: 48px 40px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; }
.speaker { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.speaker .frame { padding: 12px; border: 2px solid var(--grey-800); } .speaker.talking .frame { border-color: var(--batrah-orange); }
.speaker .ava { width: 156px; height: 156px; display: grid; place-items: center; border: 1px solid var(--strong-dark); background: var(--batrah-ink); font-weight: 700; font-size: 80px; line-height: 1; }
.speaker .name { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.speaker .name b { font-size: 36px; line-height: 1.3; } .speaker .name span { font-size: 16px; color: var(--grey-500); }
.speaker .name em { font-style: normal; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--batrah-orange); min-height: 1.4em; }
.tracks { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 6px; }
.track { display: flex; align-items: center; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--soft-dark); }
.track > span { width: 150px; flex-shrink: 0; display: flex; flex-direction: column; }
.track > span b { font-size: 15px; } .track > span small { font-size: 12px; color: var(--grey-500); }
.track > span em { font-style: normal; font-size: 12px; color: var(--grey-500); } .track > span em.bad { color: var(--batrah-orange); }
.wave { flex-grow: 1; height: 56px; display: flex; align-items: center; gap: 3px; overflow: hidden; direction: ltr; }
.wave i { display: block; flex-shrink: 0; width: 4px; height: 3px; background: var(--grey-800); }
.wave.ai i.on { background: var(--batrah-orange); } .wave.me i.on { background: #fff; }
.call-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.call-side { flex: 1 1 340px; min-width: 0; padding: 40px 32px; background: rgba(10,10,10,.86); border-right: 1px solid var(--hair-dark); display: flex; flex-direction: column; gap: 36px; }
.call-side h2 { font-size: 15px; color: var(--grey-500); }
.call-side section { display: flex; flex-direction: column; gap: 14px; }
.goal { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; } .goal .num { font-size: 14px; color: var(--batrah-orange); padding-top: 3px; }
.line { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--soft-dark); }
.line .num { width: 48px; flex-shrink: 0; font-size: 12px; color: var(--grey-500); padding-top: 4px; font-weight: 300; }
.line div { display: flex; flex-direction: column; gap: 2px; } .line b { font-size: 13px; } .line b.ai { color: var(--batrah-orange); }
.line p { font-size: 16px; line-height: 1.7; color: #fff; }
.call-foot { padding-top: 20px; border-top: 1px solid var(--hair-dark); font-size: 13px; line-height: 1.7; color: var(--grey-500); }
.setup { width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.state-box { width: 100%; max-width: 760px; border: 1px solid var(--hair-dark); padding: 16px 20px; font-size: 15px; color: var(--grey-300); }
.state-box.warn { border-color: rgba(255,66,0,.5); color: #fff; }

/* ---- review / session page (panel "مراجعة المحاولة") ---- */
.axes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.axis { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 2px solid var(--batrah-ink); }
.axis.accent { border-top-color: var(--batrah-orange); }
.axis b { font-size: 15px; } .axis .num { font-size: 64px; line-height: 1; text-align: right; } .axis .num.na { color: var(--grey-300); }
.axis .bar { height: 4px; background: var(--grey-100); } .axis .bar i { display: block; height: 4px; background: var(--batrah-ink); width: 0; }
.axis span:last-child { font-size: 14px; color: var(--grey-700); }
.timeline { background: #000; padding: 28px 28px 20px; display: flex; flex-direction: column; gap: 12px; color: #fff; }
.player { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.player audio { width: 100%; }
.legend { display: flex; gap: 24px; font-size: 13px; color: var(--grey-300); }
.legend i { width: 10px; height: 10px; display: inline-block; margin-left: 8px; } .legend .me { background: #fff; } .legend .ai { background: var(--batrah-orange); }
.split { display: flex; flex-wrap: wrap; border: 1px solid var(--hair-light); }
.split > div { flex: 1 1 320px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.split > div + div { background: var(--orange-10); }
.split span { font-size: 14px; font-weight: 700; color: var(--grey-700); } .split p { font-size: 22px; line-height: 1.6; font-weight: 700; }
.split p.soft { font-size: 16px; line-height: 1.7; font-weight: 300; }
.turn { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair-light); }
.turn .num { width: 60px; flex-shrink: 0; font-size: 13px; color: var(--grey-700); font-weight: 300; padding-top: 3px; }
.turn b { font-size: 13px; } .turn b.ai { color: #b33000; } .turn p { font-size: 16px; line-height: 1.7; }
.turn.playing { background: var(--orange-10); }
.mem { border: 1px solid var(--hair-light); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.mem li { font-size: 15px; line-height: 1.7; }

@media (max-width: 760px) {
  .login-hero { padding: 40px 24px; } .login-copy h1 { font-size: 44px; } .login-panel { padding: 40px 24px; }
  .main { padding: 24px 16px 48px; } .kpis, .axes, .checks, .form-grid, .setup, .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-head { padding: 16px; } .call-main { padding: 24px 16px; } .track > span { width: 96px; } .side { min-height: 0; }
}
.field textarea { font-family: var(--font-brand); font-size: 16px; font-weight: 300; line-height: 1.7; color: var(--batrah-ink); background: transparent;
  border: 1px solid rgba(0,0,0,.24); padding: 12px; border-radius: 0; resize: vertical; }
.field textarea:focus { outline: none; border-color: var(--batrah-orange); }
.vstat { font-weight: 700; } .vstat.approved { color: #1d7a49; } .vstat.rejected { color: #b33000; }
