:root {
    --bg: #020617;
    --bg-elev: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --line: rgba(212, 175, 55, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --gold: #d4af37;
    --gold-2: #f3d98a;
    --navy: #0b1c33;
    --emerald: #006c35;
    --godo: #0c3f86;
    --godo-2: #1d6fe8;
    --danger: #fb7185;
    --ok: #34d399;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    --radius: 24px;
    --font: "Cairo", "Tajawal", "Segoe UI", sans-serif;
}
html[data-theme="light"] {
    --bg: #f4efe4;
    --bg-elev: #fffdf8;
    --bg-card: rgba(255, 253, 248, 0.9);
    --line: rgba(15, 23, 42, 0.12);
    --text: #0f172a;
    --muted: #475569;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.9;
    min-height: 100vh;
}
a { color: inherit; }
img { max-width: 100%; }
#fx-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.45; }
.bg-mesh {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(820px 480px at 0% -10%, rgba(212, 175, 55, 0.16), transparent 55%),
        radial-gradient(680px 420px at 100% 0%, rgba(12, 63, 134, 0.45), transparent 50%),
        radial-gradient(520px 380px at 70% 100%, rgba(0, 108, 53, 0.2), transparent 55%),
        linear-gradient(180deg, #020617, #071426 40%, #020617);
}
html[data-theme="light"] .bg-mesh {
    background:
        radial-gradient(800px 420px at 0% 0%, rgba(212, 175, 55, 0.28), transparent 55%),
        radial-gradient(600px 380px at 100% 0%, rgba(12, 63, 134, 0.12), transparent 50%),
        linear-gradient(180deg, #f7f1e6, #efe6d6);
}
.wrap { position: relative; z-index: 1; }
.nav {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 0.8rem;
    padding: 0.75rem 4%;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}
html[data-theme="light"] .nav { background: rgba(255, 253, 248, 0.88); }
.lockup { display: flex; align-items: center; gap: 0.45rem; text-decoration: none; }
.lockup img {
    height: 46px; width: 46px; object-fit: cover; border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: #020617;
}
.lockup .crest, .prince-logos .crest {
    width: 52px; height: 64px; object-fit: contain; border: none; border-radius: 0; background: transparent;
}
.logo-pair {
    display: flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem; border-radius: 14px;
    border: 1px solid rgba(212,175,55,.4);
    background: rgba(2,6,23,.55);
}
.lockup .logo-pair img, .prince-logos .logo-pair img { width: 34px; height: 34px; border-radius: 8px; }
.nav .btn { padding: 0.55rem 0.85rem; font-size: 0.86rem; }
.nav .btn-login { min-width: 0; }
.logo-godo { object-fit: cover; }
.lock-x { color: var(--gold); font-weight: 900; font-size: 1.15rem; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; min-width: 8rem; }
.brand-copy strong { font-size: 0.95rem; }
.brand-copy span { color: var(--gold); font-size: 0.75rem; letter-spacing: 0.08em; font-weight: 800; }
.nav-links { display: flex; gap: 0.85rem; list-style: none; margin-inline-start: 0.4rem; flex: 1; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: 0.9rem; opacity: 0.86; }
.nav-links a.active, .nav-links a:hover { color: var(--gold-2); opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 0.45rem; }
.icon-btn, .menu-btn {
    width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line);
    background: transparent; color: var(--text); cursor: pointer;
}
.menu-btn { display: none; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.75rem 1.15rem; border-radius: 14px; border: 1px solid transparent;
    font-family: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, #f3d98a, var(--gold)); color: #1a140c; box-shadow: 0 10px 28px rgba(212, 175, 55, 0.28); }
.btn-login {
    background: linear-gradient(180deg, #f3d98a, var(--gold));
    color: #1a140c;
    border-color: var(--gold);
    box-shadow: 0 10px 28px rgba(212, 175, 55, 0.35);
    min-width: 9.5rem;
}
.nav { flex-wrap: wrap; }
.nav-links { margin-inline-start: 0.4rem; flex: 1; justify-content: flex-end; }
.nav-actions { flex-shrink: 0; }
.hero { min-height: auto; padding-top: 3.4rem; padding-bottom: 2.4rem; }
.page-head .section-title { text-align: inherit; margin: 0; font-size: 1.7rem; }
.page-head .section-title:after { display: none; }
.footer a { color: var(--gold-2); font-weight: 800; text-decoration: none; }
.btn-line { background: rgba(255,255,255,0.03); color: var(--text); border-color: var(--line); }
.btn-green { background: linear-gradient(180deg, #0d8f4f, var(--emerald)); color: #fff; }
.btn-godo { background: linear-gradient(180deg, #1d6fe8, var(--godo)); color: #fff; }
.btn-danger { background: rgba(159, 18, 57, 0.16); color: var(--danger); border-color: rgba(251, 113, 133, 0.35); }
.btn-block { width: 100%; }
.hero, .section { padding: 4.2rem 6% 2rem; position: relative; }
.hero {
    min-height: auto; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center;
    background-size: cover; background-position: center;
    padding-top: 3.2rem; padding-bottom: 2.2rem;
}
.kicker {
    display: inline-flex; gap: 0.4rem; align-items: center;
    color: var(--gold); font-weight: 800; letter-spacing: 0.14em; font-size: 0.75rem;
    border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; margin-bottom: 1rem;
    background: rgba(2, 6, 23, 0.45);
}
h1, .section-title { font-size: clamp(2rem, 4.6vw, 4.2rem); line-height: 1.2; font-weight: 900; }
.section-title { text-align: center; margin-bottom: 1.6rem; font-size: clamp(1.7rem, 3vw, 2.6rem); }
.section-title:after {
    content: ""; display: block; width: 88px; height: 3px; margin: 0.8rem auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), #1d6fe8, transparent);
}
.lead { color: var(--muted); font-size: 1.08rem; max-width: 46rem; margin: 1rem 0 1.4rem; }
.hero-actions, .row-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero-card, .card {
    background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.4rem; box-shadow: var(--shadow); backdrop-filter: blur(16px); position: relative;
}
.hero-card { padding: 1.6rem; }
.pair { display: flex; justify-content: center; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.pair img { width: 92px; height: 92px; object-fit: cover; border-radius: 22px; border: 1px solid rgba(212,175,55,0.4); background: #020617; }
.pair .lock-x { font-size: 2rem; }
.muted { color: var(--muted); }
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: rgba(2,6,23,0.55); direction: ltr; }
.ticker-track { display: flex; gap: 2.2rem; width: max-content; animation: tick 28s linear infinite; padding: 0.7rem 0; }
.ticker span { color: var(--gold-2); font-weight: 800; letter-spacing: 0.12em; font-size: 0.82rem; }
.ticker em { color: var(--muted); font-style: normal; font-weight: 600; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.svc-icon {
    width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
    background: linear-gradient(160deg, rgba(212,175,55,0.22), rgba(12,63,134,0.28));
    color: var(--gold); margin-bottom: 0.4rem;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-top: 1.2rem; }
.stats div, .stat {
    padding: 1rem; border-radius: 18px; border: 1px solid var(--line); background: rgba(2,6,23,0.35);
}
.stats strong, .stat strong { display: block; color: var(--gold); font-size: 1.6rem; }
.course-card h3 { margin: 0.35rem 0; font-size: 1.2rem; }
.meta { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0.6rem 0; }
.pill {
    border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.78rem; font-weight: 800;
    border: 1px solid var(--line); color: var(--gold-2);
}
.pill-ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); }
.pill-wait { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }
.pill-bad { color: var(--danger); border-color: rgba(251, 113, 133, 0.4); }
.pill-godo { color: #93c5fd; border-color: rgba(29, 111, 232, 0.45); }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.2rem; align-items: stretch; }
.photo {
    border-radius: 28px; min-height: 320px; background-size: cover; background-position: center;
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.prince-card {
    background:
        radial-gradient(500px 180px at 100% 0%, rgba(212,175,55,0.18), transparent 50%),
        linear-gradient(180deg, rgba(15,23,42,0.92), rgba(2,6,23,0.88));
    border: 1px solid rgba(212,175,55,0.4);
}
.crown { color: var(--gold); font-size: 1.4rem; }
.prince-card blockquote { font-size: 1.2rem; font-weight: 700; margin: 0.6rem 0; }
.form { display: grid; gap: 0.75rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 800; }
.form input, .form textarea, .form select, .table-wrap input, .table-wrap select {
    width: 100%; padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.45); color: var(--text); font-family: inherit; font-size: 1rem;
}
html[data-theme="light"] .form input,
html[data-theme="light"] .form textarea,
html[data-theme="light"] .form select { background: #fffdf8; color: #0f172a; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--gold); }
.alert { padding: 0.8rem 1rem; border-radius: 14px; font-weight: 700; margin-bottom: 0.8rem; }
.alert-ok { background: rgba(5,150,105,0.14); color: var(--ok); border: 1px solid rgba(16,185,129,0.35); }
.alert-err { background: rgba(159,18,57,0.16); color: var(--danger); border: 1px solid rgba(251,113,133,0.35); }
.footer { padding: 2.5rem 6% 5rem; text-align: center; color: var(--muted); }
.lockup-footer { justify-content: center; margin-bottom: 0.8rem; }
.patron { color: var(--gold-2); font-weight: 800; margin: 0.4rem auto 0.8rem; max-width: 46rem; }
.risk { max-width: 62rem; margin: 0 auto 0.8rem; font-size: 0.86rem; }
.shell { display: grid; grid-template-columns: 250px 1fr; gap: 1rem; padding: 1.2rem 3% 2rem; align-items: start; }
.side {
    position: sticky; top: 86px; border: 1px solid var(--line); border-radius: 22px;
    background: rgba(15, 23, 42, 0.72); padding: 0.8rem; backdrop-filter: blur(16px);
}
html[data-theme="light"] .side { background: rgba(255,253,248,0.9); }
.side-user { padding: 0.6rem 0.7rem 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 0.4rem; }
.side-user span { display: block; color: var(--gold); font-size: 0.8rem; font-weight: 800; }
.side nav { display: grid; gap: 0.25rem; }
.side a {
    text-decoration: none; padding: 0.55rem 0.7rem; border-radius: 12px; font-weight: 700; color: var(--muted);
}
.side a.active, .side a:hover { background: rgba(212,175,55,0.12); color: var(--text); }
.shell-main { min-width: 0; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: right; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.04em; }
.bar { height: 8px; border-radius: 999px; background: rgba(148,163,184,0.2); overflow: hidden; min-width: 90px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #1d6fe8); }
.lesson { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: start; }
.lesson + .lesson { margin-top: 0.8rem; }
.check {
    width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
    border: 1px solid var(--line); color: var(--gold);
}
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.door { text-decoration: none; min-height: 160px; display: flex; flex-direction: column; justify-content: flex-end; }
.door i { font-size: 1.4rem; color: var(--gold); }
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 2rem 1rem 3rem; }
.auth-card { width: min(460px, 100%); }
.wa-fab {
    position: fixed; z-index: 50; left: 1.1rem; bottom: 1.1rem;
    display: flex; align-items: center; gap: 0.4rem;
    background: #128c7e; color: white; text-decoration: none; font-weight: 800;
    padding: 0.75rem 0.95rem; border-radius: 999px;
    box-shadow: 0 12px 30px rgba(18, 140, 126, 0.4);
}
.timeline { display: grid; gap: 0.8rem; }
.tiny { font-size: 0.82rem; color: var(--muted); }
.company-mark { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.company-mark img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); background: #020617; }

.school-hero {
    display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.4rem; align-items: center;
    padding: 2.4rem 6% 1.2rem;
}
.scene {
    position: relative; min-height: 420px; border-radius: 32px; overflow: hidden;
    border: 1px solid var(--line);
    background:
        radial-gradient(280px 180px at 80% 80%, rgba(212,175,55,.2), transparent 60%),
        radial-gradient(240px 160px at 10% 20%, rgba(29,111,232,.25), transparent 60%),
        rgba(15,23,42,.72);
}
.scene-svg { width: 100%; height: 360px; display: block; }
.scene-caption {
    position: relative; margin: 0 1rem 0.8rem;
    color: var(--gold-2); font-weight: 800; font-size: 0.86rem;
}
.board { fill: rgba(8, 18, 38, 0.92); stroke: #d4af37; stroke-width: 2; }
.candle line { stroke: #f3d98a; stroke-width: 3; }
.candle rect { fill: #34d399; }
.candle.down rect { fill: #fb7185; }
.candle { transform-origin: center bottom; animation: rise 1.4s ease both; }
.c2 { animation-delay: .15s; } .c3 { animation-delay: .3s; } .c4 { animation-delay: .45s; } .c5 { animation-delay: .6s; }
.trend { fill: none; stroke: #1d6fe8; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 2.4s ease forwards 0.4s; }
.suit { fill: #16325c; }
.lapel { fill: #102646; }
.shirt { fill: #f8fafc; }
.tie { fill: #d4af37; }
.neck, .skin { fill: #e4c3a1; }
.hair { fill: #24180f; }
.brow, .nose, .mouth, .ear { fill: none; stroke: #6b4e3d; stroke-width: 1.6; stroke-linecap: round; }
.eye { fill: #1c140f; }
.arm { fill: #16325c; }
.tome .cover { fill: #8c1d2c; }
.tome .cover-navy { fill: #0c3f86; }
.tome .cover-wine { fill: #6e2430; }
.tome .spine { fill: #d4af37; }
.tome .page-block { fill: #f4efe4; }
.tome .gilt { fill: none; stroke: rgba(212,175,55,.8); stroke-width: 1.2; }
.desk-top { fill: #c6a15a; }
.desk-front { fill: #1a2744; stroke: rgba(212,175,55,.45); }
.screen { fill: #0b1224; stroke: #d4af37; stroke-width: 2; }
.screen-bezel { fill: #07101f; }
.stand { fill: #8d7340; }
.stack rect { fill: #0c3f86; stroke: #d4af37; stroke-width: 1; }
.seal { fill: #d4af37; }
.seal-t { fill: #1a140c; font-size: 11px; font-weight: 800; font-family: Cairo, sans-serif; }
.float { animation: floaty 4.6s ease-in-out infinite; }
.f2 { animation-delay: .7s; }
.f3 { animation-delay: 1.3s; }
.star { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.s2 { animation-delay: .5s; }
.s3 { animation-delay: 1s; }
.prince-stage {
    margin: 0.4rem 6% 1rem; min-height: 280px;
    display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center;
    padding: 1.6rem 1.5rem; border-radius: 32px;
    border: 1px solid rgba(212,175,55,.55);
    background:
        radial-gradient(420px 180px at 100% 0%, rgba(212,175,55,.22), transparent 55%),
        linear-gradient(180deg, rgba(15,23,42,.94), rgba(2,6,23,.9));
    box-shadow: 0 0 0 1px rgba(212,175,55,.15), var(--shadow);
    animation: glow 4s ease-in-out infinite;
}
.prince-stage h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.4rem; }
.prince-body { font-size: 1.12rem; max-width: 46rem; margin-bottom: 0.6rem; }
.prince-mark {
    width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center;
    background: rgba(212,175,55,.15); color: var(--gold); font-size: 1.8rem;
    border: 1px solid rgba(212,175,55,.4);
}
.prince-logos { display: flex; align-items: center; gap: 0.7rem; }
.prince-logos .logo-pair img { width: 48px; height: 48px; }
.school-hero { align-items: start; }
.scene { min-height: 0; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.lesson-art h3 { margin: 0.2rem 0 0.3rem; }
.draw { width: 100%; height: 120px; }
.draw .wick { stroke: #f3d98a; stroke-width: 3; }
.draw .up { fill: #34d399; }
.draw .down { fill: #fb7185; }
.draw .label { fill: #f3d98a; font-size: 16px; font-weight: 800; font-family: Cairo, sans-serif; }
.draw .trend { stroke-dasharray: 280; animation: draw 2.2s ease forwards; }
.draw .dot { fill: #1d6fe8; }
.draw .shield { fill: rgba(12,63,134,.35); stroke: #d4af37; stroke-width: 3; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scaleY(.6); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes twinkle { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 1px rgba(212,175,55,.2), var(--shadow); } 50% { box-shadow: 0 0 32px rgba(212,175,55,.22), var(--shadow); } }
@media (prefers-reduced-motion: reduce) {
    .candle, .trend, .float, .star, .prince-stage, .draw .trend { animation: none; }
    .trend, .draw .trend { stroke-dashoffset: 0; }
}
@media (max-width: 980px) {
    .hero, .split, .grid-3, .grid-4, .doors, .stats, .shell { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding-bottom: 5rem; }
    .wa-fab span { display: none; }
    .menu-btn { display: grid; place-items: center; }
    .nav-links {
        display: none; position: absolute; top: 74px; right: 0; left: 0;
        flex-direction: column; align-items: flex-start; padding: 1rem 6%;
        background: rgba(2, 6, 23, 0.96); border-bottom: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
    .side { position: static; }
    .brand-copy { display: none; }
    .school-hero, .prince-stage, .path-grid { grid-template-columns: 1fr; }
    .scene { min-height: 280px; }
    .prince-stage { min-height: 0; }
}
