/* =========================================================
   سنتر — Sntr  |  ألوان تعليمية هادية بتباين واضح
   --brand بيتغيّر حسب لون منصة المدرس
   ========================================================= */
:root {
    --brand: #2f6f6a;
    --brand-dark: color-mix(in srgb, var(--brand) 72%, #000);
    --brand-deep: color-mix(in srgb, var(--brand) 55%, #0b1413);
    --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff);
    --brand-softer: color-mix(in srgb, var(--brand) 5%, #fff);
    --brand-line: color-mix(in srgb, var(--brand) 22%, #fff);
    --accent: #e39a3b;
    --accent-soft: #fdf1e1;
    --ink: #0f1d1b;
    --ink-2: #2d3b39;
    --muted: #5d6b69;
    --bg: #f3f5f3;
    --card: #ffffff;
    --line: #e3e8e6;
    --ok: #1f8a4c;
    --warn: #c47a12;
    --radius: 20px;
    --shadow: 0 1px 2px rgba(15, 29, 27, .05), 0 6px 20px -10px rgba(15, 29, 27, .12);
    --shadow-lg: 0 30px 60px -28px rgba(15, 29, 27, .35);

    --bs-body-font-family: "Cairo", system-ui, sans-serif;
    --bs-body-font-weight: 500;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--bg);
    --bs-emphasis-color: var(--ink);
    --bs-border-color: var(--line);
    --bs-secondary-color: var(--muted);
    --bs-border-radius: 12px;
    --bs-border-radius-lg: 16px;
    --bs-focus-ring-color: color-mix(in srgb, var(--brand) 25%, transparent);
}

body { background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-size: 15.5px; line-height: 1.7; }
a { text-decoration: none; color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .display-5, .display-6, .font-head { font-family: "Cairo", sans-serif; font-weight: 800; letter-spacing: -.01em; color: var(--ink); line-height: 1.35; }
b, strong, .fw-bold { font-weight: 800 !important; }
.fw-semibold { font-weight: 700 !important; }
.text-muted { color: var(--muted) !important; }
.text-brand { color: var(--brand) !important; }
.text-ink { color: var(--ink) !important; }
.text-warn { color: var(--warn) !important; }
.bg-brand { background: var(--brand) !important; color: #fff; }
.bg-brand-soft { background: var(--brand-soft) !important; }
.bg-accent { background: var(--accent) !important; color: #fff; }
.bg-cream { background: var(--bg); }
.small, small { font-size: .875em; }
.xsmall { font-size: .8rem; }
.min-w-0 { min-width: 0; }
.req { color: #d0482b; }
.line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; }
@media (min-width: 992px) { .text-lg-start-rtl { text-align: right !important; } }
@media (min-width: 768px) { .text-md-start-rtl { text-align: right !important; } }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; border-radius: 12px; padding: .5rem 1.1rem; }
.btn-sm { padding: .32rem .75rem; border-radius: 10px; }
.btn-lg { padding: .8rem 1.6rem; border-radius: 14px; }
.btn-brand { --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-color: #fff; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
    box-shadow: 0 8px 20px -10px var(--brand); }
.btn-brand:hover { transform: translateY(-1px); }
.btn-soft { --bs-btn-color: var(--brand); --bs-btn-bg: var(--brand-soft); --bs-btn-border-color: transparent;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: var(--brand); --bs-btn-disabled-bg: var(--brand-soft); }
.btn-ghost { --bs-btn-color: var(--ink); --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: var(--brand); }
.btn-light { --bs-btn-bg: #eef1ef; --bs-btn-color: var(--ink-2); --bs-btn-border-color: transparent; --bs-btn-hover-bg: #e2e7e4; --bs-btn-hover-border-color: transparent; }
.btn-outline-brand { --bs-btn-color: var(--ink-2); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-color: var(--brand); --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand); --bs-btn-active-color: #fff; --bs-btn-active-border-color: var(--brand); background: #fff; }
.btn-wa { --bs-btn-color: #fff; --bs-btn-bg: #22a35a; --bs-btn-hover-bg: #1a8a4a; --bs-btn-hover-color: #fff; --bs-btn-border-color: transparent; }
.btn { transition: transform .15s, background-color .15s, box-shadow .15s; }

.form-control, .form-select { border-radius: 12px; padding: .7rem .95rem; border: 1.5px solid var(--line); background-color: #fff; font-weight: 600; color: var(--ink); }
.form-control::placeholder { color: #9aa5a3; font-weight: 500; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .22rem var(--brand-soft); }
.form-control-sm { padding: .38rem .75rem; }
.form-label { font-weight: 700; font-size: .92rem; margin-bottom: .4rem; color: var(--ink-2); }
.form-text { color: var(--muted); }
.form-check-input { border: 1.5px solid #c3ccc9; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem var(--brand-soft); border-color: var(--brand); }
.input-group-text { background: #f1f4f2; border: 1.5px solid var(--line); color: var(--muted); font-weight: 700; }
.progress { background: #e6ebe8; border-radius: 99px; }
.progress-bar { border-radius: 99px; }
.progress-lg { height: 12px; }
.badge { font-weight: 700; padding: .42em .75em; }
.modal-content { border: 0; border-radius: 24px; box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--line); padding: 1.1rem 1.4rem; }
.modal-body { padding: 1.4rem; }
.modal-title { font-weight: 800; }
.dropdown-menu { border-radius: 14px; padding: .4rem; }
.dropdown-item { border-radius: 10px; font-weight: 600; padding: .5rem .8rem; }

/* ---------- Avatars ---------- */
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; }
.avatar-xs { width: 26px; height: 26px; font-size: .75rem; }
.avatar-sm { width: 36px; height: 36px; font-size: .9rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 2rem; }
.avatar-hero { width: 132px; height: 132px; font-size: 3rem; border: 5px solid rgba(255, 255, 255, .35); box-shadow: var(--shadow-lg); }
.avatar-letter { align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }

.logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 900; font-size: 1.45rem; color: var(--ink); }

/* ---------- Cards ---------- */
.card-s { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-s-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem .8rem; }
.card-s-head h3 { font-size: 1.02rem; font-weight: 800; margin: 0; }
.empty { text-align: center; padding: 3.5rem 1.5rem; }
.empty-icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 2rem; background: var(--brand-soft); color: var(--brand); margin: 0 auto 1rem; }
.empty-icon.warn { background: var(--accent-soft); color: var(--warn); }
.mini-empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: 2rem 1rem 2.4rem; color: var(--muted); font-weight: 600; }
.mini-empty > i { font-size: 1.8rem; color: var(--brand); width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: var(--brand-soft); }
.divider-label { font-weight: 800; font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: .75rem; margin-top: .5rem; }
.divider-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.notice { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.1rem; border-radius: 16px; margin-bottom: 1.5rem; font-weight: 600; }
.notice > i { font-size: 1.3rem; }
.notice-info { background: var(--brand-soft); color: var(--brand-dark); }
.notice-warn { background: var(--accent-soft); color: #8a5208; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; width: min(520px, calc(100% - 32px)); }
.toast-alert { border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); font-weight: 700; animation: drop .35s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } }

/* =========================================================
   NAV
   ========================================================= */
.nav-glass { background: color-mix(in srgb, #fff 80%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); padding: .75rem 0; }
.nav-glass .nav-link { color: var(--ink-2); font-weight: 700; }
.nav-glass .nav-link:hover { color: var(--brand); }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem 1rem; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: .86rem; }

/* =========================================================
   LANDING
   ========================================================= */
.hero { position: relative; overflow: hidden; padding: 5.5rem 0 6.5rem;
    background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
                radial-gradient(800px 400px at 0% 110%, #fbe3c4, transparent 60%), #f7f8f6; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--brand) 16%, transparent) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero-blob { display: none; }
.hero h1 { font-weight: 900; font-size: clamp(2.1rem, 5vw, 3.6rem); }
.hero .lead { font-weight: 600; color: var(--ink-2) !important; font-size: 1.15rem; }
.underline-soft { background: linear-gradient(120deg, var(--brand), #3aa092); -webkit-background-clip: text; background-clip: text; color: transparent !important; }

.mock-wrap { position: relative; max-width: 520px; margin: 0 auto; }
.mock-browser { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; transform: perspective(1200px) rotateY(6deg) rotate(-1deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: .75rem 1rem; background: #f1f4f2; border-bottom: 1px solid var(--line); direction: ltr; }
.mock-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #f26b5b; }
.mock-bar .dot:nth-child(2) { background: #f4bf4f; } .mock-bar .dot:nth-child(3) { background: #5cc272; }
.mock-url { margin-left: .75rem; flex: 1; background: #fff; border-radius: 8px; padding: .2rem .7rem; font-size: .82rem; color: var(--ink-2); font-weight: 700; }
.mock-url i { color: var(--ok); font-size: .7rem; }
.mock-body { padding: 1.25rem; }
.mock-course { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mock-cover { height: 82px; display: grid; place-items: center; font-size: 1.9rem; color: #fff; }
.mock-cover.c1 { background: linear-gradient(135deg, #2f6f6a, #48a597); }
.mock-cover.c2 { background: linear-gradient(135deg, #d5862c, #f0b968); }
.mock-progress { background: var(--brand-softer); border-radius: 14px; padding: .8rem; }
.float-chip { position: absolute; display: flex; align-items: center; gap: .65rem; background: #fff; padding: .7rem 1rem; border-radius: 16px; box-shadow: var(--shadow-lg); font-size: .86rem; animation: float 5s ease-in-out infinite; border: 1px solid var(--line); }
.float-chip i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.1rem; }
.float-chip b { display: block; }
.float-chip small { color: var(--muted); font-weight: 600; }
.chip-1 { bottom: -22px; right: -18px; }
.chip-2 { top: 38%; left: -34px; animation-delay: -2.5s; }
.chip-2 i { background: var(--accent); }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (max-width: 575px) { .chip-2 { left: -6px; top: -26px; } .chip-1 { right: -4px; } .mock-browser { transform: none; } }

.section { padding: 6rem 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3.2rem; }
.section-head h2 { font-weight: 900; margin: .8rem 0 .5rem; font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.section-head p { color: var(--muted); font-weight: 600; font-size: 1.05rem; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.9rem; transition: .25s; position: relative; overflow: hidden; }
.feature-card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, var(--brand), #48a597); transform: scaleX(0); transform-origin: right; transition: .3s; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-card:hover::after { transform: scaleX(1); }
.feature-card p { font-weight: 600; }
.feature-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #6cc2b5)); color: #fff; box-shadow: 0 10px 20px -10px var(--brand); }
.col-md-6:nth-child(even) .feature-icon { background: linear-gradient(135deg, #d5862c, #f0b968); box-shadow: 0 10px 20px -10px #d5862c; }
.step { text-align: center; padding: 1rem 1.5rem; position: relative; }
.step p { font-weight: 600; }
.step-num { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; background: var(--brand); color: #fff; box-shadow: 0 0 0 8px var(--brand-soft); transform: rotate(-6deg); }
@media (min-width: 768px) { .steps .col-md-4:not(:last-child) .step::after { content: ""; position: absolute; top: 46px; left: -20%; width: 40%; border-top: 2px dashed #cfd8d5; } }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: .45rem 0; display: flex; gap: .6rem; font-weight: 700; color: var(--ink-2); }
.check-list li::before { content: "\F26B"; font-family: "bootstrap-icons"; color: var(--brand); }
.mini-stat { background: var(--brand-softer); border: 1px solid var(--line); border-radius: 16px; padding: .85rem; }
.mini-stat small { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; }
.mini-stat b { font-size: 1.2rem; font-weight: 900; }
.mini-stat.ok { background: #eaf6ee; } .mini-stat.ok b { color: var(--ok); }
.mini-stat.warn { background: #fdf3e2; } .mini-stat.warn b { color: var(--warn); }
.demo-row { display: flex; align-items: center; gap: .7rem; padding: .65rem 0; border-top: 1px solid var(--line); font-weight: 700; }
.accordion-soft .accordion-item { border: 1px solid var(--line); border-radius: 16px !important; margin-bottom: .75rem; overflow: hidden; }
.accordion-soft .accordion-button { font-weight: 800; background: #fff; box-shadow: none; color: var(--ink); }
.accordion-soft .accordion-button:not(.collapsed) { color: var(--brand); background: var(--brand-softer); }
.accordion-soft .accordion-body { font-weight: 600; }
.cta-box { background: linear-gradient(135deg, var(--brand-deep), var(--brand) 55%, color-mix(in srgb, var(--brand) 70%, #6cc2b5)); color: #fff; border-radius: 30px; padding: 4rem 1.5rem; position: relative; overflow: hidden; }
.cta-box h2 { color: #fff; font-weight: 900; }
.cta-box::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 18px 18px; }
.cta-box > * { position: relative; }
.footer { padding: 1.9rem 0; border-top: 1px solid var(--line); background: #fff; font-weight: 600; }

/* =========================================================
   DASHBOARD
   ========================================================= */
.dash-body { background: var(--bg); }
.dash { display: flex; min-height: 100vh; }
.dash-side { width: 272px; flex-shrink: 0; color: #fff;
    background: linear-gradient(170deg, var(--brand-deep), var(--brand-dark) 60%, var(--brand)) !important; }
@media (min-width: 992px) { .dash-side { position: sticky; top: 0; height: 100vh; } }
@media (max-width: 991.98px) { .dash-side.offcanvas-lg { --bs-offcanvas-width: 288px; } }
.dash-side-inner { display: flex; flex-direction: column; height: 100%; padding: 1.4rem 1rem; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: .8rem; padding: .9rem; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); margin-bottom: 1.4rem; }
.side-brand .avatar { border: 2px solid rgba(255, 255, 255, .5); }
.side-brand .avatar-letter { background: rgba(255, 255, 255, .2); color: #fff; }
.side-brand-name { font-weight: 900; font-size: 1.08rem; color: #fff; line-height: 1.3; }
.side-brand-link { font-size: .78rem; color: rgba(255, 255, 255, .7); font-weight: 600; }
.side-brand-link:hover { color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: .2rem; }
.side-nav a { display: flex; align-items: center; gap: .8rem; padding: .72rem .95rem; border-radius: 14px; color: rgba(255, 255, 255, .78); font-weight: 700; transition: .15s; }
.side-nav a i { font-size: 1.15rem; }
.side-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.side-nav a.active { background: #fff; color: var(--brand-dark); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45); }
.side-nav .badge { background: var(--accent) !important; color: #fff; }
.side-foot { margin-top: auto; padding-top: 1.5rem; display: flex; flex-direction: column; gap: .3rem; }
.side-sub { display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font-size: .82rem; font-weight: 700; margin-bottom: .5rem; }
.side-sub i { color: #8ff0b7; }
.side-sub:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.btn-side { --bs-btn-bg: #fff; --bs-btn-color: var(--brand-dark); --bs-btn-hover-bg: rgba(255, 255, 255, .9); --bs-btn-hover-color: var(--brand-dark); --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent; }
.side-link { color: rgba(255, 255, 255, .72); font-size: .88rem; font-weight: 700; padding: .4rem .5rem; text-align: center; }
.side-link:hover { color: #fff; }
.side-powered { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; color: rgba(255, 255, 255, .5); font-size: .75rem; font-weight: 700; margin-top: .4rem; }
.side-powered img { filter: brightness(0) invert(1); opacity: .6; }
.side-powered:hover { color: #fff; }

.dash-main { flex: 1; min-width: 0; }
.dash-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .75rem; padding: .85rem 1.75rem; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.dash-title { font-size: 1.25rem; font-weight: 900; margin: 0; }
.dash-content { padding: 1.75rem 1.75rem 4rem; max-width: 1320px; }
@media (max-width: 575px) { .dash-content { padding: 1.1rem .9rem 3rem; } .dash-top { padding: .7rem .9rem; } }

/* ترحيب */
.welcome { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; border-radius: 26px; overflow: hidden; color: #fff; box-shadow: var(--shadow-lg);
    background: linear-gradient(130deg, var(--brand-deep), var(--brand) 70%, color-mix(in srgb, var(--brand) 75%, #7fd1c3)); position: relative; }
.welcome::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px); background-size: 20px 20px; pointer-events: none; }
.welcome > * { position: relative; }
.welcome-main { padding: 1.8rem; }
.welcome-avatar { border: 3px solid rgba(255, 255, 255, .55); }
.welcome .avatar-letter { background: rgba(255, 255, 255, .2); color: #fff; }
.welcome-greet { font-weight: 700; opacity: .8; }
.welcome-name { color: #fff; font-weight: 900; font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }
.welcome-link { display: flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: .45rem .5rem .45rem .9rem; max-width: 520px; font-weight: 700; }
.welcome-link > span { flex: 1; }
.welcome-link .btn { --bs-btn-bg: #fff; --bs-btn-color: var(--brand-dark); --bs-btn-hover-bg: #f1f1f1; --bs-btn-hover-color: var(--brand-dark); white-space: nowrap; }
.welcome-money { padding: 1.8rem; background: rgba(0, 0, 0, .14); border-right: 1px solid rgba(255, 255, 255, .12); }
.welcome-total { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 900; line-height: 1.2; }
.welcome .month-nav { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); }
.welcome .month-nav span { color: #fff; }
.welcome .month-nav .btn { --bs-btn-bg: transparent; --bs-btn-color: #fff; --bs-btn-hover-bg: rgba(255, 255, 255, .15); --bs-btn-hover-color: #fff; }
.progress-glass { background: rgba(255, 255, 255, .18); height: 10px; }
.progress-glass .progress-bar { background: #fff; }
@media (max-width: 991px) { .welcome { grid-template-columns: 1fr; } .welcome-money { border-right: 0; border-top: 1px solid rgba(255, 255, 255, .12); } }

/* KPIs */
.kpi { display: block; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem 1.15rem; color: var(--ink); box-shadow: var(--shadow); transition: .2s; position: relative; overflow: hidden; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); border-color: transparent; }
.kpi::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: var(--k); opacity: .07; top: -30px; left: -30px; }
.kpi-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; color: #fff; background: var(--k); box-shadow: 0 8px 16px -8px var(--k); margin-bottom: .8rem; }
.kpi-label { color: var(--muted); font-size: .86rem; font-weight: 700; }
.kpi-value { font-size: 1.55rem; font-weight: 900; line-height: 1.35; }
.kpi-sub { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kpi-c1 { --k: var(--brand); } .kpi-c2 { --k: #5b5fc7; } .kpi-c3 { --k: #d4546f; } .kpi-c4 { --k: #d5862c; }
.kpi-c5 { --k: #1f7a8c; } .kpi-c6 { --k: #1f8a4c; } .kpi-c7 { --k: #c4623f; } .kpi-c8 { --k: #7a5cc0; }
@media (max-width: 575px) { .kpi { padding: .9rem; } .kpi-value { font-size: 1.2rem; } .kpi-icon { width: 38px; height: 38px; font-size: 1rem; } }

/* Chart */
.chart { display: flex; align-items: flex-end; gap: clamp(.5rem, 2vw, 1.4rem); height: 250px; padding: 1rem 1.4rem 1.2rem; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.chart-val { font-size: .75rem; font-weight: 800; color: var(--muted); min-height: 1.2rem; }
.chart-bar { flex: 1; width: 100%; max-width: 54px; display: flex; flex-direction: column; justify-content: flex-end; background: #f1f4f2; border-radius: 12px; overflow: hidden; }
.chart-bar span { display: block; width: 100%; transition: height .6s ease; }
.seg-centre { background: var(--brand); }
.seg-online { background: var(--accent); }
.chart-label { font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: .5rem; }
.chart-col.is-current .chart-label { color: var(--brand); font-weight: 900; }
.chart-col.is-current .chart-bar { box-shadow: 0 0 0 2px var(--brand-line); }
.chart-legend { display: flex; gap: .9rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: .35rem; vertical-align: middle; }
.lg-centre::before { background: var(--brand); } .lg-online::before { background: var(--accent); }

/* To-do */
.todo-card { display: flex; flex-direction: column; background: linear-gradient(180deg, #fffdf6, #fff 40%); }
.todo-add { display: flex; gap: .5rem; padding: 0 1.1rem .8rem; }
.todo-add .btn { flex-shrink: 0; width: 46px; padding: 0; }
.todo-list { list-style: none; margin: 0; padding: 0 .6rem .6rem; max-height: 260px; overflow-y: auto; }
.todo-list li { display: flex; align-items: center; gap: .7rem; padding: .6rem .6rem; border-radius: 12px; font-weight: 700; }
.todo-list li:hover { background: var(--brand-softer); }
.todo-list .form-check-input { margin: 0; flex-shrink: 0; width: 1.25em; height: 1.25em; border-radius: 50% !important; cursor: pointer; }
.todo-text { flex: 1; min-width: 0; word-break: break-word; }
.todo-list li.is-done .todo-text { text-decoration: line-through; color: #a0aaa8; font-weight: 600; }
.todo-del { border: 0; background: none; color: #b5bdbb; padding: .2rem .35rem; border-radius: 8px; opacity: 0; transition: .15s; }
.todo-list li:hover .todo-del { opacity: 1; }
.todo-del:hover { color: #d0482b; background: #fdecea; }
@media (hover: none) { .todo-del { opacity: 1; } }
.todo-empty { text-align: center; color: var(--muted); font-weight: 600; padding: 1.5rem 1rem 2rem; font-size: .9rem; }

.setup-step { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 12px; color: var(--ink-2); font-weight: 700; border: 1px solid var(--line); margin-bottom: .45rem; }
a.setup-step:hover { border-color: var(--brand); color: var(--brand); }
.setup-step > i:first-child { font-size: 1.15rem; color: #b5bdbb; }
.setup-step.is-done { background: var(--brand-softer); color: var(--muted); text-decoration: line-through; }
.setup-step.is-done > i:first-child { color: var(--brand); }

.month-nav { display: inline-flex; align-items: center; gap: .3rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .2rem; }
.month-nav span { min-width: 104px; text-align: center; font-weight: 800; font-size: .88rem; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .92rem; font-weight: 700; margin-bottom: 1rem; }
.back-link:hover { color: var(--brand); }
.back-link.light { color: rgba(255, 255, 255, .85); }

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; height: 100%; box-shadow: var(--shadow); }
.stat-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; margin-bottom: .8rem; background: var(--brand); color: #fff; }
.stat-label { color: var(--muted); font-size: .86rem; font-weight: 700; }
.stat-value { font-weight: 900; font-size: 1.5rem; }

.table-soft { --bs-table-bg: transparent; }
.table-soft th { font-size: .8rem; color: var(--muted); font-weight: 800; background: #f6f8f7; border-bottom: 1px solid var(--line); padding: .8rem 1rem; white-space: nowrap; }
.table-soft td { padding: .85rem 1rem; border-color: var(--line); font-weight: 600; }
.table-soft tbody tr:hover { background: var(--brand-softer); }
.row-link { cursor: pointer; }
.list-soft { list-style: none; margin: 0; padding: 0 .55rem .55rem; }
.list-soft li { display: flex; align-items: center; gap: .75rem; padding: .7rem .75rem; border-radius: 14px; }
.list-soft li:hover { background: var(--brand-softer); }

.course-card, .group-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; color: var(--ink); transition: .2s; height: 100%; box-shadow: var(--shadow); }
.course-card:hover, .group-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); border-color: transparent; }
.course-card h3 { font-size: 1.05rem; }
.course-cover { aspect-ratio: 16/9; background: var(--brand-soft) center/cover no-repeat; position: relative; }
.price-tag { position: absolute; top: 12px; right: 12px; background: #fff; color: var(--ink); font-weight: 900; font-size: .85rem; padding: .3rem .8rem; border-radius: 99px; box-shadow: var(--shadow); }
.price-tag.free { background: var(--brand); color: #fff; }
.draft-tag { position: absolute; top: 12px; left: 12px; background: rgba(15, 29, 27, .78); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .6rem; border-radius: 99px; }
.group-card { padding: 1.3rem; }
.group-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(135deg, #d5862c, #f0b968); color: #fff; font-size: 1.25rem; }

.course-hero { display: flex; flex-wrap: wrap; overflow: hidden; }
.course-hero-cover { width: 320px; max-width: 100%; min-height: 190px; background: var(--brand-soft) center/cover; flex-shrink: 0; }
@media (max-width: 767px) { .course-hero-cover { width: 100%; } }
.lesson-admin { list-style: none; margin: 0; padding: 0 .75rem .75rem; }
.lesson-admin li { display: flex; align-items: center; gap: .85rem; padding: .7rem; border-radius: 16px; border: 1px solid transparent; }
.lesson-admin li:hover { background: var(--brand-softer); border-color: var(--line); }
.lesson-num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: .82rem; flex-shrink: 0; }
.lesson-thumb { width: 100px; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; background: var(--brand-soft); flex-shrink: 0; }
@media (max-width: 575px) { .lesson-admin .lesson-thumb { display: none; } .lesson-admin li { flex-wrap: wrap; } }
.check-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: .5rem; cursor: pointer; font-weight: 700; }
.check-row:has(input:checked) { border-color: var(--brand); background: var(--brand-softer); }
.check-row .form-check-input { margin: 0; flex-shrink: 0; }
.yt-preview img { width: 100%; border-radius: 14px; aspect-ratio: 16/9; object-fit: cover; }

.pay-btn { border: 1.5px dashed #cdd5d2; background: #fff; color: var(--muted); border-radius: 99px; padding: .35rem .95rem; font-size: .84rem; font-weight: 800; white-space: nowrap; transition: .15s; }
.pay-btn:hover { border-color: var(--brand); color: var(--brand); }
.pay-btn.is-paid { border: 1.5px solid transparent; background: #e3f4e9; color: var(--ok); }
.pills-soft { gap: .3rem; }
.pills-soft .nav-link { color: var(--ink-2); font-weight: 800; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.pills-soft .nav-link.active { background: var(--brand); border-color: var(--brand); }

.photo-pick { position: relative; cursor: pointer; }
.photo-pick-btn { position: absolute; bottom: 0; left: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; border: 3px solid #fff; font-size: .8rem; }
.swatch { position: relative; }
.swatch input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); transition: .15s; color: #fff; font-size: .8rem; }
.swatch input:checked + span { box-shadow: 0 0 0 2.5px var(--c); transform: scale(1.1); }
.swatch-custom input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.onboard { min-height: 100vh; background: radial-gradient(900px 400px at 100% 0, var(--brand-soft), transparent 70%), var(--bg); }

/* اشتراك سنتر */
.sub-status { display: flex; align-items: center; gap: 1rem; }
.sub-status-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; flex-shrink: 0; }
.sub-status.is-active .sub-status-icon { background: #e3f4e9; color: var(--ok); }
.sub-status.is-pending .sub-status-icon { background: var(--accent-soft); color: var(--warn); }
.sub-status.is-off .sub-status-icon { background: var(--brand); color: #fff; }
.plan-card { position: relative; overflow: hidden; text-align: center; color: #fff; border-radius: 22px; padding: 2rem 1rem 1.6rem;
    background: linear-gradient(135deg, var(--brand-deep), var(--brand) 70%, color-mix(in srgb, var(--brand) 70%, #7fd1c3)); }
.plan-ribbon { position: absolute; top: 14px; right: -34px; transform: rotate(35deg); background: var(--accent); padding: .2rem 2.6rem; font-size: .78rem; font-weight: 900; }
.plan-price { font-size: 3.4rem; font-weight: 900; line-height: 1.1; }
.plan-price small { font-size: 1.1rem; font-weight: 700; opacity: .85; }
.plan-sub { font-weight: 800; font-size: 1.1rem; }
.plan-opt { display: flex; flex-direction: column; align-items: center; padding: .9rem .5rem; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; font-weight: 700; background: #fff; transition: .15s; }
.plan-opt b { font-size: 1.4rem; line-height: 1.2; }
.plan-opt small { color: var(--muted); font-weight: 700; }
.btn-check:checked + .plan-opt { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-soft); }
.file-drop { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border: 2px dashed #cdd5d2; border-radius: 16px; cursor: pointer; font-weight: 700; color: var(--ink-2); background: #fafbfa; transition: .15s; width: 100%; }
.file-drop:hover, .file-drop.has-file { border-color: var(--brand); background: var(--brand-softer); color: var(--brand-dark); }
.file-drop > i { font-size: 1.5rem; color: var(--brand); }
.file-drop input { display: none; }

/* =========================================================
   TEACHER PLATFORM
   ========================================================= */
.teacher-hero, .course-head { color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--brand-deep), var(--brand) 65%, color-mix(in srgb, var(--brand) 70%, #7fd1c3)); }
.teacher-hero h1, .course-head h1 { color: #fff; font-weight: 900; }
.teacher-hero::before, .course-head::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px); background-size: 20px 20px; }
.teacher-hero .container, .course-head .container { position: relative; }
.teacher-hero p, .course-head p { font-weight: 600; }
.teacher-hero .avatar-letter { background: rgba(255, 255, 255, .2); color: #fff; }
.social-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: #fff; transition: .15s; }
.social-btn:hover { background: #fff; color: var(--brand); }
.hero-stats { display: flex; gap: .5rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); border-radius: 20px; padding: 1rem; backdrop-filter: blur(6px); justify-content: center; }
.hero-stats div { text-align: center; min-width: 76px; }
.hero-stats b { display: block; font-size: 1.8rem; font-weight: 900; }
.hero-stats small { opacity: .85; font-weight: 700; }
.course-head-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-lg); border: 4px solid rgba(255, 255, 255, .25); }
.join-strip { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 1.3rem 1.6rem; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-right: 5px solid var(--brand); }
.register-card { border-top: 5px solid var(--brand); }
.continue-card { display: flex; gap: .9rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: .8rem; color: var(--ink); box-shadow: var(--shadow); transition: .2s; }
.continue-card:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
.continue-card img { width: 92px; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; }

.lesson-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.3rem; border-top: 1px solid var(--line); color: var(--ink); transition: .15s; font-weight: 700; }
a.lesson-row:hover { background: var(--brand-softer); color: var(--ink); }
.lesson-row.is-locked { opacity: .6; }
.lesson-state { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .95rem; }
.lesson-state.state-done, .state-done .lesson-state { background: var(--brand); color: #fff; }
.lesson-state.state-open, .state-open .lesson-state { background: var(--brand-soft); color: var(--brand); }
.lesson-state.state-locked, .state-locked .lesson-state { background: #eef1ef; color: #9aa5a3; }
.pay-method { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 16px; margin-bottom: .5rem; background: #fff; }
.pay-method > i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.1rem; flex-shrink: 0; }
.pay-method small { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; }
.pay-method b { display: block; text-align: right; font-size: 1.05rem; letter-spacing: .02em; }

.player { overflow: hidden; background: #000; }
.lessons-side { overflow: hidden; max-height: calc(100vh - 120px); overflow-y: auto; }
@media (min-width: 992px) { .lessons-side { position: sticky; top: 90px; } }
.lesson-item { display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; color: var(--ink); border-bottom: 1px solid var(--line); font-size: .93rem; font-weight: 700; }
a.lesson-item:hover { background: var(--brand-softer); color: var(--ink); }
.lesson-item.current { background: var(--brand-soft); font-weight: 800; box-shadow: inset -4px 0 0 var(--brand); }
.lesson-item.state-locked { color: var(--muted); }
.lesson-item .lesson-state { width: 28px; height: 28px; font-size: .8rem; }
