/* ==========================================================================
   Skills Builder Pro — design system
   Palette taken from the logo: navy #1A4A92, orange #DB7810, silver #A9ABAD.
   Uses CSS logical properties everywhere so RTL (Arabic) works automatically.
   ========================================================================== */

@font-face { font-family: "Jakarta"; src: url("../fonts/jakarta-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; src: url("../fonts/jakarta-latin-ext.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cairo"; src: url("../fonts/cairo-arabic.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Cairo"; src: url("../fonts/cairo-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --navy-950: #081a3a;
    --navy-900: #0d2550;
    --navy-800: #12336c;
    --brand: #1a4a92;
    --brand-500: #2b5fb0;
    --brand-200: #c6d6ef;
    --brand-100: #e1eaf7;
    --brand-50: #f2f6fc;
    --orange: #db7810;
    --orange-600: #b9640b;
    --orange-400: #f0952f;
    --orange-100: #fde9d3;
    --orange-50: #fff6ec;
    --silver: #a9abad;
    --silver-200: #dcdddf;

    --ink: #0f1b2d;
    --text: #334155;
    --muted: #64748b;
    --line: #e4e9f0;
    --line-strong: #d3dae4;
    --bg: #f5f7fb;
    --surface: #ffffff;

    --success: #15803d; --success-bg: #e7f6ec;
    --danger: #c62828;  --danger-bg: #fdecec;
    --warning: #b45309; --warning-bg: #fef3e2;
    --info: var(--brand); --info-bg: var(--brand-50);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
    --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 20px -6px rgba(15, 27, 45, .12);
    --shadow-lg: 0 20px 50px -20px rgba(13, 37, 80, .35);
    --ring: 0 0 0 4px rgba(26, 74, 146, .14);

    --font: "Jakarta", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --sidebar: 268px;
    --container: 1200px;
}

:root[dir="rtl"] { --font: "Cairo", "Jakarta", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-500); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: clamp(1.8rem, 2.5vw + 1rem, 3.1rem); }
h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
::selection { background: var(--orange-100); color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange-400); outline-offset: 2px; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hp-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-end { text-align: end; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: embed; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; gap: .75rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 1rem; }
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

/* ------------------------------------------------------------------ Buttons */
.btn {
    --b-bg: var(--brand); --b-fg: #fff; --b-bd: var(--brand);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.2rem; border-radius: 11px; border: 1.5px solid var(--b-bd);
    background: var(--b-bg); color: var(--b-fg); font: inherit; font-weight: 700; font-size: .92rem;
    cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
}
.btn:hover { color: var(--b-fg); transform: translateY(-1px); box-shadow: 0 8px 20px -10px var(--b-bd); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-accent { --b-bg: var(--orange); --b-bd: var(--orange); }
.btn-accent:hover { --b-bg: var(--orange-600); --b-bd: var(--orange-600); }
.btn-primary:hover, .btn:not([class*="btn-"]):hover { --b-bg: var(--navy-800); --b-bd: var(--navy-800); }
.btn-outline { --b-bg: transparent; --b-fg: var(--brand); --b-bd: var(--brand-200); }
.btn-outline:hover { --b-bg: var(--brand-50); --b-bd: var(--brand); --b-fg: var(--brand); }
.btn-ghost { --b-bg: transparent; --b-fg: var(--text); --b-bd: transparent; }
.btn-ghost:hover { --b-bg: var(--brand-50); --b-fg: var(--brand); box-shadow: none; }
.btn-light { --b-bg: #fff; --b-fg: var(--brand); --b-bd: #fff; }
.btn-danger { --b-bg: var(--danger); --b-bd: var(--danger); }
.btn-soft-danger { --b-bg: var(--danger-bg); --b-fg: var(--danger); --b-bd: transparent; }
.btn-success { --b-bg: var(--success); --b-bd: var(--success); }
.btn-sm { padding: .45rem .8rem; font-size: .82rem; border-radius: 9px; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1rem; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-icon { padding: .5rem; aspect-ratio: 1; border-radius: 10px; }
.btn-icon.btn-sm { padding: .38rem; }
.inline-form { display: inline; }

/* ------------------------------------------------------------------ Badges & chips */
.badge {
    display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px;
    font-size: .74rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
    background: var(--brand-50); color: var(--brand);
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-neutral { background: #eef1f5; color: var(--muted); }
.badge-accent { background: var(--orange-50); color: var(--orange-600); }
.badge-solid { background: var(--orange); color: #fff; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px;
    border: 1.5px solid var(--line); background: #fff; color: var(--text); font-weight: 600; font-size: .85rem;
}
.chip:hover, .chip.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); display: inline-block; }

/* ------------------------------------------------------------------ Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 1.4rem; }
.card-header { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.05rem; }
.card-footer { padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }

/* ------------------------------------------------------------------ Forms */
.field { margin-bottom: 1.1rem; min-width: 0; }
.field > label, .label { display: block; font-weight: 700; color: var(--ink); font-size: .86rem; margin-bottom: .4rem; }
.req { color: var(--orange); }
.input, select.input, textarea.input {
    width: 100%; padding: .72rem .9rem; border: 1.5px solid var(--line-strong); border-radius: 11px;
    background: #fff; color: var(--ink); font: inherit; font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 110px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-inline-end: 2.4rem; }
[dir="rtl"] select.input { background-position: left .9rem center; }
select[multiple].input { background-image: none; padding: .4rem; min-height: 150px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .8rem; margin: .35rem 0 0; font-weight: 600; }
.field-help { color: var(--muted); font-size: .8rem; margin: .35rem 0 0; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-inline-start: 2.6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.2rem; }
.form-actions { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; padding-top: .5rem; }
.form-section { padding-bottom: 1.2rem; margin-bottom: 1.4rem; border-bottom: 1px dashed var(--line); }
.form-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.form-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--orange-600); font-weight: 800; margin-bottom: 1rem; }
.check-list { display: grid; gap: .4rem; max-height: 260px; overflow: auto; padding: .6rem; border: 1.5px solid var(--line-strong); border-radius: 11px; }
.check-list label { display: flex; gap: .55rem; align-items: center; font-weight: 500; padding: .3rem .4rem; border-radius: 7px; cursor: pointer; }
.check-list label:hover { background: var(--brand-50); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 1.05rem; height: 1.05rem; }

.switch { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; font-weight: 600; color: var(--ink); }
.switch input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: inset-inline-start .2s; }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { inset-inline-start: 21px; }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }

.segmented { display: inline-flex; padding: 4px; background: #eef2f7; border-radius: 12px; gap: 4px; }
.segmented label { padding: .5rem 1rem; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--muted); }
.segmented input { position: absolute; opacity: 0; }
.segmented label:has(input:checked) { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

.dropzone {
    border: 2px dashed var(--brand-200); border-radius: var(--radius); background: var(--brand-50);
    padding: 2rem; text-align: center; transition: border-color .2s, background .2s; cursor: pointer;
}
.dropzone.is-over { border-color: var(--orange); background: var(--orange-50); }
.dropzone .icon { width: 2.4rem; height: 2.4rem; color: var(--brand); margin: 0 auto .6rem; display: block; }
.file-queue { display: grid; gap: .6rem; margin-top: 1rem; }
.file-row { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: .6rem; align-items: center; padding: .6rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.file-row .input { padding: .5rem .7rem; font-size: .88rem; }

/* Rich text editor */
.editor { border: 1.5px solid var(--line-strong); border-radius: 11px; overflow: hidden; background: #fff; }
.editor:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: .4rem; background: #f7f9fc; border-bottom: 1px solid var(--line); }
.editor-toolbar button { border: 0; background: transparent; padding: .35rem .6rem; border-radius: 7px; font: inherit; font-size: .82rem; font-weight: 700; color: var(--text); cursor: pointer; }
.editor-toolbar button:hover { background: var(--brand-100); color: var(--brand); }
.editor-area { min-height: 220px; max-height: 520px; overflow: auto; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }

/* ------------------------------------------------------------------ Alerts & toasts */
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: 12px; margin-bottom: 1.2rem; font-weight: 600; font-size: .92rem; border: 1px solid transparent; }
.alert .icon { margin-top: .15rem; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #c5e9d2; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #f6caca; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #f9dcb3; }
.alert-info { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.alert-close { margin-inline-start: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0; }
.credentials { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; padding: .25rem .5rem; border-radius: 6px; direction: ltr; display: inline-block; }
.toast-stack { position: fixed; inset-block-end: 1.2rem; inset-inline-end: 1.2rem; display: grid; gap: .6rem; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: .8rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; animation: toast-in .25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: start; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: .8rem 1rem; background: #f8fafd; border-bottom: 1px solid var(--line); white-space: nowrap; }
[dir="rtl"] .table th { letter-spacing: 0; font-size: .8rem; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #fafbfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: .35rem; justify-content: flex-end; }
.cell-title { font-weight: 700; color: var(--ink); }
.cell-sub { font-size: .8rem; color: var(--muted); }
.person { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--brand-100); color: var(--brand); flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.alt { background: var(--orange-100); color: var(--orange-600); }
.thumb { width: 56px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--brand-50); flex-shrink: 0; }

/* ------------------------------------------------------------------ Progress */
.progress { height: 8px; background: #e9eef5; border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-500)); width: var(--value, 0%); transition: width .5s ease; }
.progress.is-done > span { background: linear-gradient(90deg, var(--success), #22c55e); }
.progress-lg { height: 12px; }
.progress-line { display: flex; align-items: center; gap: .6rem; }
.progress-line .progress { flex: 1; }
.progress-line strong { font-size: .82rem; min-width: 3ch; color: var(--ink); }
.ring { --size: 92px; --v: 0; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--v) * 1%), #edf1f6 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring span { position: relative; font-weight: 800; font-size: 1.2rem; color: var(--ink); }

/* ------------------------------------------------------------------ Empty states & pagination */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty .icon { width: 3rem; height: 3rem; margin: 0 auto 1rem; display: block; color: var(--brand-200); }
.empty h3 { color: var(--ink); }
.pagination { display: flex; gap: .35rem; list-style: none; padding: 0; margin: 1.5rem 0 0; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 .7rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--text); font-size: .88rem; }
.pagination .active a, .pagination .active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }

/* ------------------------------------------------------------------ Tabs */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; overflow-x: auto; }
.tabs a, .tabs button { padding: .8rem 1.1rem; font-weight: 700; color: var(--muted); border: 0; background: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px; cursor: pointer; font: inherit; font-weight: 700; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--brand); }
.tabs .is-active { color: var(--brand); border-bottom-color: var(--orange); }
.tab-panel[hidden] { display: none; }

/* ------------------------------------------------------------------ Modal (native dialog) */
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100% - 2rem)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.modal::backdrop { background: rgba(8, 26, 58, .55); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 1.4rem; }

/* ==========================================================================
   Public website
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(13, 37, 80, .35); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: 76px; }
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand img { height: 50px; width: auto; }
.nav-links { display: flex; gap: .2rem; margin-inline-start: auto; align-items: center; }
.nav-links a { padding: .55rem .85rem; border-radius: 10px; color: var(--text); font-weight: 700; font-size: .93rem; }
.nav-links a:hover, .nav-links a.is-active { color: var(--brand); background: var(--brand-50); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.lang-switch { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--text); padding: .5rem .7rem; border-radius: 10px; font-size: .88rem; }
.lang-switch:hover { background: var(--brand-50); color: var(--brand); }
.nav-toggle { display: none; }

.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(3.5rem, 7vw, 6rem); background: radial-gradient(1000px 500px at 85% -10%, var(--brand-50), transparent 60%), radial-gradient(700px 400px at -10% 110%, var(--orange-50), transparent 60%), #fff; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: .8rem; color: var(--orange-600); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .95rem .4rem .45rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 700; font-size: .84rem; color: var(--ink); margin-bottom: 1.4rem; }
[dir="rtl"] .hero-badge { padding: .4rem .45rem .4rem .95rem; }
.hero-badge .badge { background: var(--orange); color: #fff; }
.hero h1 { font-size: clamp(2.2rem, 3.6vw + 1rem, 3.9rem); line-height: 1.07; letter-spacing: -.025em; }
[dir="rtl"] .hero h1 { line-height: 1.3; letter-spacing: 0; }
.hero h1 .accent { color: var(--orange); }
.hero h1 .brandc { color: var(--brand); }
.hero-lead { font-size: 1.12rem; color: var(--muted); max-width: 36rem; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 1.6rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust strong { font-size: 1.6rem; color: var(--ink); font-weight: 800; line-height: 1.1; }
.hero-trust span { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Orbit motif inspired by the logo's silver swoosh */
.orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; margin-inline: auto; }
.orbit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 14px solid transparent; border-top-color: var(--silver-200); border-inline-end-color: var(--silver); transform: rotate(-20deg); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .08)); }
.orbit::after { content: ""; position: absolute; inset: 11%; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--brand-500), var(--navy-900)); box-shadow: var(--shadow-lg); }
.orbit-card { position: absolute; z-index: 2; background: #fff; border-radius: 16px; padding: .85rem 1rem; box-shadow: var(--shadow-lg); display: flex; gap: .7rem; align-items: center; font-weight: 700; font-size: .88rem; color: var(--ink); animation: float 6s ease-in-out infinite; }
.orbit-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange); }
.orbit-card small { display: block; color: var(--muted); font-weight: 600; font-size: .76rem; }
.orbit-card.c1 { top: 12%; inset-inline-start: -4%; }
.orbit-card.c2 { bottom: 18%; inset-inline-end: -6%; animation-delay: -2s; }
.orbit-card.c3 { bottom: 2%; inset-inline-start: 12%; animation-delay: -4s; }
.orbit-card.c2 .ic { background: var(--brand-50); color: var(--brand); }
.orbit-center { position: absolute; inset: 11%; z-index: 1; display: grid; place-items: center; text-align: center; color: #fff; padding: 18%; }
.orbit-center .big { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; line-height: 1; }
.orbit-center .big .icon { width: 1em; height: 1em; }
.orbit-center p { margin: .6rem 0 0; opacity: .85; font-weight: 600; }
.orbit-dot { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); top: 6%; inset-inline-end: 22%; z-index: 2; box-shadow: 0 0 0 8px rgba(219, 120, 16, .15); }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .orbit-card { animation: none; } html { scroll-behavior: auto; } }

.section { padding: clamp(3.5rem, 6vw, 6rem) 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2.4rem; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 40rem; margin: 0; font-size: 1.04rem; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }

.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.cat-card { display: flex; gap: .9rem; align-items: center; padding: 1.15rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-200); color: var(--ink); }
.cat-card .ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex-shrink: 0; }
.cat-card:nth-child(even) .ic { background: var(--orange-50); color: var(--orange); }
.cat-card .ic .icon { width: 1.4rem; height: 1.4rem; }
.cat-card strong { display: block; font-size: .98rem; }
.cat-card span { font-size: .82rem; color: var(--muted); font-weight: 600; }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.course-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s, box-shadow .25s; position: relative; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-cover { aspect-ratio: 16 / 9; position: relative; background: linear-gradient(135deg, var(--brand), var(--navy-900)); overflow: hidden; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.course-card:hover .course-cover img { transform: scale(1.04); }
.course-cover .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.course-cover .placeholder .icon { width: 3rem; height: 3rem; }
.course-cover .placeholder::after { content: ""; position: absolute; width: 140%; aspect-ratio: 1; border-radius: 50%; border: 10px solid rgba(169, 171, 173, .35); inset-inline-start: 40%; top: -30%; }
.course-cover .tags { position: absolute; top: .8rem; inset-inline-start: .8rem; display: flex; gap: .4rem; z-index: 1; }
.course-cover .tags .badge { background: rgba(255, 255, 255, .95); color: var(--ink); }
.course-cover .tags .badge-solid { background: var(--orange); color: #fff; }
.course-fav { position: absolute; top: .7rem; inset-inline-end: .7rem; display: flex; gap: .35rem; z-index: 2; }
.fav-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); border: 0; color: var(--muted); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s, color .15s; }
.fav-btn:hover { transform: scale(1.08); color: var(--orange); }
.fav-btn.is-active { color: #fff; background: var(--orange); }
.fav-btn.is-active .icon { fill: currentColor; }
.fav-btn.wide { width: auto; border-radius: 11px; padding: 0 1rem; gap: .45rem; height: 42px; font: inherit; font-weight: 700; font-size: .88rem; display: inline-flex; align-items: center; border: 1.5px solid var(--line); box-shadow: none; }
.fav-btn.wide.is-active { border-color: var(--orange); }
.course-body { padding: 1.2rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.course-cat { font-size: .78rem; font-weight: 800; color: var(--orange-600); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
[dir="rtl"] .course-cat { letter-spacing: 0; }
.course-body h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.course-body h3 a { color: var(--ink); }
.course-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.course-body p { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.course-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: auto; flex-wrap: wrap; }
.course-meta span { display: inline-flex; gap: .35rem; align-items: center; }
.course-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.price { font-weight: 800; color: var(--ink); font-size: 1.15rem; }
.price del { color: var(--muted); font-weight: 600; font-size: .85rem; margin-inline-start: .35rem; }
.price.free { color: var(--success); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step { padding: 1.8rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 1.2rem; inset-inline-end: 1.4rem; font-size: 2.6rem; font-weight: 800; color: var(--brand-100); line-height: 1; }
.step .ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--brand); color: #fff; margin-bottom: 1.2rem; }
.step:nth-child(2) .ic { background: var(--orange); }
.step:nth-child(3) .ic { background: var(--navy-900); }
.step p { color: var(--muted); margin: 0; }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.feature-list { display: grid; gap: 1.1rem; }
.feature { display: flex; gap: 1rem; }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange); flex-shrink: 0; }
.feature h3 { font-size: 1rem; margin-bottom: .2rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.showcase { border-radius: var(--radius-lg); background: linear-gradient(150deg, var(--navy-900), var(--brand)); padding: 2rem; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.showcase::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 18px solid rgba(169, 171, 173, .3); inset-inline-end: -140px; top: -140px; }
.showcase .mock { background: #fff; border-radius: 16px; padding: 1.2rem; color: var(--text); position: relative; z-index: 1; }
.showcase .mock-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.showcase .mock-row:last-child { border-bottom: 0; }
.showcase h3 { color: #fff; position: relative; z-index: 1; }

.cta-band { border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); background: linear-gradient(120deg, var(--brand) 0%, var(--navy-900) 100%); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 420px; aspect-ratio: 1; border-radius: 50%; border: 22px solid rgba(219, 120, 16, .35); inset-inline-end: -120px; bottom: -260px; }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { opacity: .85; margin: 0; max-width: 36rem; }
.cta-band > * { position: relative; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.post-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card .cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--orange-100), var(--brand-100)); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.2rem 1.3rem 1.4rem; }
.post-card h3 a { color: var(--ink); }
.post-card p { color: var(--muted); font-size: .92rem; margin: 0; }

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 2rem; align-items: start; }
.contact-info { background: linear-gradient(160deg, var(--navy-900), var(--brand)); color: #fff; border-radius: var(--radius-lg); padding: 2.2rem; position: relative; overflow: hidden; }
.contact-info::after { content: ""; position: absolute; width: 260px; aspect-ratio: 1; border-radius: 50%; border: 16px solid rgba(169, 171, 173, .3); inset-inline-end: -100px; bottom: -100px; }
.contact-info h2, .contact-info h3 { color: #fff; }
.contact-info a { color: #fff; }
.contact-line { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.2rem; position: relative; z-index: 1; }
.contact-line .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); flex-shrink: 0; }
.contact-line small { display: block; opacity: .7; font-weight: 600; }
.socials { display: flex; gap: .5rem; flex-wrap: wrap; position: relative; z-index: 1; }
.socials a { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; transition: background .2s; }
.socials a:hover { background: var(--orange); color: #fff; }

.page-hero { padding: 3.2rem 0 2.6rem; background: radial-gradient(800px 300px at 90% 0, var(--brand-50), transparent 70%), #fff; border-bottom: 1px solid var(--line); }
.page-hero p { color: var(--muted); max-width: 44rem; font-size: 1.05rem; margin: 0; }
.breadcrumb { display: flex; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: .9rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

.prose { color: var(--text); font-size: 1.02rem; line-height: 1.8; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.3rem; border-inline-start: 4px solid var(--orange); background: var(--orange-50); border-radius: 0 12px 12px 0; }
[dir="rtl"] .prose blockquote { border-radius: 12px 0 0 12px; }
.prose img { border-radius: 12px; margin: 1rem 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: .5rem .7rem; }

.filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.6rem; }
.filters .input { width: auto; min-width: 160px; }
.filters .input-icon { flex: 1; min-width: 220px; }
.filters .input-icon .input { width: 100%; }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
.course-hero { background: linear-gradient(140deg, var(--navy-950), var(--brand)); color: #fff; padding: 3rem 0; position: relative; overflow: hidden; }
.course-hero::after { content: ""; position: absolute; width: 520px; aspect-ratio: 1; border-radius: 50%; border: 22px solid rgba(169, 171, 173, .22); inset-inline-end: -160px; top: -220px; }
.course-hero h1 { color: #fff; font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); }
.course-hero .lead { opacity: .85; font-size: 1.08rem; max-width: 46rem; }
.course-hero .breadcrumb a, .course-hero .breadcrumb { color: rgba(255, 255, 255, .7); }
.course-hero .course-meta { color: rgba(255, 255, 255, .85); font-size: .9rem; margin-top: 1.2rem; }
.course-hero > .container { position: relative; z-index: 1; }
.buy-box { position: sticky; top: 96px; }
.buy-box .cover { aspect-ratio: 16 / 9; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: linear-gradient(135deg, var(--brand), var(--navy-900)); display: grid; place-items: center; color: #fff; }
.buy-box .cover img { width: 100%; height: 100%; object-fit: cover; }
.buy-box .price { font-size: 1.9rem; }
.facts { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .7rem; }
.facts li { display: flex; gap: .7rem; align-items: center; font-size: .92rem; font-weight: 600; }
.facts .icon { color: var(--brand); }
.check-items { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.4rem; margin: 0; }
.check-items li { display: flex; gap: .6rem; align-items: flex-start; }
.check-items .icon { color: var(--success); margin-top: .2rem; }
.material-list { list-style: none; padding: 0; margin: 0; }
.material-list li { display: flex; gap: .9rem; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.material-list li:last-child { border-bottom: 0; }
.type-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.type-pdf { background: #fdecec; color: #c62828; }
.type-pptx { background: var(--orange-50); color: var(--orange-600); }
.type-audio { background: var(--brand-50); color: var(--brand); }

.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .72); padding: 4rem 0 1.5rem; margin-top: 0; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: var(--orange-400); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .92rem; }
.footer-logo { background: #fff; border-radius: 14px; padding: .6rem .9rem; display: inline-block; margin-bottom: 1rem; }
.footer-logo img { height: 46px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, var(--navy-950), var(--brand)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; width: 640px; aspect-ratio: 1; border-radius: 50%; border: 26px solid rgba(169, 171, 173, .25); inset-inline-end: -300px; top: 50%; transform: translateY(-50%); }
.auth-side::after { content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); inset-inline-end: 80px; top: 22%; box-shadow: 0 0 0 10px rgba(219, 120, 16, .2); }
.auth-side h2 { color: #fff; font-size: clamp(1.8rem, 2.4vw, 2.6rem); max-width: 26rem; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side .footer-logo { align-self: flex-start; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.25rem; background: #fff; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.9rem; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }

/* ==========================================================================
   App shell (admin + student panels)
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy-950); color: rgba(255, 255, 255, .72); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-brand { padding: 1.2rem 1.2rem 1rem; }
.sidebar-brand a { background: #fff; display: flex; justify-content: center; border-radius: 14px; padding: .55rem; }
.sidebar-brand img { height: 46px; }
.side-nav { padding: .5rem .8rem 1rem; flex: 1; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: rgba(255, 255, 255, .38); padding: 1.1rem .8rem .5rem; }
[dir="rtl"] .side-label { letter-spacing: 0; font-size: .78rem; }
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: 11px; color: rgba(255, 255, 255, .75); font-weight: 600; font-size: .92rem; margin-bottom: 2px; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a.is-active { background: linear-gradient(90deg, rgba(219, 120, 16, .22), rgba(219, 120, 16, .05)); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
[dir="rtl"] .side-nav a.is-active { background: linear-gradient(270deg, rgba(219, 120, 16, .22), rgba(219, 120, 16, .05)); box-shadow: inset -3px 0 0 var(--orange); }
.side-nav a .count { margin-inline-start: auto; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800; padding: .05rem .5rem; border-radius: 999px; }
.side-foot { padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user { display: flex; gap: .7rem; align-items: center; color: #fff; }
.side-user .avatar { background: rgba(255, 255, 255, .12); color: #fff; }
.side-user small { display: block; color: rgba(255, 255, 255, .5); font-size: .76rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 70px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 1rem; padding: 0 1.8rem; position: sticky; top: 0; z-index: 40; }
.topbar .menu-btn { display: none; }
.topbar-title { font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.topbar-actions { margin-inline-start: auto; display: flex; gap: .4rem; align-items: center; }
.content { padding: 1.8rem; flex: 1; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; gap: 1rem; align-items: center; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex-shrink: 0; }
.stat .ic .icon { width: 1.4rem; height: 1.4rem; }
.stat.orange .ic { background: var(--orange-50); color: var(--orange); }
.stat.green .ic { background: var(--success-bg); color: var(--success); }
.stat.navy .ic { background: var(--navy-900); color: #fff; }
.stat strong { display: block; font-size: 1.6rem; color: var(--ink); line-height: 1.1; font-weight: 800; }
.stat span { color: var(--muted); font-size: .84rem; font-weight: 600; }
a.stat:hover { border-color: var(--brand-200); box-shadow: var(--shadow); }

.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.grid-halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; align-items: start; }
.list { list-style: none; padding: 0; margin: 0; }
.list > li { display: flex; gap: .8rem; align-items: center; padding: .85rem 1.4rem; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.bars { display: flex; align-items: flex-end; gap: .8rem; height: 170px; padding: 1rem 0 0; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; height: 100%; justify-content: flex-end; }
.bars .bar i { width: 100%; max-width: 44px; border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, var(--brand-500), var(--brand)); height: var(--h); min-height: 4px; }
.bars .bar:last-child i { background: linear-gradient(180deg, var(--orange-400), var(--orange)); }
.bars .bar small { font-size: .75rem; color: var(--muted); font-weight: 700; }
.bars .bar b { font-size: .8rem; color: var(--ink); }

.welcome { background: linear-gradient(120deg, var(--navy-900), var(--brand)); color: #fff; border-radius: var(--radius-lg); padding: 1.8rem 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 1.6rem; position: relative; overflow: hidden; flex-wrap: wrap; }
.welcome::after { content: ""; position: absolute; width: 300px; aspect-ratio: 1; border-radius: 50%; border: 16px solid rgba(169, 171, 173, .25); inset-inline-end: -80px; top: -150px; }
.welcome h1 { color: #fff; font-size: 1.6rem; margin-bottom: .3rem; }
.welcome p { margin: 0; opacity: .85; }
.welcome > * { position: relative; z-index: 1; }

.enroll-card { display: flex; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; align-items: center; transition: box-shadow .2s, border-color .2s; }
.enroll-card:hover { box-shadow: var(--shadow); border-color: var(--brand-200); }
.enroll-card .thumb { width: 96px; height: 66px; border-radius: 11px; }
.enroll-card h3 { font-size: 1rem; margin-bottom: .3rem; }
.enroll-grid { display: grid; gap: .9rem; }
.continue-card { display: grid; grid-template-columns: 220px 1fr; gap: 1.4rem; align-items: center; }
.continue-card .thumb { width: 100%; height: 130px; border-radius: 14px; }

.info-list { display: grid; gap: 0; margin: 0; }
.info-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); font-weight: 600; font-size: .88rem; }
.info-list dd { margin: 0; font-weight: 700; color: var(--ink); text-align: end; word-break: break-word; }

.message-thread { display: grid; gap: 1rem; }
.bubble { padding: 1rem 1.2rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.bubble.reply { background: var(--brand-50); border-color: var(--brand-100); margin-inline-start: 2rem; }
.bubble-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: .4rem; }
.bubble-head strong { color: var(--ink); }

.sortable-handle { cursor: grab; color: var(--muted); }
.sortable-row.is-dragging { opacity: .5; }

/* ==========================================================================
   Secure content viewer
   ========================================================================== */
.learn { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.learn-nav { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.learn-nav .list > li { padding: 0; }
.learn-nav .list a { display: flex; gap: .75rem; align-items: center; padding: .8rem 1rem; color: var(--text); width: 100%; }
.learn-nav .list a:hover { background: var(--brand-50); }
.learn-nav .list a.is-active { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--orange); }
[dir="rtl"] .learn-nav .list a.is-active { box-shadow: inset -3px 0 0 var(--orange); }
.learn-nav .done { color: var(--success); }
.viewer {
    background: #1e2633; border-radius: var(--radius); overflow: hidden; position: relative;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.viewer:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; background: #141b26; color: #dbe3ee; flex-wrap: wrap; }
.viewer-bar .btn-ghost { --b-fg: #dbe3ee; }
.viewer-bar .btn-ghost:hover { --b-bg: rgba(255, 255, 255, .08); --b-fg: #fff; }
.viewer-bar .page-info { font-weight: 700; font-size: .88rem; min-width: 90px; text-align: center; direction: ltr; }
.viewer-bar .spacer { flex: 1; }
.viewer-stage { position: relative; min-height: 60vh; max-height: calc(100vh - 220px); overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 1.2rem; }
.viewer:fullscreen .viewer-stage { max-height: none; flex: 1; }
.viewer-stage canvas { box-shadow: 0 10px 40px rgba(0, 0, 0, .45); background: #fff; max-width: none; }
.viewer-stage .pptx-host { background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.viewer-watermark { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 4rem; padding: 2rem; opacity: .1; }
.viewer-watermark span { transform: rotate(-24deg); color: #000; font-weight: 800; font-size: 1rem; white-space: nowrap; direction: ltr; }
.viewer-shield { position: absolute; inset: 0; z-index: 4; }
.viewer-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #dbe3ee; font-weight: 700; z-index: 6; background: #1e2633; }
.viewer-loading[hidden] { display: none; }
.spinner { width: 38px; height: 38px; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--orange); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto .8rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.audio-stage { padding: 3rem 1.5rem; display: grid; place-items: center; gap: 1.5rem; color: #fff; text-align: center; background: radial-gradient(circle at 50% 0, var(--brand), #141b26 70%); min-height: 360px; }
.audio-disc { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--v, 0) * 1%), rgba(255, 255, 255, .12) 0); position: relative; }
.audio-disc::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #141b26; }
.audio-disc .icon { position: relative; width: 3rem; height: 3rem; }
.audio-stage audio { width: min(560px, 100%); }
.blurred .viewer-stage, .blurred .audio-stage { filter: blur(18px); }

@media print {
    body * { visibility: hidden !important; }
    body::after { content: "Printing is disabled."; visibility: visible; position: fixed; top: 40%; left: 0; right: 0; text-align: center; font-size: 24px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .course-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .grid-main, .course-layout { grid-template-columns: 1fr; }
    .buy-box { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .learn { grid-template-columns: 1fr; }
    .learn-nav { position: static; max-height: none; }
}
@media (max-width: 960px) {
    .nav-links { display: none; position: absolute; top: 76px; inset-inline: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.4rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .nav-links.is-open { display: flex; }
    .nav-links a { padding: .8rem 1rem; }
    .nav-toggle { display: inline-flex; }
    .nav-actions .hide-sm { display: none; }
    .hero-grid, .features, .contact-grid { grid-template-columns: 1fr; }
    .orbit { max-width: 360px; }
    .steps { grid-template-columns: 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar); z-index: 100; transform: translateX(-100%); transition: transform .25s ease; }
    [dir="rtl"] .sidebar { transform: translateX(100%); }
    .sidebar.is-open { transform: none !important; box-shadow: var(--shadow-lg); }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(8, 26, 58, .45); z-index: 90; }
    .sidebar-backdrop[hidden] { display: none; }
    .topbar .menu-btn { display: inline-flex; }
    .content, .topbar { padding-inline: 1.1rem; }
    .grid-halves { grid-template-columns: 1fr; }
    .continue-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .cat-grid, .course-grid, .post-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .stat { padding: .9rem; flex-direction: column; align-items: flex-start; gap: .6rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .check-items { grid-template-columns: 1fr; }
    .file-row { grid-template-columns: 1fr; }
    .brand img { height: 42px; }
    .orbit-card { font-size: .78rem; padding: .6rem .75rem; }
    .orbit-card .ic { width: 32px; height: 32px; }
    .table th, .table td { padding: .7rem .75rem; }
    .viewer-stage { padding: .5rem; }
}

/* PPTX renderer: we provide our own toolbar, hide the library's built-in controls */
.pptx-host .pptx-preview-wrapper-next,
.pptx-host .pptx-preview-wrapper-pre,
.pptx-host .pptx-preview-wrapper-pagination { display: none !important; }
.pptx-host { position: relative; }
.pptx-host .pptx-preview-wrapper { background: #fff !important; }
