/* Self-hosted fonts (Arabic + Latin) */
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-400-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-500-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-600-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-700-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/ibm-plex-sans-arabic-700-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/ibm-plex-sans-400-latin.woff2') format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/ibm-plex-sans-500-latin.woff2') format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/ibm-plex-sans-600-latin.woff2') format('woff2');}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/ibm-plex-sans-700-latin.woff2') format('woff2');}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/el-messiri-400-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/el-messiri-400-latin.woff2') format('woff2');}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/el-messiri-500-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/el-messiri-500-latin.woff2') format('woff2');}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/el-messiri-600-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/el-messiri-600-latin.woff2') format('woff2');}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/el-messiri-700-arabic.woff2') format('woff2');unicode-range:U+0600-06FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE80-FEFC;}
@font-face{font-family:'El Messiri';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/el-messiri-700-latin.woff2') format('woff2');}

/* ============================================================
   Design tokens
   Warm paper + ink + one emerald accent. Hairlines, no gradients.
   ============================================================ */
:root{
  --primary:#0C6B4F;
  --primary-dark:color-mix(in srgb,var(--primary) 82%,#000);
  --primary-soft:color-mix(in srgb,var(--primary) 12%,transparent);
  --primary-tint:color-mix(in srgb,var(--primary) 28%,#fff);
  --secondary:#16150F; --accent:#B45309;
  --bg:#F8F7F3; --text:#1B1813; --muted:#4C453A; --line:rgba(27,24,19,.12); --line-strong:rgba(27,24,19,.24);
  --card:#FFFFFF; --soft:#F1EFE8; --ink:#12130E;
  --radius:16px; --radius-sm:6px; --radius-md:10px;
  --font:'IBM Plex Sans','IBM Plex Sans Arabic',system-ui,sans-serif;
  --display:'IBM Plex Sans','IBM Plex Sans Arabic',system-ui,sans-serif;
  --fs:16px;
  --shadow-1:0 1px 2px rgba(27,24,19,.06);
  --shadow-2:0 18px 40px -18px rgba(60,45,20,.28);
  --wrap:1200px;
  --t:.2s cubic-bezier(.22,1,.36,1);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--font);font-size:var(--fs);color:var(--text);background:var(--bg);
  line-height:1.75;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  font-feature-settings:"kern" 1;
  /* short pages still fill the screen, so the footer sits at the bottom of the viewport
     instead of floating in the middle of a white band */
  display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;
}
body > .footer{margin-top:auto}
body > *{min-width:0}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,.brand{font-family:var(--display);line-height:1.25;margin:0 0 .5em;letter-spacing:-.015em;font-weight:700}
h1{font-size:clamp(2.1rem,3.4vw,3.15rem);font-weight:800;letter-spacing:-.03em}
h2{font-size:clamp(1.5rem,2vw,1.95rem);font-weight:700}
h3{font-size:1.12rem;font-weight:700}
h4{font-size:.98rem;font-weight:700}
p{margin:0 0 1em}
img{max-width:100%}
::selection{background:rgba(12,107,79,.16)}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:6px}
.container{max-width:var(--wrap);margin:0 auto;padding:0 28px}
.muted{color:var(--muted)}
.small{font-size:.85rem}
.tnum{}
.eyebrow{
  display:inline-flex;align-items:center;gap:8px;font-family:var(--font);font-size:.76rem;
  font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);
}
.eyebrow::before{content:"";width:18px;height:1px;background:var(--line-strong)}
.rule{height:1px;background:var(--line);border:0;margin:0}

/* ============================================================
   Buttons
   ============================================================ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 22px;border-radius:var(--radius-sm);border:1px solid transparent;
  font-family:var(--font);font-size:.93rem;font-weight:600;line-height:1.2;cursor:pointer;
  background:var(--primary);color:#fff;transition:background var(--t),color var(--t),border-color var(--t),transform var(--t);
  white-space:nowrap;
}
.btn:hover{background:var(--primary-dark)}
.btn:active{transform:translateY(1px)}
.btn-ghost{background:transparent;color:var(--text);border-color:var(--line-strong)}
.btn-ghost:hover{background:#fff;border-color:var(--text);color:var(--text)}
.btn-soft{background:var(--soft);color:var(--text);border-color:var(--line)}
.btn-soft:hover{background:#EDE8DC}
.btn-danger{background:#9F1239}
.btn-danger:hover{background:#881337}
.btn-sm{padding:7px 14px;font-size:.83rem}
.btn-lg{padding:14px 26px;font-size:1rem}
.btn-block{width:100%}
.btn-link{background:none;border:0;color:var(--primary);padding:0;font-weight:600;cursor:pointer;font-family:var(--font)}
.btn svg{width:16px;height:16px;flex:none}

/* ============================================================
   Surfaces
   ============================================================ */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow-1)}
.card-flat{box-shadow:none}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:960px){.g2,.g3,.g4{grid-template-columns:1fr}}
.tag{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:var(--soft);color:var(--muted);font-size:.76rem;font-weight:600;border:1px solid var(--line)}
.tag-green{background:#E7F3EC;color:#0A5A42;border-color:#CFE6DA}
.tag-amber{background:#FBF0E0;color:#8A4B08;border-color:#F0DDC2}
.tag-red{background:#FBEAEE;color:#9F1239;border-color:#F2D3DB}
.chip{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:.85rem;font-weight:600}
.dot-sep{width:4px;height:4px;border-radius:50%;background:var(--line-strong);display:inline-block}

/* ============================================================
   Public nav
   ============================================================ */
.nav{position:sticky;top:0;z-index:60;background:rgba(250,248,244,.86);backdrop-filter:saturate(160%) blur(14px);border-bottom:1px solid var(--line)}
.nav-in{display:flex;align-items:center;justify-content:space-between;height:76px;gap:24px}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:700;font-size:1.02rem;color:var(--text);letter-spacing:-.02em}
.brand .dot{
  width:30px;height:30px;border-radius:9px;background:var(--ink);color:#fff;display:grid;place-items:center;
  font-size:.9rem;font-weight:700;flex:none;font-family:var(--display)
}
.nav-links{display:flex;gap:4px;align-items:center}
.nav-links a{color:var(--muted);font-weight:500;font-size:.92rem;padding:8px 12px;border-radius:8px;transition:color var(--t),background var(--t)}
.nav-links a:hover{color:var(--text);background:rgba(23,22,15,.04)}
.nav-links a.btn,.nav-links a.btn-sm{color:#fff;background:var(--primary);margin-inline-start:8px}
.nav-links a.btn-soft{color:var(--text);background:var(--soft);border:1px solid var(--line)}
@media(max-width:860px){.nav-links{display:none}}

/* ============================================================
   Landing
   ============================================================ */
.hero{padding:44px 0 64px;border-bottom:1px solid var(--line);position:relative;overflow:hidden}
.hero::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:linear-gradient(to right,var(--line) 1px,transparent 1px);
  background-size:25% 100%;opacity:.5;
  mask-image:linear-gradient(to bottom,transparent,#000 30%,#000 70%,transparent);
}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:56px;align-items:center;position:relative}
@media(max-width:960px){.hero-grid{grid-template-columns:1fr;gap:36px}}
.hero h1{margin:18px 0 16px}
.hero .lead{font-size:1.08rem;color:var(--muted);max-width:32em;line-height:1.85}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:26px;align-items:center}
.hero-note{display:flex;align-items:center;gap:8px;margin-top:22px;font-size:.83rem;color:var(--muted)}

/* layered product card */
.hero-visual{
  background:#fff;border:1px solid var(--line);border-radius:20px;padding:0;overflow:hidden;
  box-shadow:var(--shadow-2);position:relative
}
.hero-visual .hv-top{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--soft)}
.hero-visual .hv-top b{font-size:.85rem;font-weight:600;color:var(--muted)}
.hero-visual .hv-dots{display:flex;gap:5px}
.hero-visual .hv-dots i{width:8px;height:8px;border-radius:50%;background:var(--line-strong);display:block}
.hero-visual .kpi{padding:24px 20px 4px;font-family:var(--display);font-size:3.4rem;font-weight:800;line-height:1;letter-spacing:-.04em;color:var(--text)}
.hero-visual .kpi-l{padding:0 20px 20px;color:var(--muted);font-size:.88rem}
.hero-visual .row{display:flex;justify-content:space-between;align-items:center;padding:13px 20px;border-top:1px solid var(--line);font-size:.9rem;color:var(--muted)}
.hero-visual .row b{color:var(--text);font-weight:600}
.hero-visual .row:last-child{padding-bottom:18px}

.section{padding:72px 0}
.section.alt{background:var(--soft);border-block:1px solid var(--line)}
.section-head{max-width:46em;margin-bottom:40px}
.section-head h2{margin:10px 0 8px}
.section-head p{color:var(--muted);margin:0}

/* stats strip */
.stats-strip{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:#fff}
@media(max-width:820px){.stats-strip{grid-template-columns:repeat(2,1fr)}}
.stat{padding:26px 24px;border-inline-start:1px solid var(--line)}
.stat:first-child{border-inline-start:0}
@media(max-width:820px){.stat:nth-child(3){border-inline-start:0}}
.stat .v{font-family:var(--display);font-size:2rem;font-weight:800;letter-spacing:-.03em;line-height:1.1}
.stat .l{color:var(--muted);font-size:.86rem;margin-top:4px}

/* feature list (numbered, hairline rows) */
.feature-list{border-top:1px solid var(--line)}
.feature{display:grid;grid-template-columns:44px 1fr;gap:18px;padding:26px 0;border-bottom:1px solid var(--line)}
.feature .ico{
  width:40px;height:40px;border-radius:11px;background:#fff;border:1px solid var(--line);
  display:grid;place-items:center;color:var(--primary);font-size:1rem
}
.feature .ico svg{width:19px;height:19px}
.feature h3{margin:0 0 4px;font-size:1.02rem}
.feature p{margin:0;color:var(--muted);font-size:.92rem;line-height:1.8}
.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0 40px}
@media(max-width:960px){.feature-grid{grid-template-columns:1fr}}

/* quotes */
.quote{border-inline-start:2px solid var(--line-strong);padding:4px 22px}
.quote p{font-size:1rem;line-height:1.9;margin:0 0 14px}
.quote .who{font-size:.85rem;font-weight:600}
.quote .who span{color:var(--muted);font-weight:400}

/* faq */
.faq details{background:transparent;border:0;border-bottom:1px solid var(--line);padding:18px 0}
.faq details[open]{padding-bottom:22px}
.faq summary{font-weight:600;cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:16px;align-items:center}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";color:var(--muted);font-weight:400;font-size:1.1rem}
.faq details[open] summary::after{content:"–"}
.faq p{color:var(--muted);margin:12px 0 0;max-width:60em}

/* cta */
.cta{background:var(--ink);color:#F4F1E9;border-radius:20px;padding:52px;display:grid;grid-template-columns:1.4fr .6fr;gap:32px;align-items:center}
@media(max-width:820px){.cta{grid-template-columns:1fr;padding:34px}}
.cta h2{color:#fff;margin:0 0 10px}
.cta p{color:#BDB9AC;margin:0;max-width:34em}
.cta .btn{background:#F4F1E9;color:var(--ink)}
.cta .btn:hover{background:#fff}

/* courses */
.course-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:24px;display:flex;flex-direction:column;gap:10px;transition:border-color var(--t),transform var(--t),box-shadow var(--t)}
.course-card:hover{border-color:var(--line-strong);box-shadow:var(--shadow-2);transform:translateY(-2px)}
.course-card h3{margin:0}
.course-card p{margin:0;color:var(--muted);font-size:.9rem}
.course-card .cc-foot{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:16px;border-top:1px solid var(--line)}

/* footer */
.footer{background:var(--ink);color:#B9B5A8;padding:56px 0 30px;margin-top:0}
.footer a{color:#E8E5DB}
.footer a:hover{color:#fff}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:40px}
@media(max-width:860px){.footer-grid{grid-template-columns:1fr}}
.footer h4{color:#fff;font-size:.85rem;letter-spacing:.04em;text-transform:uppercase;margin-bottom:14px;font-family:var(--font);font-weight:600}
.footer .small{margin:0 0 8px}
.footer-bottom{margin-top:40px;padding-top:20px;border-top:1px solid rgba(255,255,255,.12);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:.8rem;color:#A9A597}

/* ============================================================
   Auth
   ============================================================ */
.auth-wrap{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:var(--bg)}
@media(max-width:900px){.auth-wrap{grid-template-columns:1fr}}
.auth-side{background:var(--ink);color:#F4F1E9;padding:56px;display:flex;flex-direction:column;justify-content:space-between}
@media(max-width:900px){.auth-side{display:none}}
.auth-side h2{color:#fff;font-size:1.6rem;max-width:16em}
.auth-side p{color:#B9B5A8;max-width:28em;font-size:.95rem}
.auth-side .as-list{display:grid;gap:14px;margin-top:8px}
.auth-side .as-item{display:flex;gap:12px;align-items:flex-start;font-size:.92rem;color:#DAD6C9}
.auth-side .as-item svg{width:18px;height:18px;color:#7FCFAE;flex:none;margin-top:3px}
.auth-main{display:grid;place-items:center;padding:40px 28px}
.auth-card{width:100%;max-width:400px}
.auth-card h1{font-size:1.75rem;margin:0 0 6px}
.auth-card .sub{color:var(--muted);font-size:.92rem;margin:0 0 26px}
.auth-foot{margin-top:22px;font-size:.85rem;color:var(--muted);text-align:center}

/* forms */
.field{margin-bottom:16px}
.field label{display:block;font-size:.85rem;font-weight:600;margin-bottom:7px;color:var(--text)}
.input,select,textarea{
  width:100%;padding:11px 14px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);
  font-family:var(--font);font-size:.94rem;background:#fff;color:var(--text);transition:border-color var(--t),box-shadow var(--t)
}
.input:hover,select:hover,textarea:hover{border-color:#C6BDAB}
.input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(12,107,79,.12)}
textarea{min-height:110px;resize:vertical}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:700px){.form-row{grid-template-columns:1fr}}
.hint{font-size:.8rem;color:var(--muted);margin-top:6px}
.alert{padding:12px 16px;border-radius:var(--radius-sm);margin-bottom:18px;font-size:.9rem;border:1px solid transparent}
.alert-err{background:#FBEAEE;color:#9F1239;border-color:#F2D3DB}
.alert-ok{background:#E7F3EC;color:#0A5A42;border-color:#CFE6DA}
.alert-warn{background:#FBF0E0;color:#8A4B08;border-color:#F0DDC2}

/* ============================================================
   App shell
   ============================================================ */
.app{display:grid;grid-template-columns:256px 1fr;min-height:100vh;background:var(--bg)}
@media(max-width:960px){.app{grid-template-columns:1fr}}
.side{
  background:var(--ink);color:#A9A597;padding:18px 12px 18px;display:flex;flex-direction:column;gap:2px;
  position:sticky;top:0;height:100vh;height:100dvh;max-height:100dvh;overflow-y:auto;scrollbar-width:thin
}
@media(max-width:960px){.side{position:static;height:auto;max-height:none}}
.side .brand{color:#fff;margin:6px 6px 20px;font-size:.98rem}
.side .brand .dot{background:#F4F1E9;color:var(--ink)}
.side .side-label{font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;color:#A9A597;padding:12px 12px 5px;font-weight:600}
.side a{
  color:#A9A597;padding:8px 12px;border-radius:9px;font-size:.88rem;font-weight:500;
  display:flex;gap:11px;align-items:center;transition:background var(--t),color var(--t);position:relative;flex:none
}
.side a svg{width:17px;height:17px;flex:none;opacity:.8}
.side a:hover{background:rgba(255,255,255,.06);color:#fff}
.side a:hover svg{opacity:1}
.side a.active{background:var(--primary-soft);color:#fff;font-weight:600}
.side a.active svg,.side a.active i{opacity:1;color:var(--primary-tint)}
.side a.active::before{content:"";position:absolute;inset-inline-start:-12px;top:8px;bottom:8px;width:3px;background:var(--primary-tint);border-radius:2px}
.side .sep{height:1px;background:rgba(255,255,255,.08);margin:8px 8px;flex:none}
.side .side-foot{margin-top:auto;padding-top:12px;font-size:.75rem;color:#A9A597;padding-inline:12px;flex:none}

.main{padding:0 0 72px;min-width:0}
.main-head{
  position:sticky;top:0;z-index:40;background:rgba(250,248,244,.9);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);padding:16px 34px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap
}
.main-body{padding:28px 34px 0}
@media(max-width:700px){.main-head{padding:14px 18px}.main-body{padding:20px 18px 0}}
.crumbs{display:flex;align-items:center;gap:8px;font-size:.8rem;color:var(--muted);margin-bottom:6px}
.crumbs a:hover{color:var(--text)}
.page-title{font-size:1.45rem;font-weight:700;margin:0;font-family:var(--display);letter-spacing:-.02em}
.page-sub{color:var(--muted);font-size:.9rem;margin:4px 0 0}
.head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--soft);border:1px solid var(--line);display:grid;place-items:center;font-size:.8rem;font-weight:600;color:var(--text)}
.user-chip{display:flex;align-items:center;gap:9px;padding:5px 12px 5px 6px;border:1px solid var(--line);border-radius:999px;background:#fff}
.user-chip .nm{font-size:.83rem;font-weight:600;line-height:1.2}
.user-chip .rl{font-size:.72rem;color:var(--muted);line-height:1.2}

/* page toolbar + tabs */
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px}
.tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-bottom:22px;overflow:auto}
.tabs a{padding:10px 0;font-size:.9rem;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}
.tabs a:hover{color:var(--text)}
.tabs a.active{color:var(--text);border-bottom-color:var(--primary)}
.pill-nav{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px}
.pill-nav a{padding:7px 14px;border-radius:8px;background:transparent;border:1px solid transparent;font-size:.86rem;font-weight:600;color:var(--muted)}
.pill-nav a:hover{background:var(--soft);color:var(--text)}
.pill-nav a.active{background:#fff;color:var(--text);border-color:var(--line);box-shadow:var(--shadow-1)}

/* kpi tiles */
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px}
@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(2,1fr)}}
.kpi-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow-1)}
.kpi-card .l{color:#3E382E;font-size:.86rem;font-weight:600;display:flex;align-items:center;gap:7px}
.kpi-card .l svg{width:15px;height:15px;opacity:.6}
.kpi-card .v{color:var(--ink);font-family:var(--display);font-size:1.9rem;font-weight:800;letter-spacing:-.03em;line-height:1.2;margin-top:6px}
.kpi-card .d{font-size:.82rem;color:#4C453A;margin-top:2px}
.kpi-card .d.up{color:#0A5A42}

/* tables */
.table-wrap{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-1)}
.table-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.table-head h3{margin:0;font-size:.98rem}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:13px 20px;text-align:start;border-bottom:1px solid var(--line);font-size:.9rem;vertical-align:middle}
th{background:var(--soft);font-weight:600;font-size:.78rem;color:var(--muted);letter-spacing:.02em;white-space:nowrap}
td{color:var(--text)}
tbody tr:last-child td{border-bottom:0}
tbody tr{transition:background var(--t)}
tbody tr:hover{background:#FCFAF6}
td .sub{display:block;font-size:.78rem;color:var(--muted);margin-top:2px}
.table-actions{display:flex;gap:6px;justify-content:flex-end}
.empty{padding:44px 20px;text-align:center;color:var(--muted);font-size:.9rem}
.empty svg{width:26px;height:26px;opacity:.35;margin-bottom:8px}

/* progress */
.bar{height:6px;background:#EDE9DF;border-radius:99px;overflow:hidden;min-width:70px}
.bar > i{display:block;height:100%;background:var(--primary);border-radius:99px}
.bar.amber > i{background:var(--accent)}
.progress-line{height:6px;background:#EDE9DF;border-radius:99px;overflow:hidden;margin-top:14px}
.progress-line > i{display:block;height:100%;background:var(--primary)}

/* misc blocks */
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow-1)}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.panel-head h3{margin:0;font-size:.98rem}
.kv{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--line);font-size:.9rem}
.kv:last-child{border-bottom:0}
.kv span{color:var(--muted)}
.kv b{font-weight:600}

/* player + exam */
.player{background:#0A0B08;border-radius:var(--radius);overflow:hidden;aspect-ratio:16/9;border:1px solid var(--line)}
.player iframe{width:100%;height:100%;border:0;display:block}
.exam-head{
  display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid var(--line);
  border-radius:var(--radius);padding:14px 20px;margin-bottom:18px;position:sticky;top:12px;z-index:30;box-shadow:var(--shadow-1);gap:16px;flex-wrap:wrap
}
.timer{font-weight:700;font-size:1.15rem;color:var(--text);font-family:var(--display)}
.timer.warn{color:#9F1239}
.q-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:24px;margin-bottom:14px}
.q-card .q-num{font-size:.76rem;font-weight:600;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.q-card .q-text{font-size:1.02rem;font-weight:600;margin:8px 0 18px;line-height:1.9}
.opt{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:var(--radius-sm);margin-bottom:8px;cursor:pointer;transition:border-color var(--t),background var(--t)}
.opt:hover{border-color:var(--line-strong);background:#FCFAF6}
.opt input{margin-top:4px;accent-color:var(--primary)}
.opt.selected{border-color:var(--primary);background:#F2F8F5}

/* certificate */
.certificate-paper{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:48px;box-shadow:var(--shadow-2)}

/* page header row used by inner views */
.topbar{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-bottom:24px}
.topbar .page-title{font-size:1.55rem}
.hero-copy{max-width:36em}
.section-head .eyebrow{margin-bottom:2px}
.toolbar .section-head h2{font-size:1.4rem}

/* 3D illustration assets (Microsoft Fluent Emoji, MIT) */
.ill{width:56px;height:56px;object-fit:contain;display:block}
.ill-sm{width:36px;height:36px}
.ill-lg{width:84px;height:84px}
.kpi-card .ill{width:40px;height:40px;margin-bottom:10px}
.feature .ill{width:52px;height:52px}
.hero-visual .ill{width:64px;height:64px;margin:0 0 4px}
.stat .ill{width:34px;height:34px;margin-bottom:8px}
.fa-solid,.fa-regular{font-size:.95rem}
.side a .fa-solid,.side a .fa-regular{width:18px;text-align:center;opacity:.85}
.tag .gd{width:7px;height:7px;border-radius:50%;display:inline-block;flex:none}
.hero-visual .ill-lg{margin:22px 20px 0}
.hero-visual .kpi{padding-top:6px}
/* professional icon tiles (Font Awesome) */
.kpi-ico{width:38px;height:38px;border-radius:10px;background:rgba(12,107,79,.09);color:var(--primary);display:grid;place-items:center;font-size:1rem;margin-bottom:12px}
.kpi-ico i{font-size:1rem}
.feature .ico{background:rgba(12,107,79,.07);border-color:transparent;color:var(--primary);width:42px;height:42px;border-radius:12px}
.feature .ico i{font-size:1.05rem}
.table-actions{flex-wrap:nowrap}
td .table-actions{display:flex;gap:6px;justify-content:flex-end}
.course-card .bar{margin-top:4px}
/* student shell: neutralise page-level wrappers inside the app shell */
.main-body .section{padding:0}
.main-body .section > .container{padding:0;max-width:none}
.main-body h1.page-title{font-size:1.5rem}
.student-side a{font-size:.95rem;padding:11px 12px}
/* certificate editor */
.cert-editor{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:20px;align-items:start}
@media(max-width:1100px){.cert-editor{grid-template-columns:1fr}}
.preview-pane{position:sticky;top:90px}
.preview-pane iframe{width:100%;aspect-ratio:297/210;border:1px solid var(--line);border-radius:var(--radius);background:#E9E4D9}
.var-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.var-chip{cursor:pointer;font-family:ui-monospace,monospace;font-size:.78rem;padding:4px 10px}
.var-chip:hover{border-color:var(--primary);color:var(--primary)}
.checkline{display:flex;align-items:center;gap:10px;margin:10px 0;font-size:.92rem}
.checkline input{accent-color:var(--primary);width:17px;height:17px}

/* ---- restored exam / result / ranking classes (new tokens) ---- */
.q{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-bottom:14px}
.q .qtext{font-weight:700;font-size:1.05rem;margin-bottom:14px;line-height:1.7}
.opt{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--radius-md);margin-bottom:8px;cursor:pointer;background:#fff;transition:var(--t)}
.opt:hover{border-color:var(--primary);background:#F3F8F5}
.opt input{accent-color:var(--primary);width:18px;height:18px}
.opt.sel{border-color:var(--primary);background:#E8F3EE}
.opt.correct{border-color:#15803D;background:#DCFCE7}
.opt.wrong{border-color:#B91C1C;background:#FEE2E2}
.result-hero{text-align:center;padding:44px 24px;border-radius:var(--radius);background:var(--ink);color:#F7F3EC;border:1px solid var(--ink);position:relative;overflow:hidden}
.result-hero::after{content:"";position:absolute;inset:auto -40px -60px auto;width:220px;height:220px;border-radius:50%;background:var(--primary);opacity:.35}
.result-hero>*{position:relative;z-index:1}
.result-hero .score{font-family:var(--display);font-size:4.2rem;font-weight:700;line-height:1}
.rank-row{display:flex;align-items:center;gap:14px;padding:12px 16px;border-bottom:1px solid var(--line)}
.rank-row:last-child{border:0}
.rank-badge{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--soft);font-weight:700;font-size:.85rem}
.rank-badge.gold{background:#FDE68A;color:#78350F}
.rank-badge.silver{background:#E5E7EB;color:#374151}
.rank-badge.bronze{background:#F5D0A9;color:#7C2D12}
.swatches{display:flex;gap:8px;flex-wrap:wrap}
input[type=color]{width:46px;height:38px;border:1px solid var(--line);border-radius:var(--radius-md);background:#fff;padding:2px;cursor:pointer}

/* ---- student exam list ---- */
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:22px}
.page-head .page-title{margin:6px 0 6px}
.exam-list{display:grid;gap:14px}
.exam-row{display:flex;align-items:center;gap:22px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px 24px;transition:border-color var(--t),box-shadow var(--t)}
.exam-row:hover{border-color:var(--line-strong);box-shadow:var(--shadow-2)}
.exam-row-main{flex:1;min-width:0}
.exam-row-main h2{font-family:var(--display);font-size:1.22rem;margin:0 0 6px;overflow-wrap:break-word;word-break:normal}
.meta-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.exam-row-side{display:flex;align-items:center;gap:12px;flex:0 0 auto;flex-wrap:wrap}
.score-pill{display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:var(--primary-soft);color:var(--primary);font-weight:700;font-size:1.05rem;border:1px solid color-mix(in srgb,var(--primary) 26%,transparent)}
.score-pill.fail{background:#FBEAEE;color:#9F1239;border-color:#F2D3DB}
@media(max-width:760px){
  .exam-row{flex-direction:column;align-items:stretch;gap:14px;padding:18px}
  .exam-row-side{width:100%;justify-content:flex-start}
}
.empty-state{text-align:center;padding:56px 24px;color:var(--muted)}
.empty-state i{font-size:1.6rem;display:block;margin-bottom:10px;opacity:.6}

/* ---- public content pages ---- */
.page-hero{padding:56px 0 34px;border-bottom:1px solid var(--line)}
.page-hero h1{font-family:var(--display);font-size:clamp(2rem,4.4vw,3.1rem);margin:12px 0 10px;line-height:1.2}
.page-hero p{color:var(--muted);font-size:1.05rem;max-width:56ch}
.page-body{padding:44px 0 60px}
.prose{max-width:760px}
.prose h2{font-family:var(--display);font-size:1.5rem;margin:34px 0 10px}
.prose h2:first-child{margin-top:0}
.prose h3{font-size:1.1rem;margin:24px 0 8px}
.prose p{line-height:2;color:#2B2620;margin:0 0 14px}
.prose ul,.prose ol{padding-inline-start:22px;line-height:2;color:#2B2620}
.prose li{margin-bottom:6px}
.price-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:26px 0 8px}
@media(max-width:900px){.price-grid{grid-template-columns:1fr}}
.price-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:26px 24px;display:flex;flex-direction:column;gap:14px;position:relative}
.price-card.featured{border-color:var(--ink);box-shadow:var(--shadow-2)}
.price-card .plan{font-size:.82rem;font-weight:700;letter-spacing:.04em;color:var(--muted)}
.price-card .amount{font-family:var(--display);font-size:2.4rem;line-height:1;color:var(--ink)}
.price-card .amount small{font-size:.9rem;font-family:var(--font);color:var(--muted);font-weight:400}
.price-card ul{list-style:none;padding:0;margin:0;display:grid;gap:9px}
.price-card li{display:flex;gap:9px;align-items:flex-start;font-size:.92rem;color:#2B2620;line-height:1.7}
.price-card li i{color:var(--primary);margin-top:5px;font-size:.8rem}
.price-card .btn{margin-top:auto}
.badge-flag{position:absolute;inset-inline-end:18px;top:-11px;background:var(--ink);color:#F7F3EC;font-size:.72rem;padding:4px 12px;border-radius:999px}
.faq{margin-top:36px;border-top:1px solid var(--line);padding-top:8px}
.faq details{border-bottom:1px solid var(--line);padding:16px 0}
.faq summary{cursor:pointer;font-weight:600;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";color:var(--muted);font-size:1.1rem}
.faq details[open] summary::after{content:"–"}
.faq p{color:var(--muted);line-height:1.9;margin:10px 0 0}
.teacher-card{display:flex;gap:26px;align-items:center;background:var(--soft);border:1px solid var(--line);border-radius:var(--radius);padding:26px}
.teacher-card .avatar{width:96px;height:96px;border-radius:50%;background:var(--ink);color:#F7F3EC;display:grid;place-items:center;font-family:var(--display);font-size:2rem;flex:none}
.stat-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:30px 0}
@media(max-width:700px){.stat-strip{grid-template-columns:1fr}}
.stat-strip .stat{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px}
.stat-strip .stat b{display:block;font-family:var(--display);font-size:1.7rem;line-height:1.2}
.stat-strip .stat span{color:#4C453A;font-size:.86rem}
.prose:has(.price-grid),.prose:has(.stat-strip){max-width:none}

table .tag{white-space:nowrap}

/* ---- mobile drawer nav ---- */
.nav-tog{display:none}
.nav-btn,.nav-backdrop{display:none}
@media(max-width:960px){
  .nav-btn{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:var(--radius-md);background:#fff;cursor:pointer;color:var(--text);flex:none}
  .side{position:fixed;inset-block:0;inset-inline-end:0;width:272px;max-width:82vw;height:100dvh;z-index:70;transform:translateX(105%);transition:transform .26s cubic-bezier(.22,1,.36,1);box-shadow:-20px 0 50px -20px rgba(0,0,0,.5)}
  html[dir=rtl] .side{transform:translateX(-105%)}
  .nav-tog:checked ~ .app .side{transform:none}
  .nav-tog:checked ~ .nav-backdrop{display:block;position:fixed;inset:0;background:rgba(18,19,14,.42);z-index:65}
  .main-head{flex-wrap:nowrap}
  .head-actions{flex-wrap:nowrap;overflow:auto}
}

/* contrast pass: secondary text never below ~7:1 on cream */
.muted,.small.muted,.page-sub,.crumbs,.prose p,.hero .lead{color:#4C453A}
.side{color:#BDB9AB}
.side a{color:#BDB9AB}

/* destructive row actions: quiet until the pointer is on them */
.btn-danger{background:transparent;color:#9F1239;border:1px solid #E9CDD3;box-shadow:none}
.btn-danger:hover,.btn-danger:focus-visible{background:#9F1239;color:#fff;border-color:#9F1239}
.btn-danger i{opacity:.85}

/* student result: answer rows wrap instead of running past the card edge */
.ans-row{display:flex;align-items:flex-start;gap:10px;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--line)}
.ans-row:last-child{border-bottom:0}
.ans-text{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.65;text-align:start}
.ans-row .tag{flex:0 0 auto;margin-top:2px}

/* exam taking: question number as a chip so the dot does not drift in RTL */
.qnum{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;border-radius:8px;background:var(--soft);font-family:'IBM Plex Sans',var(--font);font-weight:700;font-size:.85rem;margin-inline-end:8px;vertical-align:middle}

/* public site: hamburger menu under 860px (the links used to disappear with no way back) */
.nav-pub-tog{display:none}
.nav-pub-btn{display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;align-items:center;justify-content:center;flex-direction:column;gap:4px;cursor:pointer;background:#fff}
.nav-pub-btn span{display:block;width:16px;height:2px;background:var(--text);border-radius:2px}
@media(max-width:860px){
  .nav-pub-btn{display:inline-flex}
  .nav{position:relative}
  .nav-in{flex-wrap:wrap;row-gap:0}
  .nav-links{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;gap:2px;
    background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 18px 14px;z-index:60;box-shadow:0 12px 24px rgba(23,22,15,.08)}
  .nav-pub-tog:checked ~ .nav-links{display:flex}
  .nav-links a{padding:11px 6px;border-radius:8px}
  .nav-links a.btn{margin-inline-start:0;justify-content:center;margin-top:8px}
  .nav-links a.btn-soft{margin-top:8px;justify-content:center}
}

/* tables on tablets & phones: scroll cleanly sideways without breaking Arabic words char-by-char */
@media(max-width:960px){
  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
  .table-wrap table{min-width:680px}
  .table-wrap th,.table-wrap td{padding-inline:12px;white-space:nowrap}
}

/* filter bars: stack cleanly on phones */
.filter-bar{display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.filter-bar>div{flex:1 1 200px;min-width:0}
@media(max-width:700px){.filter-bar>div{flex:1 1 100%}.filter-bar .btn{width:100%;justify-content:center}}

/* Long unbroken headings/prose wrap gracefully at word boundaries instead of char-by-char in tables */
.qtext,.q-text,h1,h2,h3,h4,.page-title,.course-card h3,.card h3{overflow-wrap:break-word;word-break:normal}

/* empty state: a list with no rows says why, instead of showing a blank card */
.empty{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;padding:34px 20px;color:var(--muted);font-size:.95rem}
.empty i{font-size:1.5rem;color:var(--line-strong)}

/* ---------- sign-in ---------- */
.auth-mark{width:46px;height:46px;border-radius:13px;background:var(--ink);color:#F4F1E9;display:grid;place-items:center;font-size:1.05rem;margin-bottom:18px}
.input-wrap{position:relative}
.input-wrap>i{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:.9rem;pointer-events:none}
.input-wrap .input{padding-inline-start:42px}
.pwd-eye{position:absolute;inset-inline-end:6px;top:50%;transform:translateY(-50%);background:none;border:0;color:var(--muted);padding:9px;cursor:pointer;line-height:1}
.pwd-eye:hover{color:var(--text)}
.auth-submit{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px}
.auth-foot{display:flex;flex-direction:column;gap:8px}
.auth-foot a{color:var(--primary);font-weight:600;text-decoration:none}
.hint{font-size:.78rem;color:var(--muted);margin:7px 0 0;line-height:1.5}
.kv{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid var(--line);font-size:.92rem}
.kv:last-of-type{border-bottom:0}
.kv span{color:var(--muted)}

/* ---------- page photo + numbers strip ---------- */
.page-photo{margin:0 0 26px;max-width:720px}
.page-photo img{width:100%;max-height:420px;object-fit:cover;border-radius:16px;border:1px solid var(--line);display:block}
.page-stats{margin:0 0 26px}
.stats-tbl{margin:10px 0 12px}
.stats-tbl th{font-size:.78rem;font-weight:600;color:var(--muted)}
.stats-tbl td{padding:6px 6px}
.stats-tbl .input{padding:8px 10px;font-size:.85rem}
.upload-row{display:flex;gap:8px;align-items:center}
.upload-row .input{flex:1}

/* ---------- class report ---------- */
.grid.g4{grid-template-columns:repeat(4,1fr);gap:12px}
@media(max-width:980px){.grid.g4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.grid.g4{grid-template-columns:1fr}}
.report-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;flex-wrap:wrap}
.report-kpis{display:flex;gap:26px;flex-wrap:wrap}
.report-kpis div{text-align:center;min-width:82px}
.report-kpis b{display:block;font-size:1.5rem;font-weight:700}
.report-kpis span{font-size:.78rem;color:var(--muted)}

/* ---------- sign-in: one panel, no side column ---------- */
.auth-body{background:var(--bg)}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:32px 18px}
.auth-shell{width:100%;max-width:380px}
.auth-brand{display:block;text-align:center;margin-bottom:22px;text-decoration:none;color:var(--text)}
.auth-brand-name{font-family:var(--display);font-size:1.05rem;font-weight:600;letter-spacing:.01em}
.auth-card h1{font-size:1.45rem;margin:0 0 18px;text-align:center}
.auth-form .field{margin-bottom:14px}
.auth-form .btn-block{width:100%;justify-content:center;padding:12px}
.pwd-wrap{position:relative}
.pwd-wrap .input{padding-inline-end:44px}
.pwd-wrap .pwd-eye{position:absolute;inset-inline-end:4px;top:50%;transform:translateY(-50%);background:none;border:0;color:var(--muted);padding:10px;cursor:pointer;line-height:1}
.auth-help{margin:18px 0 0;text-align:center;font-size:.83rem;color:var(--muted)}
@media(max-width:420px){
  .auth-page{padding:22px 14px;align-items:start;padding-top:56px}
  .auth-card h1{font-size:1.3rem}
}

/* ---------- google sign-in ---------- */
.auth-or{display:flex;align-items:center;gap:10px;margin:16px 0 12px;color:var(--muted);font-size:.8rem}
.auth-or::before,.auth-or::after{content:"";height:1px;background:var(--line);flex:1}
.auth-google{display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}

/* ---------- sign-in: split direction (A) ---------- */
.split-body{background:#FBFAF6;margin:0}
.split-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}
.split-aside{
  position:relative;padding:44px 48px;display:flex;flex-direction:column;justify-content:space-between;
  overflow:hidden;border-inline-end:1px solid var(--line);
  background:#FBFAF6;
}
.split-grid{
  position:absolute;inset:0;opacity:.55;
  background-image:linear-gradient(#E6E1D6 1px,transparent 1px),linear-gradient(90deg,#E6E1D6 1px,transparent 1px);
  background-size:32px 32px;
  -webkit-mask-image:radial-gradient(120% 90% at 70% 30%,#000 0%,transparent 78%);
  mask-image:radial-gradient(120% 90% at 70% 30%,#000 0%,transparent 78%);
}
.split-mark{position:relative;display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text)}
.split-mark b{font-family:var(--heading);font-size:1rem;font-weight:600}
.split-badge{
  width:34px;height:34px;border-radius:10px;background:var(--primary);color:#F4F1E9;
  display:grid;place-items:center;font-family:var(--heading);font-size:1.05rem;font-weight:700;flex:none
}
.split-logo{width:34px;height:34px;border-radius:10px;object-fit:cover;flex:none}
.split-mid{position:relative;max-width:100%}
.split-mid h2{font-size:2.15rem;line-height:1.4;margin:0 0 14px;font-weight:600;color:var(--text);max-width:14em}
.split-mid p{color:var(--muted);font-size:.95rem;line-height:1.9;margin:0}
.split-watermark{
  position:absolute;inset-inline-start:44px;bottom:104px;font-family:var(--heading);
  font-size:6.5rem;color:var(--primary);opacity:.04;line-height:1;letter-spacing:-.02em;user-select:none;pointer-events:none
}
.split-foot{position:relative;font-size:.78rem;color:var(--muted)}
.split-main{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 32px;min-height:100vh;min-height:100dvh}
.split-card{width:100%;max-width:352px}
.split-card h1{font-size:1.5rem;margin:0 0 4px}
.split-sub{color:var(--muted);font-size:.88rem;margin:0 0 26px}
.split-btn{width:100%;justify-content:center;padding:0 16px;margin-top:4px}
.split-help{margin:18px 0 0;text-align:center;font-size:.82rem;color:var(--muted)}
.field-err{margin:0 0 14px;padding:10px 12px;border-radius:10px;background:#FBEAEE;color:#9F1239;border:1px solid #F2D3DB;font-size:.85rem;line-height:1.6}
.split-btn[disabled]{opacity:.75;cursor:progress}
.split-btn .fa-spinner{margin-inline-end:8px}
.split-phone-brand{display:none}
@media(max-width:900px){
  .split-page{grid-template-columns:1fr;min-height:100vh;min-height:100dvh}
  .split-aside{display:none}
  /* Phone: the block (mark + form) sits in the middle of the viewport. Auto margins centre it
     when it fits and leave it scrollable from the top when the content is taller than a short
     screen, which justify-content:center would clip. dvh keeps it right as the address bar
     shows and hides, and the browser still scrolls the focused field into view. */
  .split-main{justify-content:flex-start;padding:26px 20px;min-height:100vh;min-height:100dvh}
  .split-phone-brand{margin:0}
  .split-card{margin-top:auto;margin-bottom:auto}
  .split-phone-brand{
    display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--text);
    margin-bottom:24px;font-family:var(--heading);font-size:.95rem;color:var(--primary)
  }
  .split-phone-brand span{font-weight:600}
  .split-card{max-width:none;padding:22px}
  .split-card h1{font-size:1.4rem}
}

/* ---------- language switch ---------- */
.lang-switch{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--line);border-radius:999px;background:#fff}
.lang-switch .lang-opt{padding:4px 10px;border-radius:999px;font-size:.78rem;font-weight:600;color:var(--muted);text-decoration:none;line-height:1.4}
.lang-switch .lang-opt:hover{color:var(--text)}
.lang-switch .lang-opt.is-on{background:var(--primary);color:#fff}
.side nav .lang-switch{margin:6px 0 10px}
.split-lang{position:absolute;inset-inline-end:48px;top:48px}
.split-phone-lang{position:absolute;inset-inline-end:20px;top:32px;display:none}
/* phone header: brand and language switch share one row instead of overlapping */
.split-top{display:none}
@media(max-width:900px){.split-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
  .split-top .split-phone-brand{margin-bottom:0;min-width:0}
  .split-top .split-phone-brand span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .split-top .split-phone-lang{position:static;display:block;flex:none}}
@media(max-width:900px){.split-phone-lang{display:block}}
.auth-lang{display:flex;justify-content:center;margin-bottom:14px}

/* English tables: keep phone numbers and short status words on one line */
.table-wrap td:has(.tnum){white-space:nowrap}
.table-wrap td .tag,.table-wrap td .badge{white-space:nowrap}
html[lang="en"] .table-wrap td:last-child{white-space:nowrap}
.table-wrap td[dir="ltr"]{white-space:nowrap}
html[lang="en"] .table-wrap td{white-space:nowrap}
html[lang="en"] .table-wrap th:nth-child(5),html[lang="en"] .table-wrap td:nth-child(5){white-space:nowrap}

/* ---- verify page: sample certificate card (clearly a sample) ---- */
.sample-cert{
  margin-top:26px;padding:22px 22px 18px;border-radius:16px;position:relative;
  background:linear-gradient(180deg,#fffdf8,#fbf7ee);border:1px solid var(--line);
  box-shadow:0 1px 0 rgba(18,19,14,.04),0 18px 40px -30px rgba(18,19,14,.5);
}
.sample-cert::before{content:"";position:absolute;inset:6px;border-radius:11px;border:1px dashed #ddd3bd;pointer-events:none}
.sc-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.sc-badge{font-size:12px;font-weight:700;letter-spacing:.02em;color:#8a5a12;background:#fdf1d8;border:1px solid #f0dcb4;border-radius:999px;padding:4px 10px}
.sc-seal{color:var(--primary);opacity:.85}
.sample-cert h3{margin:2px 0 6px;font-size:20px}
.sc-line{margin:0 0 14px;color:#4a4a42;font-size:14px}
.sc-rows{display:grid;gap:8px;margin-bottom:16px}
.sc-rows>div{display:flex;justify-content:space-between;gap:12px;font-size:13px;border-bottom:1px dashed #e7dfcd;padding-bottom:6px}
.sc-rows span{color:#7a7568}
.sc-rows b{color:#c9c2b1;font-weight:600}
.sc-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sc-serial{font-family:ui-monospace,Menlo,monospace;font-size:12px;letter-spacing:.08em;color:#8a8577;background:#f3efe3;border-radius:8px;padding:5px 9px}
.sc-qr{width:54px;height:54px;border-radius:8px;border:1px dashed #cfc6b1;background:
  repeating-conic-gradient(#e6dfcd 0 25%, transparent 0 50%) 0 0/10px 10px}
.sc-note{margin:12px 0 0;font-size:12px;color:#8a8577}

/* ---- contact page: two-column contact cards ---- */
.contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:8px 0 0}
.contact-card{display:flex;flex-direction:column;gap:6px;padding:20px;border:1px solid var(--line);border-radius:14px;background:#fff}
.contact-card .cc-k{font-size:13px;color:#7a7568}
.contact-card .cc-v{font-size:18px;font-weight:600;direction:ltr;text-align:start}
@media (max-width:640px){.contact-grid{grid-template-columns:1fr}}
.contact-card{position:relative;padding-top:22px}
.contact-card .cc-i{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:11px;background:#eef4f1;color:var(--primary);margin-bottom:10px}
.contact-card .cc-k{font-size:13px;color:#7a7568}
.contact-card .cc-v{font-size:19px;font-weight:600;text-align:start;unicode-bidi:isolate;letter-spacing:.01em}
.verify-form{display:flex;gap:8px;margin:18px 0 22px}
.verify-form .input{flex:1 1 220px;min-width:0}
@media (max-width:560px){.verify-form{flex-wrap:wrap}.verify-form .btn{width:100%}}
.contact-card .cc-v{direction:inherit;text-align:start;unicode-bidi:isolate}
.split-phone-statement{display:none!important}
@media (max-width:900px){
  .split-phone-statement{display:block;margin:34px auto 0;max-width:360px;text-align:center;padding-top:22px;border-top:1px solid rgba(18,19,14,.08)}
  .split-phone-statement h2{font-size:19px;line-height:1.6;margin:0 0 8px;color:#2b2b24}
  .split-phone-statement p{margin:0;font-size:13px;color:#7a7568}
}
.auth-line{margin:22px 0 0;text-align:center;font-size:12.5px;color:#8a8577;max-width:340px;line-height:1.7}

/* ---- hero numbers on a phone: a compact 2x2 strip instead of a tall card ---- */
@media (max-width:900px){
  .hero-visual{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px;border-radius:14px}
  .hero-visual .hv-top{display:none}
  .hero-visual .kpi{grid-column:1/-1;padding:6px 12px 0;font-size:2.2rem}
  .hero-visual .kpi-l{grid-column:1/-1;padding:0 12px 8px;font-size:.82rem}
  .hero-visual .row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;font-size:.8rem;line-height:1.3}
  .hero-visual .row:last-child{padding-bottom:9px;grid-column:1/-1}
  .hero-visual .row span{flex:1 1 auto}
  .hero-visual .row b{white-space:nowrap}
}


/* ============================================================
   UI pass, batch 1 (Gemini round 1)
   ============================================================ */
/* The lessons chip was a flex item, so it stretched across the card and read as a broken image strip. */
.course-card .tag{align-self:flex-start}
/* Tighter section rhythm so the landing page reads as one page, not five blocks. */
.section{padding:56px 0}
@media(max-width:700px){.section{padding:36px 0}}
/* Feature icons get a soft emerald tile instead of a bare glyph. */
.feature .ico{width:44px;height:44px;border-radius:12px;background:rgba(12,107,79,.10);display:grid;place-items:center;color:var(--primary)}
.feature .ico svg{width:22px;height:22px}
.feature .ico i{font-size:19px}
/* Testimonials as quote cards. */
.quote{background:#fff;border:1px solid var(--line);border-inline-start:3px solid var(--primary);border-radius:14px;padding:26px 22px 18px;position:relative}
.quote::before{content:"\201D";position:absolute;top:2px;inset-inline-end:18px;font-family:var(--display);font-size:40px;line-height:1.2;color:rgba(12,107,79,.16)}
.quote p{position:relative;z-index:1}
/* Ordinary state is a dot; the badge is kept for the exception. */
.status{display:inline-flex;align-items:center;gap:7px;font-size:.88rem;color:var(--muted);white-space:nowrap}
.status i{width:8px;height:8px;border-radius:50%;background:var(--primary);display:inline-block;flex:none}
.status.off i{background:#9F1239}
/* Row actions behind one menu (details/summary, no JavaScript). */
.row-menu{position:relative;display:inline-block}
.row-menu>summary{list-style:none;cursor:pointer;border:1px solid var(--line);background:#fff;border-radius:8px;width:30px;height:30px;display:grid;place-items:center;color:var(--muted)}
.row-menu>summary::-webkit-details-marker{display:none}
.row-menu[open]>summary{border-color:var(--line-strong);color:var(--text)}
.row-menu .menu{position:absolute;inset-inline-end:0;top:34px;z-index:40;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-2);min-width:150px;padding:6px;display:flex;flex-direction:column;gap:2px}
.row-menu .menu a,.row-menu .menu button{display:block;width:100%;text-align:start;padding:8px 10px;border-radius:7px;font-size:.87rem;color:var(--text);background:none;border:0;cursor:pointer;font-family:var(--font)}
.row-menu .menu a:hover,.row-menu .menu button:hover{background:var(--soft)}
.row-menu .menu .danger{color:#9F1239}
/* The students table becomes a card per student on tablets & phones. */
@media(max-width:860px){
  .table-wrap .students-table{display:block;width:100%;min-width:0}
  .students-table tbody{display:block;width:100%}
  .students-table thead{display:none}
  .students-table tbody tr{display:block;border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px 14px;margin-bottom:10px}
  .students-table td{display:flex;align-items:center;justify-content:space-between;gap:12px;border:0;padding:5px 0;white-space:normal}
  .students-table td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:.78rem}
  .students-table td.cell-actions{justify-content:flex-end;border-top:1px solid var(--line);margin-top:6px;padding-top:10px}
}
/* Login: a defined form card instead of a column floating in empty space. */
.split-card{width:100%;max-width:352px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:28px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.split-card .input,.split-card .btn{height:46px;font-size:1rem}
.split-card .input.dir-ltr{direction:ltr;text-align:left}
.split-card .pwd-eye{width:40px;height:40px}
/* On a phone the promo panel is replaced by the compact header the layout already has. */
@media(max-width:700px){.split-aside{display:none}}
/* Student dashboard: the resume card and the zero-progress state. */
.resume{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--ink);color:#F4F1E9;border-radius:16px;padding:20px 22px;margin-bottom:22px;flex-wrap:wrap}
.resume .eyebrow{color:rgba(244,241,233,.62)}
.resume h3{margin:6px 0 0;color:#fff;font-size:1.15rem}
.resume .btn{background:#F4F1E9;color:var(--ink);flex:none}
.resume .btn:hover{background:#fff}


/* ============================================================
   Design-system pass 2 - shared app shell (admin, student, owner)
   The frame every screen inherits: spacing, type, tables, cards, states.
   ============================================================ */
:root{
  --radius:16px; --radius-sm:10px;
  --shadow-1:0 1px 2px rgba(23,22,15,.05), 0 1px 3px rgba(23,22,15,.04);
  --shadow-2:0 6px 20px rgba(23,22,15,.08), 0 2px 6px rgba(23,22,15,.05);
}
/* --- sidebar --- */
.app{grid-template-columns:252px 1fr}
.side{padding:18px 12px 22px;gap:1px}
.side .brand{margin:4px 8px 18px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.08);font-size:1rem;letter-spacing:-.01em}
.side .brand .dot{width:32px;height:32px;border-radius:10px}
.side .side-label{padding:16px 12px 7px;font-size:.66rem;letter-spacing:.14em;color:#8C8878}
.side a{padding:9px 12px;border-radius:10px;font-size:.885rem;gap:12px}
.side a i{font-size:.95rem;width:18px;text-align:center;opacity:.75}
.side a.active{background:var(--primary-soft);color:#fff;font-weight:600}
.side a.active i{color:var(--primary-tint);opacity:1}
.side a.active::before{inset-inline-start:-12px;top:8px;bottom:8px;width:3px}
.side .sep{margin:10px 10px}
/* --- top bar --- */
.main-head{padding:14px 30px;gap:16px;background:rgba(250,248,244,.94)}
.crumbs{margin-bottom:2px;font-size:.78rem;letter-spacing:.01em}
.page-title{font-size:1.4rem}
.user-chip{padding:4px 12px 4px 5px}
/* --- content width and rhythm --- */
.main-body{padding:26px 30px 0;max-width:1280px;width:100%;margin-inline:auto}
@media(max-width:700px){.main-body{padding:18px 16px 0}}
.topbar{margin-bottom:22px}
/* --- buttons --- */
.btn{height:40px;padding:0 18px;border-radius:10px;font-size:.9rem;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn-sm{height:32px;padding:0 12px;font-size:.82rem;border-radius:8px}
.btn-lg{height:48px;padding:0 26px;font-size:1rem;border-radius:12px}
/* --- cards --- */
.card{padding:24px;border-radius:var(--radius);box-shadow:var(--shadow-1)}
.card h3{font-size:1rem;margin:0 0 14px}
/* --- kpi tiles --- */
.kpi-grid{gap:16px;margin-bottom:22px}
.kpi-card{padding:20px 22px;border-radius:var(--radius);position:relative;transition:box-shadow var(--t),transform var(--t)}
.kpi-card:hover{box-shadow:var(--shadow-2);transform:translateY(-1px)}
.kpi-card .kpi-ico{position:absolute;top:18px;inset-inline-start:20px;width:34px;height:34px;border-radius:10px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:.9rem}
.kpi-card .l{font-size:.84rem;color:var(--muted);font-weight:600;padding-inline-start:46px;min-height:34px;display:flex;align-items:center}
.kpi-card .v{font-size:2rem;margin-top:10px}
.kpi-card .d{font-size:.8rem}
/* --- tables --- */
.table-wrap{border-radius:var(--radius)}
.table-head{padding:16px 22px}
.table-head h3{font-size:1rem;font-weight:700}
th,td{padding:14px 22px}
th{background:#FAF8F3;font-size:.74rem;letter-spacing:.06em;color:#6C6656;border-bottom:1px solid var(--line)}
tbody tr:hover{background:#FCFBF7}
td:first-child{font-weight:600;color:var(--ink)}
td:first-child .small{font-weight:400}
/* --- empty state --- */
.empty{border:1px dashed var(--line-strong);border-radius:14px;margin:16px;padding:40px 20px;background:#FCFBF7}
.empty i{font-size:1.4rem;opacity:.4;display:block;margin-bottom:10px}
/* --- forms --- */
.input,select,textarea{border-radius:10px;min-height:42px}
.field label{font-size:.83rem;color:#4C453A}
/* --- sidebar language switch on dark --- */
.side .lang-switch{display:flex;width:auto;max-width:100%;margin:6px 10px 4px;padding:3px;background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.12);border-radius:10px}
.side .lang-switch .lang-opt{flex:1;text-align:center;color:#BDB9AB;border-radius:8px;padding:5px 8px}
.side .lang-switch .lang-opt:hover{color:#fff}
.side .lang-switch .lang-opt.is-on{background:var(--primary);color:#fff}
/* --- numbers sit on one axis --- */
th.n,td.n{text-align:end}
td.n .tnum,td.tnum{font-variant-numeric:tabular-nums}
/* --- needs attention --- */
.attn-wrap{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-1);padding:18px 22px;margin-bottom:22px}
.attn-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.attn-head h3{margin:0;font-size:1rem;font-weight:700}
.attn-ok{font-size:.82rem;color:#0A5A42;display:inline-flex;align-items:center;gap:6px}
.attn-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.attn-item{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:#FCFBF7;text-decoration:none;color:var(--ink);transition:border-color var(--t),background var(--t)}
.attn-item:hover{border-color:var(--line-strong);background:#F7F5EF}
.attn-ico{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:rgba(180,120,20,.10);color:#8A5A0B;font-size:.82rem}
.attn-txt{font-size:.86rem;font-weight:600;line-height:1.35}
.attn-n{margin-inline-start:auto;font-weight:800;color:var(--ink);font-size:1rem}
/* --- dashboard tables become cards on a phone --- */
@media (max-width:700px){
  .dash{display:block}
  .dash thead{display:none}
  .dash tbody{display:block}
  .dash tr{display:block;padding:12px 16px;border-bottom:1px solid var(--line)}
  .dash tr:last-child{border-bottom:0}
  .dash td{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:3px 0;border:0;font-size:.88rem;text-align:start}
  .dash td::before{content:attr(data-l);color:var(--muted);font-size:.76rem;font-weight:600;flex:none}
  .dash td:first-child{font-weight:700}
  .table-wrap:has(.dash){overflow-x:visible}
  .table-wrap:has(.dash) table{min-width:0}
  .crumbs a,.crumbs span:first-of-type{display:none}
  .crumbs{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .main-head{height:auto;min-height:60px;padding-block:10px}
}
/* --- rhythm and density: dashboard zones --- */
.main-body > .attn-wrap{margin-bottom:24px}
.main-body > .kpi-grid{margin-bottom:36px}
.kpi-card{padding:18px 20px;border-radius:12px}
.kpi-card .v{font-size:1.75rem;font-weight:700;font-variant-numeric:tabular-nums;margin-top:8px}
.kpi-card .l{font-size:.82rem}
.kpi-card .d{font-size:.78rem;margin-top:4px}
.attn-wrap{padding:16px 20px;border-radius:12px}
.attn-head{margin-bottom:10px}
@media (max-width:700px){
  .kpi-grid{grid-auto-flow:column;grid-auto-columns:78%;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px;padding-bottom:6px}
  .kpi-card{scroll-snap-align:start}
}
.kpi-card .v{font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;font-weight:700}
.topbar{margin-bottom:18px}
@media (max-width:700px){
  /* the snap rail clipped long Arabic labels; a 2x2 grid reads better than a broken card */
  .kpi-grid{grid-auto-flow:row;grid-auto-columns:auto;overflow:visible;scroll-snap-type:none;grid-template-columns:1fr 1fr;gap:12px;padding-bottom:0}
  .kpi-card .l{padding-inline-start:0;min-height:0}
  .kpi-card .kpi-ico{position:static;margin-bottom:8px}
}
/* --- dashboard trend chart --- */
.dash-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:16px;align-items:start}
@media (max-width:900px){.dash-grid{grid-template-columns:1fr}}
.chart-card{padding:20px 22px}
.chart-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.chart-head h3{margin:0;font-size:1rem;font-weight:700}
.chart-total{font-size:.82rem;color:var(--muted)}
.chart-total b{color:var(--ink);font-size:1rem}
.chart{display:flex;align-items:flex-end;gap:6px;height:170px;padding-top:18px}
.chart-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:6px;position:relative}
.chart-bar{width:100%;max-width:34px;background:var(--primary);border-radius:6px 6px 3px 3px;min-height:2px}
.chart-col:hover .chart-bar{background:var(--primary);filter:brightness(.92)}
.chart-v{font-size:.72rem;font-weight:700;color:var(--ink);min-height:14px}
.chart-x{font-size:.68rem;color:var(--muted)}
.chart-foot{font-size:.72rem;color:var(--muted);margin-top:10px;border-top:1px solid var(--line);padding-top:8px}
.chart-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:170px;border:1px dashed var(--line-strong);border-radius:12px;background:#FCFBF7;color:var(--text);font-size:.9rem;text-align:center}
.chart-empty i{font-size:1.4rem;opacity:.35;margin-bottom:4px}
.review-list{display:flex;flex-direction:column;gap:8px}
.review-item{display:flex;align-items:center;gap:10px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:#FCFBF7;text-decoration:none;color:var(--ink)}
.review-item:hover{border-color:var(--line-strong)}
.review-pct{flex:none;min-width:44px;text-align:center;font-weight:800;font-size:.86rem;color:#8A2B12;background:rgba(180,60,20,.10);border-radius:8px;padding:5px 6px}
.review-txt{display:flex;flex-direction:column;line-height:1.3;min-width:0}
.review-txt b{font-size:.86rem}
.review-txt .small{font-size:.74rem}
.empty-mini{display:flex;align-items:center;gap:8px;color:#0A5A42;font-size:.86rem;padding:14px;border:1px dashed var(--line-strong);border-radius:10px;background:#FCFBF7}
/* In Arabic the form column sits on the reading-start side (right), not behind the marketing panel. */
html[dir="rtl"] .split-main{order:-1}
/* --- login panel: substance --- */
.split-points{list-style:none;margin:26px 0 0;padding:0;display:grid;gap:14px}
.split-points li{display:flex;gap:12px;align-items:flex-start}
.split-points i{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-size:.82rem;margin-top:2px}
.split-points b{display:block;font-size:.92rem;color:var(--text);font-weight:700;line-height:1.45}
.split-points small{display:block;font-size:.79rem;color:var(--muted);line-height:1.6;margin-top:2px}
.split-mock{margin-top:26px;max-width:100%;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:0 10px 26px rgba(15,23,42,.06)}
.mock-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.mock-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.mock-kicker{font-size:.7rem;color:var(--muted);font-weight:600}
.mock-title{font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;font-size:.95rem;font-weight:700;color:var(--text);margin-bottom:12px}
.mock-meta{display:flex;align-items:center;justify-content:space-between;font-size:.75rem;color:var(--muted);margin-bottom:7px}
.mock-meta b{color:var(--primary);font-weight:800;font-size:.8rem}
.mock-foot{display:flex;align-items:center;gap:6px;font-size:.72rem;color:var(--muted);border-top:1px solid #F0ECE2;padding-top:10px;margin-top:2px}
.mock-foot i{color:var(--primary);font-size:.75rem}
.mock-dot{width:9px;height:9px;border-radius:50%;background:var(--primary);flex:none}
.mock-line{display:block;height:7px;border-radius:4px;background:#EDE9DF}
.w80{width:80%}.w60{width:60%}.w50{width:50%}
.mock-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.mock-chip{font-size:.7rem;font-weight:800;color:var(--primary);background:var(--primary-soft);border-radius:6px;padding:3px 7px}
.mock-chip.soft{color:var(--muted);background:#F2EEE4}
.mock-bar{height:7px;border-radius:4px;background:#EDE9DF;overflow:hidden;margin-bottom:12px}
.mock-bar i{display:block;height:100%;margin-inline-end:auto;background:var(--primary)}
@media(max-width:900px){.split-points,.split-mock{display:none}}

/* ============================================================
   Platform owner (super admin) screens
   ============================================================ */
.filters{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin-bottom:18px}
.filters .field{min-width:150px;flex:1 1 150px}
.filters .field label{font-size:.78rem;color:var(--muted);margin-bottom:5px;display:block}
.filters .input{height:40px;font-size:.9rem}
.grid-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.grid-form .field label{display:block;font-size:.8rem;color:var(--muted);margin-bottom:5px}
.form-actions{grid-column:1/-1;display:flex;gap:10px;justify-content:flex-end;margin-top:4px}
.row-title{font-weight:700;color:var(--text);text-decoration:none}
.row-title:hover{color:var(--primary)}
.row-sub{font-size:.76rem;color:var(--muted);margin-top:2px}
.owner-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px;border-bottom:1px solid var(--line)}
.owner-tabs a{padding:10px 14px;border-radius:10px 10px 0 0;font-size:.9rem;font-weight:600;color:var(--muted);text-decoration:none;border-bottom:2px solid transparent}
.owner-tabs a.active{color:var(--text);border-bottom-color:var(--primary);background:#fff}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:22px}
.stat-box{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 18px}
.stat-box .l{font-size:.8rem;color:var(--muted);margin-bottom:6px}
.stat-box .v{font-size:1.5rem;font-weight:800;color:var(--text);line-height:1.1}
.stat-box .d{font-size:.75rem;color:var(--muted);margin-top:6px}
.limit-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed var(--line)}
.limit-row:last-child{border-bottom:0}
.limit-bar{height:7px;border-radius:4px;background:#EDE9DF;overflow:hidden;margin-top:8px}
.limit-bar i{display:block;height:100%;background:var(--primary);margin-inline-end:auto}
.limit-bar.full i{background:#B45309}
.limit-note{font-size:.78rem;color:#8A4B08;margin-top:6px}
.danger-zone{border:1px solid #F2D3DB;background:#FFF9FA;border-radius:14px;padding:18px 20px}
.danger-zone h3{color:#9F1239;margin:0 0 6px;font-size:.95rem}
.danger-zone p{margin:0 0 12px;font-size:.85rem;color:#7a4b57}
.kpi-grid.five{grid-template-columns:repeat(5,1fr)}
@media (max-width:1100px){.kpi-grid.five{grid-template-columns:repeat(3,1fr)}}
@media (max-width:700px){.kpi-grid.five{grid-template-columns:repeat(2,1fr)}}
.attn-okbar{display:flex;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:0 16px;height:52px;margin-bottom:22px;color:var(--muted);font-size:.88rem}
.attn-okbar i{color:var(--primary)}
.danger-zone .btn[disabled]{opacity:.5;cursor:not-allowed}

/* ============================================================
   Platform public pages (product-level, never tenant-scoped)
   ============================================================ */
.pf-body{background:var(--bg);color:var(--text)}
.pf-wrap{width:100%;max-width:1120px;margin:0 auto;padding:0 24px}
.pf-head{position:sticky;top:0;z-index:20;background:rgba(247,243,236,.92);backdrop-filter:saturate(140%) blur(8px);border-bottom:1px solid var(--line)}
.pf-head-in{display:flex;align-items:center;gap:20px;height:68px}
.pf-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);font-weight:700}
.pf-dot{width:32px;height:32px;border-radius:9px;background:var(--primary);color:#fff;display:grid;place-items:center;font-size:.95rem}
.pf-nav{display:flex;gap:4px;margin-inline-start:auto;flex-wrap:wrap}
.pf-nav a{padding:8px 12px;border-radius:9px;font-size:.9rem;color:var(--muted);text-decoration:none;font-weight:600}
.pf-nav a:hover{color:var(--text);background:#fff}
.pf-nav a.active{color:var(--primary);background:#fff;border:1px solid var(--line)}
.pf-head-act{display:flex;gap:8px}
.pf-main{display:block;min-height:60vh}
.pf-hero{padding:64px 0 40px;border-bottom:1px solid var(--line)}
.pf-eyebrow{font-size:.8rem;font-weight:700;color:var(--primary);letter-spacing:.02em}
.pf-hero h1{font-size:2.4rem;line-height:1.35;margin:10px 0 12px;max-width:22em}
.pf-hero p{margin:0;color:var(--muted);font-size:1.02rem;max-width:38em;line-height:1.9}
.pf-plans{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:44px 24px}
.pf-plan{background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px 24px;display:flex;flex-direction:column;gap:18px}
.pf-plan-pro{border-color:rgba(12,107,79,.35);box-shadow:0 18px 40px -30px rgba(12,107,79,.5)}
.pf-plan-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:14px}
.pf-plan-head h2{font-size:1.15rem;margin:0}
.pf-price b{font-size:1.7rem;font-weight:800}
.pf-price span{color:var(--muted);font-size:.85rem}
.pf-price-none{font-size:.85rem;color:var(--muted);background:var(--soft);border:1px solid var(--line);border-radius:999px;padding:4px 12px}
.pf-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.pf-list li{display:flex;gap:10px;align-items:flex-start;font-size:.92rem;color:var(--text);line-height:1.7}
.pf-list i{color:var(--primary);margin-top:5px;font-size:.85rem;flex:none}
.pf-fine{font-size:.78rem;color:var(--muted);margin:10px 0 0}
.pf-steps{padding:10px 24px 64px}
.pf-steps h2{font-size:1.2rem;margin:0 0 16px}
.pf-steps ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:16px;counter-reset:s}
.pf-steps li{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px}
.pf-steps b{display:block;margin-bottom:6px}
.pf-steps span{color:var(--muted);font-size:.88rem;line-height:1.8}
.pf-two{display:grid;grid-template-columns:1.6fr 1fr;gap:32px;padding:44px 24px 72px;align-items:start}
.pf-prose h2{font-size:1.1rem;margin:26px 0 10px}
.pf-prose h2:first-child{margin-top:0}
.pf-prose p{color:var(--muted);line-height:1.95;margin:0 0 10px}
.pf-side{position:sticky;top:88px}
.pf-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px}
.pf-card h3{margin:0 0 8px;font-size:.98rem}
.pf-card p{margin:0;color:var(--muted);font-size:.88rem;line-height:1.85}
.pf-doc{max-width:760px;padding-block:44px 72px}
.pf-note{background:#fff;border:1px dashed var(--line-strong);border-radius:12px;padding:14px 16px;color:var(--muted);font-size:.9rem}
.pf-contact{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:10px}
.pf-contact li{display:flex;gap:10px;align-items:center;font-size:.95rem}
.pf-contact i{color:var(--primary)}
.pf-contact a{color:var(--text);text-decoration:none;font-weight:600}
.pf-foot{border-top:1px solid var(--line);background:#fff;padding:34px 0 22px;margin-top:20px}
.pf-foot-in{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap}
.pf-foot b{font-size:1rem}
.pf-foot p{margin:6px 0 0;color:var(--muted);font-size:.86rem;max-width:34em;line-height:1.8}
.pf-foot-links{display:flex;gap:16px;flex-wrap:wrap}
.pf-foot-links a{color:var(--muted);text-decoration:none;font-size:.88rem}
.pf-copy{color:var(--muted);font-size:.8rem;margin-top:22px;border-top:1px solid var(--line);padding-top:14px}
@media(max-width:900px){
  .pf-hero h1{font-size:1.7rem}
  .pf-plans,.pf-steps ol,.pf-two{grid-template-columns:1fr}
  .pf-nav{display:none}
  .pf-side{position:static}
}

/* Share dialog on the teacher's public pages */
.share-dlg{border:0;border-radius:18px;padding:24px;max-width:360px;width:calc(100% - 32px);box-shadow:0 30px 70px -30px rgba(18,19,14,.5)}
.share-dlg::backdrop{background:rgba(18,19,14,.42)}
.share-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.share-head h3{margin:0;font-size:1.05rem}
.share-x{border:0;background:transparent;font-family:var(--font);font-size:1.5rem;line-height:1;color:var(--muted);cursor:pointer}
.share-sub{margin:6px 0 16px;color:var(--muted);font-size:.86rem;line-height:1.8}
.share-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.share-qr{display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;min-height:172px}
.share-qr img,.share-qr canvas{display:block}
.share-fine{margin:10px 0 0;font-size:.8rem;color:var(--primary);text-align:center}

/* the real platform icon, used wherever the letter mark used to sit */
.brand-mark{width:34px;height:34px;border-radius:9px;display:block;flex:none;object-fit:cover}
.brand .brand-mark{box-shadow:0 1px 2px rgba(23,22,15,.12)}

img.split-watermark{width:220px;height:220px;border-radius:44px;opacity:.05;object-fit:cover}

/* image uploads: the picture is shown before saving, so a wrong file is caught here */
.upload-row{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
.upload-prev{width:72px;height:72px;border-radius:12px;object-fit:cover;border:1px solid var(--line);background:#fff;flex:none}
.adv{margin-top:8px}
.adv summary{cursor:pointer;font-size:.82rem;color:var(--muted)}
.adv input{margin-top:8px}
@media(max-width:520px){.upload-row{flex-direction:column}.upload-prev{width:100%;height:140px}}

/* the sidebar collapse above was being overridden by the later .app rule: on phones the shell
   reserved 252px for a drawer that is not shown, squeezing the content into the rest */
@media(max-width:960px){
  .app{grid-template-columns:1fr}
  .side{position:fixed;inset-block:0;inset-inline-end:0;width:272px;max-width:82vw;height:100dvh;z-index:70;
        transform:translateX(105%);transition:transform .26s cubic-bezier(.22,1,.36,1);box-shadow:-20px 0 50px -20px rgba(0,0,0,.5)}
  html[dir=rtl] .side{transform:translateX(-105%)}
  .nav-tog:checked ~ .app .side{transform:none}
  .main-body{padding:18px 16px 0;max-width:none}
}

.pf-logo{width:30px;height:30px;border-radius:8px;display:block;flex:none;object-fit:cover}

/* about page: the reading column is capped, the features are a grid, and the page ends with a next step */
.pf-prose{max-width:65ch}
.pf-prose h2{font-size:1.28rem;margin:38px 0 12px}
.pf-prose h2:first-child{margin-top:0}
.pf-cta-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.pf-btn{height:44px;padding:0 22px;border-radius:11px;display:inline-flex;align-items:center;gap:8px;font-weight:600;text-decoration:none;font-size:.94rem}
.pf-btn-primary{background:var(--primary);color:#fff;border:1px solid var(--primary)}
.pf-btn-primary:hover{filter:brightness(.95)}
.pf-btn-ghost{background:#fff;color:var(--text);border:1px solid var(--line)}
.pf-features{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pf-feature{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:grid;grid-template-columns:auto 1fr;gap:4px 12px;align-items:start}
.pf-feature i{grid-row:span 2;color:var(--primary);font-size:1rem;margin-top:3px}
.pf-feature b{font-size:.95rem}
.pf-feature span{font-size:.85rem;color:var(--muted);line-height:1.6}
.pf-dont{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.pf-dont li{display:flex;gap:10px;align-items:flex-start;font-size:.92rem;color:var(--text);background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 14px}
.pf-dont i{color:#9F1239;margin-top:4px;font-size:.8rem}
.pf-cta-end{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:34px 0 10px;padding:18px 20px;border:1px solid var(--line);border-radius:14px;background:#fff}
.pf-cta-end b{display:block;margin-bottom:3px}
.pf-cta-end span{font-size:.86rem;color:var(--muted)}
.pf-card-link{display:inline-flex;align-items:center;gap:6px;margin-top:10px;font-size:.85rem;font-weight:600;color:var(--primary);text-decoration:none}
.pf-card-mock .pf-mock-line{display:flex;justify-content:space-between;font-size:.85rem;padding:6px 0;color:var(--muted)}
.pf-card-mock .pf-mock-line b{color:var(--text)}
.pf-mock-bar{height:6px;border-radius:4px;background:#EDE9DF;overflow:hidden;margin:2px 0 8px}
.pf-mock-bar i{display:block;height:100%;width:85%;margin-inline-start:auto;background:var(--primary)}
.pf-mock-note{font-size:.75rem;color:var(--muted);margin-top:8px}
@media(max-width:760px){
  .pf-features{grid-template-columns:1fr}
  .pf-prose h2{font-size:1.16rem;margin-top:30px}
  .pf-cta-end{flex-direction:column;align-items:stretch}
  .pf-cta-end .pf-btn{justify-content:center}
}
/* the platform nav used to vanish on phones with no way to reach the other pages */
@media(max-width:1067px){
  .pf-nav{display:flex;overflow-x:auto;-webkit-overflow-scrolling:touch;gap:2px;margin-inline-start:0;order:3;width:100%}
  .pf-nav a{white-space:nowrap;font-size:.84rem;padding:6px 10px}
  .pf-head-in{height:auto;flex-wrap:wrap;padding:10px 0;row-gap:8px}
}

/* the summary card is a data card, not a window: no traffic-light dots, and every value is
   aligned on the same side so the eye does not jump between right and left */
.hero-visual{overflow:hidden}
.hv-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line)}
.hv-cell{background:var(--card);padding:18px 20px;display:flex;flex-direction:column;gap:4px;align-items:flex-start}
.hv-cell-wide{grid-column:span 2}
.hv-cell b{font-family:var(--display);font-size:1.6rem;font-weight:800;line-height:1.1;color:var(--text);letter-spacing:-.02em}
.hv-cell.hv-cell-wide:first-child b{font-size:2.4rem}
.hv-cell span{font-size:.82rem;color:var(--muted)}
.hero-visual .hv-top{background:var(--soft)}
.section-head-center{text-align:center;margin-inline:auto}
.section-head-center .eyebrow{justify-content:center}
.nav-links a.is-active{color:var(--primary);font-weight:700;position:relative}
.nav-links a.is-active::after{content:"";position:absolute;inset-inline:10px;bottom:2px;height:2px;border-radius:2px;background:var(--primary)}
@media(max-width:860px){.nav-links a.is-active::after{display:none}}
/* the first cell spans the card: value and label on one line, so the card is not half empty */
.hv-cell.hv-cell-wide:first-child{flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;padding:20px 22px}
.hv-cell.hv-cell-wide:first-child b{font-size:2.6rem}
.hv-cell.hv-cell-wide:first-child span{font-size:.86rem}
.hero-copy h1{text-wrap:balance}
.hero-copy p.lead{text-wrap:pretty}
.hv-cell.hv-cell-wide:first-child{justify-content:flex-start;gap:14px}

/* platform home */
.pf-hero-home{padding:64px 0 44px}
.pf-hero-home h1{max-width:20ch}
.pf-hero-note{font-size:.82rem;color:var(--muted);margin-top:16px;max-width:60ch}
.pf-section{padding-block:34px}
.pf-section-head{margin-bottom:18px}
.pf-section-head h2{font-size:1.5rem;margin-top:6px}
.pf-how{background:#fff;border-block:1px solid var(--line);max-width:none;padding-inline:0}
.pf-how .pf-section-head,.pf-how .pf-steps{max-width:1100px;margin-inline:auto;padding-inline:24px}
.pf-steps{list-style:none;counter-reset:s;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.pf-steps li{counter-increment:s;position:relative;background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:18px 18px 18px 18px}
.pf-steps li::before{content:counter(s);display:grid;place-items:center;width:26px;height:26px;border-radius:8px;background:var(--primary);color:#fff;font-weight:700;font-size:.8rem;margin-bottom:10px}
.pf-steps b{display:block;margin-bottom:4px}
.pf-steps span{font-size:.86rem;color:var(--muted);line-height:1.65}
@media(max-width:760px){.pf-steps{grid-template-columns:1fr}.pf-hero-home{padding:40px 0 28px}}

/* the summary card on phones: four full-width rows, value and label on separate lines, and
   the A·B·C value never breaks into one letter per line */
.hv-cell b{white-space:nowrap}
.hv-cell span{overflow-wrap:break-word;word-break:normal}
@media(max-width:560px){
  .hv-grid{grid-template-columns:1fr}
  .hv-cell,.hv-cell.hv-cell-wide{grid-column:auto;flex-direction:row;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 16px}
  .hv-cell b,.hv-cell.hv-cell-wide:first-child b{font-size:1.25rem;flex:none}
  .hv-cell span,.hv-cell.hv-cell-wide:first-child span{font-size:.84rem;text-align:end;flex:1}
  .hero-visual .hv-top{padding:12px 16px}
}
/* .hero-visual is a grid with content-sized tracks: without this the summary card shrank to its
   widest word on phones and the labels stacked one word per line */
.hero-visual{grid-template-columns:1fr;justify-items:stretch}
.hero-visual > *{width:100%}
.pf-features-3{grid-template-columns:repeat(3,1fr)}
@media(max-width:900px){.pf-features-3{grid-template-columns:1fr}}
.pf-steps li{display:flex;flex-direction:column;align-items:flex-start}
/* step numbers and feature icons read as markers, not as fine print */
.pf-steps li::before{width:36px;height:36px;font-size:.95rem;border-radius:10px}
.pf-feature i{font-size:1.15rem}
.pf-head-act{display:flex;gap:8px;align-items:center}
/* the platform home hero was half empty on wide screens: a neutral dashboard mock fills it
   without showing any invented numbers */
.pf-hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:40px;align-items:center}
.pf-hero-mock{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-2);padding:0;overflow:hidden}
.pf-mock-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line);background:var(--soft);font-size:.86rem}
.pf-mock-pill{background:var(--primary);color:#fff;border-radius:999px;padding:3px 10px;font-size:.72rem;font-weight:600}
.pf-mock-row{display:flex;align-items:center;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line);font-size:.84rem;color:var(--muted)}
.pf-mock-row span{width:110px;flex:none}
.pf-mock-track{flex:1;height:8px;border-radius:5px;background:#EDE9DF;display:block;overflow:hidden}
.pf-mock-track u{display:block;height:100%;background:var(--primary);text-decoration:none}
.pf-mock-foot{padding:12px 18px;font-size:.72rem;color:var(--muted)}
@media(max-width:900px){.pf-hero-grid{grid-template-columns:1fr}.pf-hero-mock{display:none}}

/* plans: equal-height cards, one CTA label across the page, and the steps use the full width */
.pf-plans{align-items:stretch}
.pf-plan{display:flex;flex-direction:column}
.pf-plan .pf-list{flex:1}
.pf-plan .btn-block{margin-top:auto}
.pf-price-tag{display:inline-block;margin-inline-start:8px;background:#E7F3EC;color:#0A5A42;border:1px solid #CFE6DA;border-radius:999px;padding:2px 10px;font-size:.75rem;font-weight:600;vertical-align:middle}
.pf-soon{display:inline-block;margin-inline-start:6px;background:var(--soft);color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:1px 8px;font-size:.7rem;font-weight:600}
.pf-steps-list > ol{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;list-style:none;padding:0;margin:16px 0 0}
.pf-steps-list > ol li{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px 18px}
.pf-steps-list > ol b{display:block;margin-bottom:4px}
.pf-steps-list > ol span{font-size:.86rem;color:var(--muted)}
@media(max-width:760px){.pf-steps-list > ol{grid-template-columns:1fr}}

/* plans steps (numbered) */
.pf-steps-list > ol{counter-reset:ps}
.pf-steps-list > ol li{counter-increment:ps;padding:18px 20px}
.pf-steps-list > ol li::before{content:counter(ps);display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--primary);color:#fff;font-weight:700;font-size:.9rem;margin-bottom:10px}

/* legal pages (terms / privacy) */
.pf-doc{max-width:720px}
.pf-doc-head{margin-bottom:8px}
.pf-doc-head h1{font-size:2rem;line-height:1.3;margin:6px 0 8px}
.pf-doc-meta{font-size:.88rem;color:var(--muted);margin:0}
.pf-doc h2{font-size:1.16rem;margin:34px 0 10px;color:var(--ink)}
.pf-doc p{font-size:1.02rem;line-height:2;color:#3c4741;margin:0 0 12px}
.pf-doc a{color:var(--primary);text-decoration:underline;text-underline-offset:3px}
.pf-doc-foot{margin-top:36px;padding:18px 20px;border:1px solid var(--line);border-radius:14px;background:#fff}
.pf-doc-foot b{display:block;margin-bottom:4px}
.pf-doc-foot p{margin:0;font-size:.96rem}
.pf-foot-links a.active{color:var(--ink);font-weight:700}

/* legal: section dividers + sub line */
.pf-doc h2{padding-top:26px;border-top:1px solid var(--line);margin-top:26px}
.pf-doc h2:first-of-type{border-top:0;padding-top:0;margin-top:22px}
.pf-doc-sub{font-size:1rem;color:var(--muted);margin:0 0 6px;line-height:1.9}
.pf-doc-head{margin-bottom:6px}

/* contact form */
.pf-contact-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:28px;align-items:start;padding-bottom:64px}
@media(max-width:900px){.pf-contact-grid{grid-template-columns:1fr}}
.pf-form-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px}
.pf-form{display:grid;gap:14px}
.pf-field{display:grid;gap:6px}
.pf-field label{font-size:.9rem;font-weight:600;color:var(--ink)}
.pf-opt{font-weight:400;color:var(--muted);font-size:.82rem}
.pf-field input,.pf-field select,.pf-field textarea{width:100%;font:inherit;font-size:.95rem;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}
.pf-field textarea{resize:vertical;line-height:1.8}
.pf-field input:focus,.pf-field select:focus,.pf-field textarea:focus{outline:2px solid color-mix(in srgb,var(--primary) 40%,#fff);outline-offset:1px;border-color:var(--primary)}
.pf-submit{justify-self:start;padding-inline:26px}
.pf-small{font-size:.8rem;color:var(--muted);margin:0}
.pf-hp{position:absolute;width:0;height:0;padding:0;border:0;opacity:0;pointer-events:none;overflow:hidden}
.pf-ok{background:#eef7f1;border:1px solid #cfe6d8;border-radius:12px;padding:16px 18px}
.pf-ok b{display:block;margin-bottom:4px;color:var(--primary)}
.pf-ok p{margin:0;font-size:.94rem;color:#3c4741}
.pf-err{background:#fdf1ee;border:1px solid #f3d4cb;border-radius:12px;padding:14px 18px;margin-bottom:14px}
.pf-err b{display:block;margin-bottom:6px}
.pf-err ul{margin:0;padding-inline-start:18px;font-size:.9rem}

/* platform verify & contact: align container width with .pf-hero .pf-wrap (1120px) so edges match cleanly */
.pf-verify{padding-bottom:64px;max-width:1120px}
.pf-verify-form,.pf-verify-out{max-width:760px}
.pf-verify-form{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px 22px;display:grid;gap:8px}
.pf-verify-form label{font-size:.9rem;font-weight:600}
.pf-verify-row{display:flex;gap:10px}
.pf-verify-row input{flex:1;min-width:0;font:inherit;font-size:.95rem;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.pf-verify-out{margin-top:18px}
.pf-verify-out h3{margin:0 0 10px;font-size:1.1rem}
.pf-verify-list{display:grid;gap:8px;font-size:.95rem}
.pf-good{color:var(--primary)}
.pf-bad{color:#b3402e}
@media(max-width:560px){.pf-verify-row{flex-direction:column}.pf-verify-row .btn{width:100%}}

/* ---- one vertical rhythm for every public platform page ---- */
:root{--rh-hero:72px;--rh-sec:88px;--rh-foot:72px}
@media(max-width:900px){:root{--rh-hero:56px;--rh-sec:64px;--rh-foot:56px}}
.pf-hero{padding:56px 0 var(--rh-hero)}
.pf-hero-home{padding:56px 0 var(--rh-hero)}
.pf-plans,.pf-two,.pf-contact-grid,.pf-steps-list,.pf-verify{padding-bottom:var(--rh-sec)}
.pf-doc{padding-block:44px var(--rh-sec)}
.pf-foot{margin-top:var(--rh-foot)}
.pf-contact-grid .pf-form-card textarea{min-height:132px}

/* stacked-card and list-row rhythm (small widths get more, never less than inside a card) */
:root{--rh-stack:24px;--rh-row:14px}
@media(min-width:901px){:root{--rh-stack:20px;--rh-row:12px}}
.pf-card + .pf-card{margin-top:var(--rh-stack)}
.pf-verify-out{margin-top:var(--rh-stack)}
.pf-verify-list{gap:0}
.pf-verify-list li{display:flex;align-items:flex-start;gap:10px;padding:var(--rh-row) 0;border-bottom:1px solid var(--line);line-height:1.9}
.pf-verify-list li:first-child{padding-top:0}
.pf-verify-list li:last-child{border-bottom:0;padding-bottom:0}
.pf-verify-list li i{margin-top:6px;color:var(--primary)}
.pf-verify-list li b{font-weight:700}
@media(max-width:900px){
  .pf-contact-grid{gap:var(--rh-stack)}
  .pf-form-card + .pf-side{margin-top:0}
  .pf-side > .pf-card + .pf-card{margin-top:var(--rh-stack)}
}

/* one form control, everywhere on the public pages and the login screen */
.pf-field input,.pf-field select,.pf-field textarea,.pf-verify-row input,.auth-form .input{
  min-height:44px;padding:12px 16px;border-radius:10px;border:1px solid var(--line-strong);
  font-family:var(--font);font-size:.95rem;line-height:1.6;background:#fff;color:var(--ink)
}
.pf-field textarea{min-height:132px;padding:12px 16px}
.pf-field input::placeholder,.pf-field textarea::placeholder,.pf-verify-row input::placeholder{color:#9A9384}
.pf-field input:focus,.pf-field select:focus,.pf-field textarea:focus,.pf-verify-row input:focus,.auth-form .input:focus{
  outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(12,107,79,.14)
}
.pf-form .pf-submit{margin-top:8px}
.pf-verify-form{gap:10px}
.pf-verify-row{gap:12px}
@media(max-width:560px){.pf-verify-row{gap:14px}}
.auth-form .input{line-height:1.6;min-height:44px;padding:12px 16px}
.pf-field input,.pf-verify-row input,.auth-form .input{height:46px;min-height:46px}
.pf-field select{height:46px}
/* first block after the hero never touches the hero's border */
.pf-plans,.pf-two,.pf-contact-grid,.pf-steps-list,.pf-verify{padding-top:36px}
@media(max-width:900px){.pf-plans,.pf-two,.pf-contact-grid,.pf-steps-list,.pf-verify{padding-top:24px}}
.pf-row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:640px){.pf-row2{grid-template-columns:1fr}}
.pf-contact-stack{display:grid;gap:var(--rh-stack);padding-bottom:var(--rh-sec);padding-top:36px}
.pf-contact-stack .pf-form-card{max-width:760px}
.pf-contact-cards{display:grid;grid-template-columns:1fr 1fr;gap:var(--rh-stack);align-items:start}
@media(max-width:900px){.pf-contact-cards{grid-template-columns:1fr}.pf-contact-stack{padding-top:24px}}
.pf-contact-stack .pf-form-card{justify-self:start;width:100%}
.pf-contact-stack{max-width:1120px;margin-inline:auto}
.pf-contact-cards{grid-template-columns:1fr 1fr;gap:var(--rh-stack);max-width:860px}
.pf-contact-stack .pf-form-card{max-width:860px;justify-self:stretch}
@media(max-width:1280px){.pf-contact-stack{max-width:1120px}}
.table-scroll{overflow-x:auto}
@media(max-width:700px){.hide-sm{display:none}}
.save-row{display:flex;gap:10px;align-items:center}
@media(max-width:700px){.save-row{flex-direction:column-reverse;align-items:stretch}.save-row .btn{width:100%}}
.file-hidden{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;pointer-events:none}
.file-btn{display:inline-flex;align-items:center;height:46px;padding:0 18px;cursor:pointer}
@media(max-width:900px){.pf-contact-cards{grid-template-columns:1fr}}
.pf-contact-cards .pf-card{text-align:start}
.pf-contact-cards .pf-card p{text-align:start}

/* LTR runs inside RTL text (hex codes, phones, slugs, URLs) keep their order */
[dir="ltr"]{unicode-bidi:isolate}
.ltr{direction:ltr;unicode-bidi:isolate;text-align:left}
/* logo picker: fixed preview box, never a banner */
.upload-row{display:flex;gap:14px;align-items:flex-start}
.upload-prev{width:64px;height:64px;flex:0 0 64px;object-fit:contain;border:1px solid var(--line);border-radius:12px;background:#fff;padding:4px}
.upload-pick{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:2px 0 6px}

/* error pages: illustration beside the words, on a tinted page rather than flat white */
.err-page{
  padding:56px 20px;
  min-height:min(560px,calc(100vh - 260px));
  display:flex;align-items:center;
  background:
    radial-gradient(120% 130% at 85% 0%, rgba(12,107,79,.10) 0%, rgba(12,107,79,0) 58%),
    radial-gradient(90% 120% at 10% 100%, rgba(245,158,11,.10) 0%, rgba(245,158,11,0) 60%),
    var(--bg);
}
.err-inner{width:100%;max-width:1040px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:56px;align-items:center}
.err-art img{display:block;width:100%;max-width:400px;height:auto;margin:0 auto}
.err-code{font-family:var(--font);font-size:56px;font-weight:600;color:var(--primary);line-height:1;margin-bottom:12px;direction:ltr;unicode-bidi:isolate;text-align:end}
.err-title{margin:0 0 10px;font-size:30px}
.err-text{margin:0 0 24px;color:var(--muted);line-height:1.85;font-size:1.02rem;max-width:30em}
.err-actions{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:900px){
  .err-page{padding:36px 18px;min-height:auto}
  .err-inner{grid-template-columns:1fr;gap:22px;text-align:center;max-width:460px}
  .err-art{order:-1}
  .err-art img{max-width:240px}
  .err-code{font-size:44px;text-align:center}
  .err-title{font-size:24px}
  .err-text{margin-inline:auto}
  .err-actions{justify-content:center}
}

/* state illustrations: only where the state is truly empty */
.empty-illus{display:flex;flex-direction:column;align-items:center;gap:10px;padding:32px 20px;text-align:center;color:var(--muted)}
.empty-illus img{width:180px;height:auto;max-width:60%}
.empty-illus-text{font-size:.95rem;line-height:1.7}
.auth-illus{display:block;width:100%;max-width:300px;height:auto;margin:0 auto 22px}
.form-err-illus{display:flex;gap:10px;align-items:center}
.form-err-illus img{width:46px;height:46px;flex:none}
@media(max-width:560px){.empty-illus img{width:150px}.auth-illus{max-width:220px}}


/* One Arabic confirmation dialog for every destructive action, instead of the browser's
   English confirm() box. */
.cf-overlay{position:fixed;inset:0;background:rgba(11,18,32,.55);display:flex;align-items:center;justify-content:center;padding:20px;z-index:9999}
.cf-box{background:#fff;border-radius:16px;box-shadow:0 24px 60px rgba(11,18,32,.28);max-width:440px;width:100%;padding:24px;border:1px solid var(--line,#e6e1d6)}
.cf-text{margin:0 0 18px;font-size:1.02rem;line-height:1.7;color:var(--ink,#0b1220)}
.cf-actions{display:flex;gap:10px;justify-content:flex-start;flex-wrap:wrap}
.cf-actions .btn{min-width:104px;justify-content:center}
.logout-form{display:inline;margin:0}
.logout-form button{background:none;border:0;font:inherit;color:inherit;cursor:pointer;display:flex;align-items:center;gap:10px;padding:10px 12px;width:100%;text-align:start;border-radius:10px}
.logout-form button:hover{background:rgba(255,255,255,.06);color:#fff}


/* The confirmation dialog: the destructive action is the filled red one, the safe way out is
   the quiet outline. Before this the green primary was on "إلغاء", which invites the wrong click. */
.cf-actions .cf-yes{background:#9F1239;color:#fff;border-color:#9F1239}
.cf-actions .cf-yes:hover{background:#7f0e2d;border-color:#7f0e2d}
.cf-actions .cf-no{background:#fff;color:var(--text,#0b1220);border:1px solid var(--line,#e6e1d6)}
.cf-actions .cf-no:hover{background:var(--soft,#f3efe7)}

/* On a phone the header chip has no room for the name and the role next to the breadcrumb:
   it collapsed into a column of single letters. The avatar stays, the text goes. */
@media(max-width:560px){
  .user-chip{display:none}
}


/* A <td> written as a flex container stops being a table cell: the row loses its grid, the
   row height jumps to hundreds of pixels on a phone and the columns stop lining up. Keep the
   cell a cell and give its buttons their gap with margin instead. */
.table-wrap td[style*="display:flex"]{display:table-cell}
.table-wrap td[style*="display:flex"] > *{vertical-align:middle}
.table-wrap td[style*="display:flex"] > * + *{margin-inline-start:6px}


/* On tablets and phones a wide table scrolls cleanly inside .table-wrap without clipping or
   shattering Arabic words character-by-character. */
@media(max-width:960px){
  .table-wrap,.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
  .table-wrap table{min-width:720px}
  .table-wrap th,.table-wrap td,.sa-table th,.sa-table td,.tbl th,.tbl td{white-space:nowrap}
  .table-wrap td b{white-space:normal;display:inline-block;min-width:140px;max-width:240px;vertical-align:middle}
  .table-wrap td .small{white-space:normal;display:inline-block;max-width:220px;vertical-align:middle}
}


/* Five KPI cards on a phone: the fifth must not sit alone in a half-empty row. It takes the
   full width and the other four stay in two rows of two. */
@media(max-width:700px){
  .kpi-grid.five{grid-template-columns:1fr 1fr}
  .kpi-grid.five > *:last-child{grid-column:1 / -1}
}


/* The platform mark on a phone: smaller, and it must not touch the edge of the header. */
@media(max-width:700px){
  .pf-head-in{padding-inline:16px}
  .pf-head .pf-logo{height:34px;width:34px;flex:none}
}


/* A grid track sizes itself to its content by default, so one long unbreakable value inside a
   card pushes the whole column wider than the screen and the page gains a few pixels of
   horizontal scroll. Children may shrink. */
.grid > *, .kpi-grid > *{min-width:0}

/* success state: picture beside the confirmation text */
.pf-ok-img{display:flex;align-items:center;gap:14px}
.pf-ok-img img{flex:0 0 64px;width:64px;height:64px;object-fit:contain}
@media (max-width:430px){.pf-ok-img{gap:10px}.pf-ok-img img{flex:0 0 48px;width:48px;height:48px}}

/* ---------- platform header, drawer and footer (rewritten: name beside the mark, real mobile menu) ---------- */
.pf-head-in{gap:14px}
.pf-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-weight:800;flex:none}
.pf-brand-name{font-size:1.05rem;line-height:1;letter-spacing:0}
.pf-logo{width:34px;height:34px;border-radius:9px;object-fit:contain}
.pf-burger{display:none;margin-inline-start:auto;width:42px;height:42px;border:1px solid var(--line);background:#fff;border-radius:11px;padding:11px 10px;cursor:pointer;flex-direction:column;justify-content:space-between}
.pf-burger span{display:block;height:2px;background:var(--ink);border-radius:2px}
.pf-scrim{position:fixed;inset:0;background:rgba(18,19,14,.42);z-index:55}
.pf-drawer{position:fixed;top:0;bottom:0;inset-inline-end:0;width:min(84vw,320px);background:#fff;z-index:60;display:flex;flex-direction:column;padding:16px 16px 22px;box-shadow:-24px 0 50px -30px rgba(18,19,14,.45)}
.pf-drawer-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:14px;border-bottom:1px solid var(--line)}
.pf-drawer-x{width:36px;height:36px;border:1px solid var(--line);background:var(--soft);border-radius:10px;cursor:pointer;color:var(--muted);font-size:.95rem}
.pf-drawer-nav{display:flex;flex-direction:column;margin-top:8px}
.pf-drawer-nav a{padding:14px 6px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--text);font-weight:600;font-size:.98rem}
.pf-drawer-nav a.active{color:var(--primary)}
.pf-drawer-act{display:flex;flex-direction:column;gap:10px;margin-top:auto;padding-top:18px}
.pf-drawer-act .btn{width:100%;justify-content:center;height:46px}
.pf-foot-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:36px;align-items:start;padding-top:34px}
.pf-foot-brand .pf-brand{margin-bottom:2px}
.pf-foot-brand p{margin:10px 0 0;max-width:32em}
.pf-foot-col{display:flex;flex-direction:column;gap:11px}
.pf-foot-col b{font-size:.84rem;color:var(--ink);letter-spacing:0}
.pf-foot-col a{color:var(--muted);text-decoration:none;font-size:.9rem}
.pf-foot-col a:hover{color:var(--primary)}
.pf-copy{margin-top:28px}
@media(max-width:900px){
  .pf-nav,.pf-head-act{display:none}
  .pf-burger{display:flex}
  .pf-head-in{height:60px}
  .pf-foot-grid{grid-template-columns:1fr;gap:26px;padding-top:26px}
  .pf-foot-brand p{max-width:none}
  .pf-brand-name{font-size:1rem}
}
@media(max-width:430px){
  .pf-logo{width:30px;height:30px}
}
/* owner sidebar: the platform name sits beside the mark, same as the public header */
.side .brand-name{color:#fff;font-weight:700;font-size:1rem;letter-spacing:0;white-space:nowrap}
@media(max-width:900px){.side .brand-name{display:none}}
/* [hidden] must win over display:flex, or the closed drawer keeps covering the page */
.pf-drawer[hidden],.pf-scrim[hidden]{display:none}
/* the menu opens from the side the button sits on (the right), in both directions */
.pf-drawer{inset-inline-end:auto;right:0;left:auto;box-shadow:-24px 0 50px -30px rgba(18,19,14,.45)}
/* header: the links sit next to the name, the two actions take the far end */
.pf-nav{margin-inline-start:20px;margin-inline-end:auto}
.pf-head-act{margin-inline-start:0}
/* footer: three groups spread across the width instead of crowding one side */
.pf-foot-grid{grid-template-columns:minmax(0,1fr) auto auto;gap:56px;justify-content:space-between}
.pf-foot-brand p{max-width:30em}
@media(max-width:900px){.pf-nav{margin:0}.pf-foot-grid{grid-template-columns:1fr;gap:24px}}
/* footer: name block at the start, link groups at the far end, nothing stranded in the middle */
.pf-foot-grid{grid-template-columns:auto auto auto;justify-content:space-between}
.pf-foot-brand{max-width:34em}
/* header lockup: the mark gets its own soft tile so it reads as a logo, not a stray icon (reference: rayhan.cloud) */
.pf-brand{gap:12px}
.pf-logo{width:40px;height:40px;padding:5px;background:rgba(12,107,79,.09);border-radius:12px;box-sizing:border-box}
.pf-brand-name{font-size:1.14rem;font-weight:800;color:var(--ink)}
.pf-nav{margin-inline:auto}
.pf-head-act{margin-inline-start:0}
@media(max-width:900px){
  .pf-logo{width:36px;height:36px;padding:4px}
  .pf-brand-name{font-size:1.02rem}
}
/* header/footer spacing pass (from Gemini's review): tighter lockup, calmer nav, a login that stays on phones */
.pf-head-in{height:72px}
.pf-brand{gap:10px}
.pf-logo{width:36px;height:36px;padding:4px;border-radius:10px}
.pf-brand-name{font-size:20px;letter-spacing:-.02em;line-height:1}
.pf-nav{gap:32px}
.pf-nav a{font-size:15px;font-weight:500;padding:8px 4px}
.pf-head-act{gap:12px}
.pf-head-act .btn{height:40px;border-radius:8px}
.pf-head-login{display:none}
.pf-drawer{width:min(85vw,320px)}
.pf-foot-grid{grid-template-columns:2fr 1fr 1fr;gap:40px;padding-top:56px}
.pf-foot-col{gap:12px}
.pf-copy{padding-bottom:8px}
@media(max-width:900px){
  .pf-head-in{height:60px}
  .pf-head-act{display:none}
  .pf-head-login{display:inline-flex;align-items:center;height:40px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:#fff;text-decoration:none;color:var(--ink);font-weight:600;font-size:.92rem;margin-inline-start:auto}
  .pf-burger{width:44px;height:44px;margin-inline-start:10px}
  .pf-foot-grid{grid-template-columns:1fr 1fr;gap:22px 18px;padding-top:28px}
  .pf-foot-brand{grid-column:1 / -1}
  .pf-copy{margin-top:24px;font-size:13px}
}

/* Three-card stat rows (subscription pages): three across on desktop, one per row on phones. */
.pay-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:22px}
.pay-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pay-two > *{min-width:0}
@media (max-width:640px){ .pay-stats{grid-template-columns:minmax(0,1fr)} .pay-two{grid-template-columns:minmax(0,1fr)} }

/* ---------- the locked lesson player ----------
   The YouTube iframe is covered by a transparent shield, so the only controls a student can
   reach are ours. The student's name rides on the picture so a recording carries it. */
.lock{position:relative;background:#0b1220;border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);margin-top:16px}
.lock-frame{position:relative;aspect-ratio:16/9;background:#000}
.lock-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.lock-shield{position:absolute;inset:0;z-index:2;background:transparent}
.lock-mark{position:absolute;z-index:3;pointer-events:none;color:#fff;background:rgba(0,0,0,.30);padding:3px 10px;border-radius:8px;font-size:.82rem;line-height:1.6;opacity:.85;white-space:nowrap;transition:top .9s ease,left .9s ease;max-width:70%;overflow:hidden;text-overflow:ellipsis}
.lock-bar{display:flex;align-items:center;gap:10px;padding:9px 12px;background:#111827;color:#e5e7eb}
.lock-btn{width:34px;height:34px;border:0;border-radius:9px;background:#1f2937;color:#e5e7eb;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.lock-btn:hover{background:#374151}
.lock-time{font-variant-numeric:tabular-nums;font-size:.78rem;color:#cbd5e1;min-width:34px;text-align:center}
.lock-bar input[type=range]{flex:1;accent-color:#34d399;height:4px}
@media(max-width:520px){
  .lock-bar{gap:7px;padding:8px}
  .lock-btn{width:30px;height:30px;border-radius:8px}
  .lock-time{font-size:.72rem;min-width:28px}
  .lock-mark{font-size:.72rem;padding:2px 7px}
}

/* The paused state is ours too: a blurred cover with one big play button, so YouTube's own
   play button and "watch on YouTube" are never the thing the student is looking at. */
.lock-cover{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:16px;background:rgba(6,10,16,.42);-webkit-backdrop-filter:blur(16px) brightness(.62);backdrop-filter:blur(16px) brightness(.62);transition:opacity .25s ease}
.lock-cover.is-off{opacity:0;pointer-events:none}
.lock-big{width:74px;height:74px;border-radius:50%;border:0;background:#ffffff;color:#0b1220;font-size:1.6rem;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.35)}
.lock-big:hover{transform:scale(1.04)}
.lock-title{color:#fff;font-weight:800;font-size:1.02rem;line-height:1.6;max-width:88%}
.lock-hint{color:#d7dee7;font-size:.78rem}
@media(max-width:520px){
  .lock-big{width:58px;height:58px;font-size:1.25rem}
  .lock-title{font-size:.9rem}
  .lock-hint{font-size:.7rem}
}

/* YouTube paints its own title bar and logo on the picture. Two guards sit over them: a soft
   gradient at the top and a small brand chip at the bottom-right, both ignoring the pointer. */
.lock-guard{position:absolute;z-index:3;pointer-events:none}
.lock-guard-top{inset:0 0 auto 0;height:46px;background:linear-gradient(rgba(0,0,0,.72),rgba(0,0,0,0))}
.lock-guard-brand{bottom:10px;right:10px;max-width:52%;background:rgba(8,12,18,.78);color:#e8eef5;font-size:.72rem;padding:4px 10px;border-radius:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lock-mark{z-index:6}

/* ---------- player, second pass (Gemini review) ----------
   Warm charcoal instead of the cold navy, emerald for the things you touch, real touch
   targets on a phone, no grey boxes behind the icons, and a quiet watermark. */
.lock{direction:ltr;background:#141716;border:1px solid rgba(20,23,22,.12);border-radius:16px;box-shadow:0 12px 32px -8px rgba(20,23,22,.16);user-select:none;-webkit-user-select:none;touch-action:manipulation}
.lock-shield{touch-action:manipulation}
/* Nothing of YouTube shows before or between plays: the cover is solid, not translucent. */
.lock-cover{background:#0f1211;background-image:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--primary) 20%,transparent),rgba(15,18,17,0) 62%);-webkit-backdrop-filter:none;backdrop-filter:none}
.lock-big{width:70px;height:70px;background:var(--primary);color:#fff;font-size:1.45rem;box-shadow:0 10px 26px rgba(0,0,0,.35)}
.lock-big:hover{background:var(--primary-dark);transform:scale(1.03)}
.lock-hint{color:#c9d2cd;font-size:.8rem}
.lock-mark{z-index:3;background:none;padding:0;opacity:.3;font-size:.78rem;text-shadow:0 1px 3px rgba(0,0,0,.75);transition:top 1.2s ease,left 1.2s ease}
.lock-bar{background:#1a1e1c;gap:8px;padding:8px 10px;color:#f1f5f3}
.lock-btn{position:relative;width:44px;height:44px;border-radius:10px;background:transparent;color:#f1f5f3;font-size:.95rem}
.lock-btn:hover,.lock-btn:active{background:rgba(255,255,255,.1)}
.lock-speed{font-size:.78rem;font-weight:700;font-variant-numeric:tabular-nums;min-width:44px;width:auto;padding-inline:6px}
.lock-ten{position:absolute;left:50%;top:57%;transform:translateX(-50%);font-size:.5rem;font-weight:700}
.lock-time{color:#9ca8a3;font-size:.78rem;min-width:auto;letter-spacing:.2px;white-space:nowrap}
.lock-bar input[type=range]{accent-color:var(--primary);height:6px;cursor:pointer}
.lock-guard-brand{background:rgba(20,23,22,.72)}
@media(max-width:520px){
  .lock{border-radius:12px}
  .lock-btn{width:38px;height:40px;border-radius:9px}
  .lock-speed{min-width:40px}
  .lock-bar{gap:3px;padding:6px 7px}
  .lock-big{width:56px;height:56px;font-size:1.2rem}
  .lock-time{font-size:.7rem}
  .lock-mark{font-size:.7rem}
}

/* iPhone Safari fullscreen fallback for video player container */
.lock.is-fs-fallback{position:fixed;inset:0;z-index:9999;border-radius:0;display:flex;flex-direction:column;justify-content:center;background:#000}
.lock.is-fs-fallback .lock-frame{flex:1;aspect-ratio:auto;height:100%}

/* Touch target minimums (WCAG 2.2 AA 44px on coarse pointers) */
@media(pointer:coarse){
  .row-menu > summary,.btn-sm{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
}

/* Owner panel .sa-* classes used by SuperAdmin/Audit & SuperAdmin/Edit */
.sa-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.sa-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #E5E0D5;border-radius:12px;overflow:hidden}
.sa-table th,.sa-table td{padding:12px 14px;text-align:start;font-size:.88rem;border-bottom:1px solid #EFEAE0;vertical-align:top}
.sa-table th{background:#FAF8F3;font-weight:600;color:#4A5568}
.sa-table tr:last-child td{border-bottom:0}
.sa-panel{background:#fff;border:1px solid #E5E0D5;border-radius:12px;padding:20px;margin-bottom:22px}
.sa-panel h2{font-size:1rem;margin:0 0 14px}
.sa-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.sa-field{display:flex;flex-direction:column;gap:6px;font-size:.82rem;color:#4A5568}
.sa-field input,.sa-field select{padding:9px 11px;border:1px solid #D9D3C7;border-radius:8px;font:inherit;background:#fff}
.sa-alert{padding:11px 14px;border-radius:9px;font-size:.86rem;margin-bottom:14px}
.sa-err{background:#FDECEC;color:#9F1239}
.sa-ok{background:#E7F5EC;color:#0F5132}
.sa-muted{color:#6B7280;font-size:.8rem}
.sa-stat{background:#FAF8F3;border:1px solid #EFEAE0;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:4px}
.sa-stat span{font-size:.78rem;color:#6B7280}
.sa-stat b{font-size:1rem}
.sa-row-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sa-row-form select,.sa-row-form input{padding:6px 8px;border:1px solid #D9D3C7;border-radius:7px;font:inherit;font-size:.8rem}

/* ============================================================
   BiDi Math & Adaptive Student Experience (UDL / Accessibility)
   ============================================================ */
.math-expr,bdi[dir="ltr"]{direction:ltr;unicode-bidi:isolate;display:inline-block}
.katex{direction:ltr;unicode-bidi:isolate;font-size:1.06em}
.katex-display{direction:ltr;overflow-x:auto;overflow-y:hidden;padding-block:4px}
.math-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.math-chip{padding:5px 10px;border-radius:8px;border:1px solid var(--line);background:var(--soft);font-family:ui-monospace,monospace;font-size:.8rem;cursor:pointer;color:var(--text)}
.math-chip:hover{border-color:var(--primary);color:var(--primary)}

/* Student Accessibility Modes */
html[data-fontscale="115"]{--fs:18.4px}
html[data-fontscale="130"]{--fs:20.8px}
html[data-dyslexia="1"] body{line-height:2;letter-spacing:.025em;word-spacing:.09em}
html[data-dyslexia="1"] .q .qtext,html[data-dyslexia="1"] .opt,html[data-dyslexia="1"] .prose p{line-height:2.1}
html[data-theme="dark"]{
  --bg:#0F1419; --card:#171E26; --soft:#1F2833; --text:#F1F5F9; --muted:#94A3B8;
  --ink:#E2E8F0; --line:rgba(241,245,249,.12); --line-strong:rgba(241,245,249,.26);
  --shadow-1:0 1px 3px rgba(0,0,0,.45); --shadow-2:0 14px 34px rgba(0,0,0,.55);
}
html[data-theme="dark"] body{background:var(--bg);color:var(--text)}
html[data-theme="dark"] .main-head{background:rgba(15,20,25,.92)}
html[data-theme="dark"] .side{background:#0B0F14}
html[data-theme="dark"] .card,html[data-theme="dark"] .panel,html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .exam-head,html[data-theme="dark"] .q,html[data-theme="dark"] .opt,
html[data-theme="dark"] .input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,
html[data-theme="dark"] .table-wrap,html[data-theme="dark"] table,html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .lang-switch,html[data-theme="dark"] .exam-row{background:var(--card);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] th{background:var(--soft);color:var(--muted)}
html[data-theme="dark"] tbody tr:hover,html[data-theme="dark"] .opt:hover{background:#1D2630}
html[data-theme="dark"] .opt.sel{background:var(--primary-soft);border-color:var(--primary)}
html[data-theme="dark"] .muted,html[data-theme="dark"] .small.muted,html[data-theme="dark"] .page-sub,html[data-theme="dark"] .crumbs{color:#94A3B8}
html[data-theme="dark"] .kpi-card .v,html[data-theme="dark"] td:first-child{color:#F8FAFC}
html[data-theme="dark"] .btn-soft{background:var(--soft);color:#F1F5F9}
html[data-theme="dark"] .resume{background:#1E293B;color:#F8FAFC}
html[data-theme="contrast"]{
  --bg:#FFFFFF; --card:#FFFFFF; --soft:#F3F4F6; --text:#000000; --muted:#1F2937;
  --line:#000000; --line-strong:#000000;
}
html[data-contrast="1"] .card,html[data-theme="contrast"] .card,html[data-theme="contrast"] .opt,html[data-theme="contrast"] .btn-ghost{border-width:2px}

/* Focus Mode in Lesson Player */
body.focus-mode .side,body.focus-mode .main-head .crumbs,body.focus-mode .footer,body.focus-mode .focus-hide{display:none!important}
body.focus-mode .app{grid-template-columns:1fr!important}
body.focus-mode .main-body{max-width:1040px;padding-top:14px}

/* Lesson UDL Tabs, Chapters & Notes */
.udl-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin-top:20px;margin-bottom:16px;overflow-x:auto}
.udl-tab{padding:10px 14px;border:0;background:none;font:inherit;font-weight:600;font-size:.9rem;color:var(--muted);border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap}
.udl-tab.active{color:var(--primary);border-bottom-color:var(--primary)}
.udl-panel{display:none}.udl-panel.active{display:block}
.chapter-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--text);font:inherit;cursor:pointer;text-align:start;margin-bottom:8px;transition:border-color var(--t)}
.chapter-btn:hover{border-color:var(--primary)}
.note-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--card);margin-bottom:8px}
.time-badge{padding:3px 9px;border-radius:999px;background:var(--primary-soft);color:var(--primary);font-size:.78rem;font-weight:700;border:0;cursor:pointer;white-space:nowrap}

/* Calm Exam Workspace, Question Palette & Remediation */
.exam-shell{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:20px;align-items:start}
@media(max-width:900px){.exam-shell{grid-template-columns:1fr}}
.exam-palette{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;position:sticky;top:92px}
@media(max-width:900px){.exam-palette{position:static;order:-1}}
.q-dots{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:10px}
.q-dot{height:36px;border-radius:9px;border:1px solid var(--line-strong);background:var(--card);color:var(--text);font-weight:700;font-size:.84rem;cursor:pointer;position:relative;display:grid;place-items:center}
.q-dot.ans{background:var(--primary-soft);border-color:var(--primary);color:var(--primary)}
.q-dot.cur{outline:2px solid var(--primary);outline-offset:1px}
.q-dot.flagged::after{content:"";position:absolute;top:3px;inset-inline-end:3px;width:7px;height:7px;border-radius:50%;background:#D97706}
.q-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:10px;border-top:1px dashed var(--line)}
.hint-box{margin-top:10px;padding:11px 14px;border-radius:10px;background:#FEF3C7;color:#78350F;border:1px solid #FDE68A;font-size:.88rem;line-height:1.7}
.remedial-box{margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--primary-soft);border:1px solid color-mix(in srgb,var(--primary) 26%,transparent);font-size:.84rem;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.calmtimer{display:flex;align-items:center;gap:10px}
.calmtimer-bar{width:90px;height:6px;border-radius:999px;background:var(--soft);overflow:hidden}
.calmtimer-bar > i{display:block;height:100%;background:var(--primary);transition:width .4s linear}

/* Sequential Learning Path in Student Course */
.lesson-timeline{display:flex;flex-direction:column;gap:12px}
.lesson-step{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);flex-wrap:wrap}
.lesson-step.done{border-inline-start:4px solid var(--primary)}
.lesson-step-num{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--soft);font-weight:800;flex:none;color:var(--text)}
.lesson-step.done .lesson-step-num{background:var(--primary-soft);color:var(--primary)}

/* Modal confirm fallback in exam take */
.sub-modal{position:fixed;inset:0;background:rgba(15,20,25,.55);display:none;align-items:center;justify-content:center;padding:20px;z-index:9998}
.sub-modal.open{display:flex}
.sub-modal-card{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:16px;padding:24px;max-width:420px;width:100%;box-shadow:var(--shadow-2)}
