/* الخط: IBM Plex Sans Arabic (ملفات محلية في wwwroot/fonts) */
@font-face { font-family: "Plex Lat"; font-weight: 400; font-display: swap; src: url("../fonts/plex-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Plex Lat"; font-weight: 600; font-display: swap; src: url("../fonts/plex-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Plex Lat"; font-weight: 700; font-display: swap; src: url("../fonts/plex-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Plex Ar"; font-weight: 400; font-display: swap; src: url("../fonts/plex-arabic-400.woff2") format("woff2"); }
@font-face { font-family: "Plex Ar"; font-weight: 600; font-display: swap; src: url("../fonts/plex-arabic-600.woff2") format("woff2"); }
@font-face { font-family: "Plex Ar"; font-weight: 700; font-display: swap; src: url("../fonts/plex-arabic-700.woff2") format("woff2"); }

:root {
    --s-primary: #1d4ed8;
    --s-primary-dark: #1e40af;
    --s-primary-soft: #e8eefc;
    --s-bg: #f4f6fb;
    --s-ink: #0f172a;
    --s-muted: #64748b;
    --s-border: #e5e9f2;
    --s-radius: 14px;
    --bs-body-font-family: "Plex Lat", "Plex Ar", "Segoe UI", Tahoma, sans-serif;
    --bs-body-color: var(--s-ink);
    --bs-primary: var(--s-primary);
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: var(--s-primary);
    --bs-link-hover-color: var(--s-primary-dark);
    --bs-border-color: var(--s-border);
}

html { font-size: 15px; }
@media (min-width: 992px) { html { font-size: 16px; } }
body { background: var(--s-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .h1, .h2, .h3, .h4, .h5 { font-weight: 700; letter-spacing: 0; }
.min-w-0 { min-width: 0; }

.btn { border-radius: 10px; font-weight: 600; padding: .55rem 1.1rem; }
.btn-sm { padding: .35rem .8rem; border-radius: 8px; }
.btn-primary {
    --bs-btn-bg: var(--s-primary); --bs-btn-border-color: var(--s-primary);
    --bs-btn-hover-bg: var(--s-primary-dark); --bs-btn-hover-border-color: var(--s-primary-dark);
    --bs-btn-active-bg: var(--s-primary-dark); --bs-btn-disabled-bg: var(--s-primary);
}
.form-control, .form-select { border-radius: 10px; padding: .6rem .85rem; border-color: #d7dcea; font-size: 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--s-primary); box-shadow: 0 0 0 .2rem rgba(29, 78, 216, .15); }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.card { border: 1px solid var(--s-border); border-radius: var(--s-radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important; }
.alert { border-radius: 12px; border: 0; }
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .8rem .9rem; }
.table thead th { font-size: .82rem; color: var(--s-muted); font-weight: 600; background: #f8fafd; }
.table-responsive.card { overflow: auto; }
.badge { font-weight: 600; padding: .4em .7em; border-radius: 999px; }
.list-group { border-radius: var(--s-radius); }
input[dir="ltr"] { text-align: left; }
:focus-visible { outline: 2px solid var(--s-primary); outline-offset: 2px; }

/* العلامة */
.brand-mark {
    display: inline-grid; place-items: center; flex: none;
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1e3a8a); color: #fff; font-weight: 700; font-size: 1.25rem;
}
.brand-mark.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 1rem; }
.brand-name { font-weight: 700; font-size: 1.15rem; color: var(--s-ink); line-height: 1.2; }
.brand-center { color: var(--s-muted); font-size: .85rem; }

/* واجهة التطبيق */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { background: #fff; border-inline-end: 1px solid var(--s-border); display: flex; flex-direction: column; }
@media (min-width: 992px) {
    .sidebar { width: 264px; flex: none; position: sticky; top: 0; height: 100vh; }
}
@media (max-width: 991.98px) { .sidebar { width: 280px !important; } }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.1rem; border-bottom: 1px solid var(--s-border); }
.sidebar-nav { padding: .9rem .7rem; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-label { font-size: .75rem; color: var(--s-muted); padding: 1rem .8rem .35rem; font-weight: 600; }
.side-link {
    display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 10px;
    color: #334155; text-decoration: none; font-weight: 500; text-align: start;
}
.side-link i { font-size: 1.1rem; color: #94a3b8; }
.side-link:hover { background: #f1f4fa; color: var(--s-ink); }
.side-link.active { background: var(--s-primary-soft); color: var(--s-primary); font-weight: 600; }
.side-link.active i { color: var(--s-primary); }
.sidebar-foot { border-top: 1px solid var(--s-border); padding: .7rem; }
.side-user { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 10px; color: var(--s-ink); text-decoration: none; }
.side-user i { font-size: 1.6rem; color: #94a3b8; }
.side-user:hover, .side-user.active { background: #f1f4fa; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--s-border); }
.app-content { padding: 1.5rem 1rem 3rem; width: 100%; max-width: 1200px; margin-inline: auto; }
@media (min-width: 992px) { .app-content { padding: 2rem 2.25rem 3rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-sub { color: var(--s-muted); margin: .25rem 0 0; }

/* لوحة المدرس */
.stat-card { display: block; padding: 1.1rem 1.2rem; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.stat-card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; margin-bottom: .8rem; }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--s-muted); font-size: .9rem; margin-top: .35rem; }
.tone-blue { background: #e8eefc; color: #1d4ed8; }
.tone-green { background: #e6f6ee; color: #15803d; }
.tone-amber { background: #fdf3e2; color: #b45309; }
.tone-violet { background: #efeafd; color: #6d28d9; }
.tone-slate { background: #eef1f6; color: #475569; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li a { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; text-decoration: none; color: var(--s-ink); border-top: 1px solid var(--s-border); }
.steps li:first-child a { border-top: 0; }
.steps li a:hover { background: #f8fafd; }
.steps .bi-check-circle-fill { color: #16a34a; font-size: 1.2rem; }
.steps .bi-circle { color: #cbd5e1; font-size: 1.2rem; }
.steps .done span { color: var(--s-muted); text-decoration: line-through; }

/* الصفحات العامة */
.public-header { background: #fff; border-bottom: 1px solid var(--s-border); padding: .8rem 0; }
.public-content { min-height: calc(100vh - 140px); }
.public-footer { padding: 1.5rem 0; }
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.2; margin-bottom: 1rem; }
.hero h1 span { color: var(--s-primary); }
.hero .lead { color: #475569; font-size: 1.15rem; max-width: 34rem; }
.hero-panel { background: #fff; border: 1px solid var(--s-border); border-radius: 20px; padding: 1.25rem; box-shadow: 0 20px 50px rgba(30, 58, 138, .12); }
.feature { padding: 1.3rem; height: 100%; }
.feature .stat-icon { margin-bottom: .9rem; }
.feature h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.feature p { color: var(--s-muted); margin: 0; font-size: .95rem; }
.soon { font-size: .72rem; background: #fdf3e2; color: #b45309; border-radius: 999px; padding: .15rem .55rem; font-weight: 600; margin-inline-start: .4rem; vertical-align: middle; }
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2rem 1.6rem; }
.auth-card h1 { font-size: 1.45rem; margin-bottom: .3rem; }
.auth-card .sub { color: var(--s-muted); margin-bottom: 1.5rem; }
.status-wrap { text-align: center; padding: 4rem 1rem; }
.status-code { font-size: 4rem; font-weight: 700; color: var(--s-primary); line-height: 1; }

/* الجدول الأسبوعي */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 991.98px) { .week-grid { grid-template-columns: minmax(0, 1fr); } }
.week-day { background: #fff; border: 1px solid var(--s-border); border-radius: var(--s-radius); padding: .6rem; min-height: 120px; }
.week-day.today { border-color: var(--s-primary); box-shadow: 0 0 0 2px var(--s-primary-soft); }
.week-day header { display: flex; align-items: center; gap: .4rem; padding-bottom: .5rem; border-bottom: 1px solid var(--s-border); margin-bottom: .5rem; }
.session-card { display: block; padding: .55rem .6rem; border-radius: 10px; background: var(--s-primary-soft); color: var(--s-ink); text-decoration: none; margin-bottom: .45rem; border-inline-start: 3px solid var(--s-primary); }
.session-card:hover { background: #dbe5fb; }
.session-card.cancelled { background: #f1f3f7; border-inline-start-color: #94a3b8; color: var(--s-muted); text-decoration: line-through; }
.steps li a { gap: .75rem; }

/* كشف الحصة */
.sheet-label { font-size: .75rem; color: var(--s-muted); margin-bottom: .2rem; }
.avatar-sm { width: 38px; height: 38px; border-radius: 50%; background: var(--s-primary-soft); color: var(--s-primary); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.sheet-save { position: sticky; bottom: 0; padding: .75rem 0; background: linear-gradient(transparent, var(--s-bg, #f4f6fb) 35%); z-index: 5; }
.sheet-row .btn-group .btn { flex: 1 1 auto; }

/* إشارة المرور (التقييم الشامل) */
.light { width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(0,0,0,.04); }
.light-green { background: #16a34a; box-shadow: 0 0 0 5px #dcfce7; }
.light-yellow { background: #eab308; box-shadow: 0 0 0 5px #fef9c3; }
.light-red { background: #dc2626; box-shadow: 0 0 0 5px #fee2e2; }
.light-none { background: #cbd5e1; }
.eval-card { border-inline-start: 5px solid #cbd5e1; }
.eval-card.light-green-b { border-inline-start-color: #16a34a; }
.eval-card.light-yellow-b { border-inline-start-color: #eab308; }
.eval-card.light-red-b { border-inline-start-color: #dc2626; }
.eval-level { font-size: 1.35rem; font-weight: 700; }
.eval-trend-up { color: #15803d; font-weight: 600; }
.eval-trend-down { color: #b91c1c; font-weight: 600; }

/* الرسايل */
.chat { display: flex; flex-direction: column; gap: .5rem; max-height: 65vh; overflow-y: auto; background: #f8fafd; }
.bubble-row { display: flex; justify-content: flex-start; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: 78%; padding: .55rem .8rem; border-radius: 16px; background: #fff; border: 1px solid var(--s-border, #e5e9f2); }
.bubble.mine { background: var(--s-primary); color: #fff; border-color: var(--s-primary); }
.bubble-staff:not(.mine) { border-color: #c7d6fb; background: #eef3ff; }
.bubble-parent:not(.mine) { border-color: #e9d5ff; background: #faf5ff; }
.bubble-who { font-size: .75rem; font-weight: 600; opacity: .8; margin-bottom: .15rem; }
.bubble-body { white-space: pre-line; overflow-wrap: anywhere; }
.bubble-time { font-size: .7rem; opacity: .7; margin-top: .2rem; text-align: end; }

/* الامتحان الأونلاين */
.quiz-wrap { max-width: 720px; margin: 0 auto; }
.quiz-progress { height: 10px; border-radius: 99px; background: #e5e9f2; overflow: hidden; }
.quiz-progress > div { height: 100%; background: linear-gradient(90deg, var(--s-primary), #7c3aed); transition: width .4s ease; }
.quiz-card { animation: quizIn .35s ease both; }
@keyframes quizIn { from { opacity: 0; transform: translateX(-24px) scale(.98); } to { opacity: 1; transform: none; } }
.quiz-opt { display: block; width: 100%; text-align: start; padding: .9rem 1rem; border-radius: 14px; border: 2px solid var(--s-border, #e5e9f2); background: #fff; font-size: 1.05rem; margin-bottom: .6rem; transition: transform .12s, border-color .12s, background .12s; }
.quiz-opt:hover { border-color: var(--s-primary); }
.quiz-opt.picked { border-color: var(--s-primary); background: var(--s-primary-soft); transform: scale(1.02); font-weight: 600; }
.quiz-timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.quiz-timer.low { color: #dc2626; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.score-ring { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: conic-gradient(var(--ring, #16a34a) calc(var(--p) * 1%), #e5e9f2 0); animation: ringIn 1s ease both; }
.score-ring > div { width: 132px; height: 132px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
@keyframes ringIn { from { transform: scale(.6) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: fixed; top: -20px; font-size: 1.6rem; animation: fall linear forwards; pointer-events: none; z-index: 2000; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .6; } }

/* السبورة */
.board-wrap { background: #fff; border: 1px solid var(--s-border, #e5e9f2); border-radius: 16px; padding: .5rem; }
.board-wrap:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 1rem; }
.board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .25rem .25rem .5rem; }
.tool-color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; }
.tool-color.on { box-shadow: 0 0 0 3px var(--s-primary); }
.tool-width { width: 34px; height: 34px; border-radius: 10px; border: 1px solid #e5e9f2; background: #fff; display: grid; place-items: center; }
.tool-width span { background: #0f172a; border-radius: 50%; display: block; }
.tool-width.on { border-color: var(--s-primary); background: var(--s-primary-soft); }
.tool-sep { width: 1px; height: 24px; background: #e5e9f2; margin: 0 .2rem; }
.board-paper { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #fff;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px); background-size: 24px 24px; box-shadow: inset 0 0 0 1px #e5e9f2; }
.board-wrap:fullscreen .board-paper { max-height: calc(100vh - 80px); width: auto; margin: 0 auto; height: calc(100vh - 80px); }
.board-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.board-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.answer-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px #e5e9f2; }
.answer-thumb canvas, .answer-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* ============================================================
   سنتري — الهوية البريميوم (بنفسجي نيلي + ذهبي)
   ============================================================ */
:root {
    --s-primary: #4f46e5;
    --s-primary-dark: #3730a3;
    --s-primary-soft: #eef0ff;
    --s-gold: #f59e0b;
    --s-bg: #f6f7fb;
    --s-ink: #0b1220;
    --s-muted: #667085;
    --s-border: #e7e9f2;
    --s-radius: 18px;
    --s-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
    --s-shadow-lg: 0 2px 6px rgba(16, 24, 40, .06), 0 24px 48px rgba(55, 48, 163, .12);
    --bs-primary-rgb: 79, 70, 229;
}
body { background: radial-gradient(1200px 600px at 100% -10%, #eef0ff 0, transparent 60%), var(--s-bg); background-attachment: fixed; }
::selection { background: #c7c4ff; }

/* العلامة */
img.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: block; box-shadow: 0 6px 16px rgba(79, 70, 229, .35); background: none; }
img.brand-mark.sm { width: 34px; height: 34px; border-radius: 10px; }

/* الأزرار */
.btn { border-radius: 12px; transition: transform .12s ease, box-shadow .15s ease, background .15s; }
.btn-primary {
    --bs-btn-bg: var(--s-primary); --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: var(--s-primary-dark); --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: var(--s-primary-dark);
    background-image: linear-gradient(135deg, #6366f1, #4338ca); box-shadow: 0 6px 16px rgba(79, 70, 229, .28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(79, 70, 229, .32); }
.btn-outline-primary { --bs-btn-color: var(--s-primary); --bs-btn-border-color: #c9c6fb; --bs-btn-hover-bg: var(--s-primary); --bs-btn-hover-border-color: var(--s-primary); }
.btn-light { background: #fff; border-color: var(--s-border); }
.form-control, .form-select { border-radius: 12px; border-color: #dfe2ee; background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: #8b85ff; box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .14); }

/* الكروت */
.card { border-color: var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow); }
.list-group { box-shadow: var(--s-shadow); }
.list-group-item { border-color: var(--s-border); }
.list-group-item-action:hover { background: #fafaff; }
.stat-card:hover, a.card:hover { box-shadow: var(--s-shadow-lg); transform: translateY(-2px); }
.stat-icon { border-radius: 14px; }
.tone-blue { background: linear-gradient(135deg, #eef0ff, #e0e7ff); color: #4338ca; }
.tone-violet { background: linear-gradient(135deg, #f3e8ff, #ede9fe); color: #7c3aed; }
.tone-green { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #047857; }
.tone-amber { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #b45309; }

/* الشريط الجانبي الغامق */
.sidebar { background: linear-gradient(180deg, #111735 0%, #1e1b4b 100%); border: 0; color: #c7cbe0; }
.sidebar-brand { border-color: rgba(255, 255, 255, .08); }
.sidebar .brand-name { color: #fff; }
.sidebar .brand-center { color: #9aa0c3; }
.side-label { color: #7d84ad; letter-spacing: .02em; }
.side-link { color: #c7cbe0; border-radius: 12px; }
.side-link i { color: #8b91b8; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .4); }
.side-link.active i { color: #fff; }
.sidebar-foot { border-color: rgba(255, 255, 255, .08); }
.side-user { color: #e5e7f5; }
.side-user:hover, .side-user.active { background: rgba(255, 255, 255, .06); }
.sidebar .btn-outline-secondary { --bs-btn-color: #c7cbe0; --bs-btn-border-color: rgba(255, 255, 255, .18); --bs-btn-hover-bg: rgba(255, 255, 255, .08); --bs-btn-hover-color: #fff; }

/* الهيدر والمحتوى */
.topbar, .public-header { background: rgba(255, 255, 255, .78); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-color: rgba(231, 233, 242, .8); }
.public-header { position: sticky; top: 0; z-index: 1020; }
.page-head h1 { font-size: 1.65rem; letter-spacing: -.01em; }
.app-content { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger { background: #fef2f2; color: #991b1b; }
.alert-warning { background: #fffbeb; color: #92400e; }

/* الصفحة الرئيسية العامة */
.hero h1 span { background: linear-gradient(135deg, #6366f1, #7c3aed 60%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-panel { border-radius: 24px; box-shadow: var(--s-shadow-lg); }
.status-code { background: linear-gradient(135deg, #6366f1, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* شارة «نجم» ذهبية */
.gold-badge { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #78350f; border-radius: 999px; padding: .2rem .65rem; font-weight: 700; font-size: .8rem; }

/* مجموعة جديدة في دقيقة */
.quick-step { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; margin-bottom: .9rem; }
.quick-step span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .9rem; background: linear-gradient(135deg, #6366f1, #4338ca); }
.chip-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-block; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--s-border); background: #fff; cursor: pointer; font-weight: 600; transition: all .12s; user-select: none; }
.chip:hover { border-color: #a5a1fb; }
.btn-check:checked + .chip { background: linear-gradient(135deg, #6366f1, #4f46e5); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(79, 70, 229, .3); }
.share-card { background: linear-gradient(135deg, #1e1b4b, #4338ca); color: #fff; border: 0; }
.share-card .form-control { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.share-card img.qr { width: 150px; height: 150px; border-radius: 14px; background: #fff; padding: 8px; }

/* حائط المجموعة */
.wall-post { border-radius: 18px; }
.wall-post.pinned { border: 1.5px solid #fcd34d; background: linear-gradient(180deg, #fffbeb, #fff 60%); }
.wall-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.15rem; background: linear-gradient(135deg, #6366f1, #3730a3); flex: none; }
.wall-body { white-space: pre-line; font-size: 1.02rem; line-height: 1.75; }
.wall-comments { border-top: 1px solid var(--s-border); padding-top: .6rem; display: grid; gap: .5rem; }
.wall-comment { background: #f6f7fb; border-radius: 12px; padding: .5rem .75rem; }
.wall-auto { border-radius: 16px; transition: transform .12s, box-shadow .12s; }
.wall-auto:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30, 27, 75, .1); }
.wall-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.wall-icon.k2 { background: #fee2e2; color: #dc2626; }
.wall-icon.k3 { background: #eef0ff; color: #4f46e5; }
.wall-icon.k4 { background: #dcfce7; color: #16a34a; }
.wall-side { background: linear-gradient(135deg, #1e1b4b, #4338ca); color: #fff; border: 0; border-radius: 18px; }
.wall-side.wall-soon { background: linear-gradient(135deg, #b45309, #f59e0b); }
.wall-star { border-radius: 18px; border: 1.5px solid #fde68a; background: linear-gradient(180deg, #fffbeb, #fff); }

/* شرح الدروس (صفحات عامة) */
.pub-body { background: #f4f5fb; }
.pub-top { background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--s-border); }
.pub-hero { background: linear-gradient(135deg, #1e1b4b, #4338ca 60%, #6366f1); color: #fff; padding: 48px 0 84px; }
.pub-hero h1 { font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.pub-hero p { opacity: .85; max-width: 640px; margin: 0; }
.pub-up { margin-top: -56px; }
.pub-grade, .pub-subject { border-radius: 18px; border: 0; box-shadow: 0 8px 22px rgba(30, 27, 75, .08); transition: transform .12s, box-shadow .12s; }
.pub-grade:hover, .pub-subject:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(30, 27, 75, .14); }
.pub-sicon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; }
.pub-unit { border-radius: 18px; border: 0; overflow: hidden; box-shadow: 0 8px 22px rgba(30, 27, 75, .07); }
.pub-unit-head { padding: .9rem 1.1rem; font-weight: 800; background: linear-gradient(90deg, #eef0ff, #fff); }
.pub-unit-head span { color: #4f46e5; font-size: .85rem; margin-left: .5rem; }
.pub-lesson { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.1rem; border-top: 1px solid #eef0f6; }
.pub-num { width: 28px; height: 28px; border-radius: 50%; background: #eef0ff; color: #4338ca; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.pub-book { border: 0; border-radius: 22px; color: #fff; background: radial-gradient(500px 200px at 10% 0%, rgba(245,158,11,.45), transparent 60%), linear-gradient(135deg, #1e1b4b, #4338ca); box-shadow: 0 16px 36px rgba(67,56,202,.3); transition: transform .15s; }
.pub-book:hover { transform: translateY(-3px); color: #fff; }
.pub-book-ic { width: 60px; height: 60px; border-radius: 18px; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 1.8rem; flex: none; }

/* التنبيهات */
.notice-row { border-radius: 16px; }
.notice-row.unread { border-inline-start: 4px solid #4f46e5; background: #fbfbff; }
.notice-ic { width: 42px; height: 42px; border-radius: 12px; background: #eef0ff; color: #4f46e5; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.bell-btn { position: relative; }
.bell-btn .badge { position: absolute; top: -4px; inset-inline-end: -6px; font-size: .65rem; }

/* مكتبك النهارده */
.daily-desk { border: 0; border-radius: 22px; color: #fff; background: radial-gradient(500px 220px at 100% 0%, rgba(245,158,11,.35), transparent 60%), linear-gradient(135deg, #1e1b4b, #4338ca); box-shadow: 0 16px 36px rgba(67,56,202,.25); }
.desk-sun { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 1.5rem; }
.desk-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 14px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-weight: 600; }
.desk-item:hover { background: rgba(255,255,255,.18); color: #fff; }
.desk-item .stat-icon { width: 36px; height: 36px; font-size: 1rem; margin: 0; }
.tone-amber { background: #fef3c7; color: #b45309; }
.tone-red { background: #fee2e2; color: #dc2626; }
.bubble-img { display: block; max-width: 240px; max-height: 300px; border-radius: 12px; margin-bottom: .3rem; object-fit: cover; }

/* النهارده للطالب */
.today-card { border: 0; border-radius: 18px; color: #fff; }
.tc-next { background: linear-gradient(135deg, #1e1b4b, #4338ca); }
.tc-todo { background: linear-gradient(135deg, #b45309, #f59e0b); }
.tc-done { background: linear-gradient(135deg, #15803d, #22c55e); }
.tc-level { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.tc-level .progress { background: rgba(255,255,255,.25); }
.mistake-card { border-radius: 16px; border-inline-start: 4px solid #ef4444; }
.tool-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; display: inline-grid; place-items: center; font-size: 1.05rem; }
.tool-btn.on { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.tool-color[data-color="#ffffff"] { box-shadow: inset 0 0 0 1px #cbd5e1; }

/* ================= الصفحة الرئيسية (Landing) ================= */
.lp-hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5.5rem); color: #fff;
    background: radial-gradient(1200px 600px at 85% -10%, #4f46e5 0%, transparent 60%), linear-gradient(160deg, #0f0c3d 0%, #1e1b4b 45%, #312e81 100%); }
.lp-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; }
.lp-glow-a { width: 420px; height: 420px; background: #7c3aed; top: -120px; left: -120px; animation: lpFloat 12s ease-in-out infinite; }
.lp-glow-b { width: 360px; height: 360px; background: #f59e0b; bottom: -160px; right: 20%; opacity: .25; animation: lpFloat 14s ease-in-out infinite reverse; }
@keyframes lpFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, 30px); } }
.lp-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .88rem; font-weight: 600; color: #e0e7ff; }
.lp-title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; line-height: 1.15; margin: 1.1rem 0 1rem; letter-spacing: -.5px; }
.lp-title span { background: linear-gradient(90deg, #fbbf24, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { font-size: clamp(1.02rem, 2vw, 1.2rem); color: #c7d2fe; line-height: 1.9; max-width: 34rem; }
.lp-btn-main { background: #fff; color: #312e81; font-weight: 700; border-radius: 14px; padding: .75rem 1.4rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.lp-btn-main:hover { background: #eef2ff; color: #1e1b4b; transform: translateY(-2px); }
.lp-btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 14px; font-weight: 600; padding: .75rem 1.3rem; }
.lp-btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }
.lp-btn-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1e1b4b; font-weight: 700; border: 0; border-radius: 14px; padding: .75rem 1.3rem; box-shadow: 0 10px 24px rgba(245,158,11,.35); }
.lp-btn-gold:hover { color: #1e1b4b; filter: brightness(1.05); transform: translateY(-2px); }
.lp-btn-main, .lp-btn-gold { transition: transform .2s, background .2s; }
.lp-checks { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.4rem; font-size: .92rem; color: #c7d2fe; }
.lp-checks i { color: #34d399; margin-inline-end: .3rem; }

.lp-stage { position: relative; padding: 1.4rem 0 5.5rem; }
.lp-window { background: #fff; color: #0f172a; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; transform: perspective(1400px) rotateY(8deg) rotateX(2deg); }
.lp-window-bar { display: flex; align-items: center; gap: .35rem; padding: .7rem 1rem; background: #f4f5fb; border-bottom: 1px solid #e7e9f2; font-size: .85rem; }
.lp-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; display: inline-block; }
.lp-window-bar i:nth-child(1) { background: #f87171; } .lp-window-bar i:nth-child(2) { background: #fbbf24; } .lp-window-bar i:nth-child(3) { background: #34d399; }
.lp-window-bar b { margin-inline-start: auto; color: #475569; }
.lp-window-body { padding: 1rem; display: grid; gap: .8rem; }
.lp-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.lp-mini { background: #eef2ff; border-radius: 12px; padding: .6rem; display: grid; gap: .1rem; }
.lp-mini i { color: #4338ca; } .lp-mini b { font-size: 1.25rem; } .lp-mini small { font-size: .7rem; color: #64748b; }
.lp-mini.amber { background: #fffbeb; } .lp-mini.amber i { color: #d97706; }
.lp-mini.red { background: #fef2f2; } .lp-mini.red i { color: #dc2626; }
.lp-mini.violet { background: #f5f3ff; } .lp-mini.violet i { color: #7c3aed; }
.lp-session { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border: 2px solid #f59e0b; border-radius: 14px; padding: .7rem .9rem; }
.lp-session b { display: block; font-size: .92rem; } .lp-session small { color: #64748b; font-size: .78rem; }
.lp-session span { background: #4338ca; color: #fff; border-radius: 10px; padding: .4rem .8rem; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.lp-board { border: 1px solid #e7e9f2; border-radius: 14px; padding: .5rem .8rem; background: #fff; }
.lp-board svg { width: 100%; height: 90px; } .lp-board small { color: #dc2626; font-size: .75rem; }
.lp-phone { position: absolute; bottom: 0; left: -14px; width: 210px; background: #0f172a; border-radius: 30px; padding: 1.6rem .55rem .8rem; box-shadow: 0 25px 60px rgba(0,0,0,.5); border: 4px solid #1e293b; display: grid; gap: .45rem; animation: lpBob 6s ease-in-out infinite; }
@keyframes lpBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.lp-phone-notch { position: absolute; top: .55rem; left: 50%; transform: translateX(-50%); width: 60px; height: 6px; border-radius: 6px; background: #334155; }
.lp-note { display: flex; gap: .5rem; align-items: center; background: rgba(255,255,255,.95); color: #0f172a; border-radius: 14px; padding: .5rem .6rem; }
.lp-note i { color: #4338ca; font-size: 1.1rem; } .lp-note b { display: block; font-size: .76rem; } .lp-note small { font-size: .66rem; color: #64748b; }
.lp-tag { position: absolute; top: 0; inset-inline-end: 0; font-size: .72rem; color: #a5b4fc; }

.lp-section { padding: clamp(3rem, 7vw, 5rem) 0; }
.lp-soft { background: linear-gradient(180deg, #f6f7ff, #fff); }
.lp-head { text-align: center; margin-bottom: 2.4rem; }
.lp-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; margin-top: .4rem; }
.lp-kicker { display: inline-block; white-space: nowrap; font-weight: 700; font-size: .85rem; color: #4338ca; background: #eef2ff; padding: .3rem .8rem; border-radius: 999px; }
.lp-kicker.light { background: rgba(255,255,255,.15); color: #fde68a; }
.lp-role, .lp-feat, .lp-start { height: 100%; background: #fff; border: 1px solid #e7e9f2; border-radius: 22px; padding: 1.6rem; transition: transform .25s, box-shadow .25s, border-color .25s; }
.lp-role:hover, .lp-feat:hover, .lp-start:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(30,27,75,.12); border-color: #c7d2fe; }
.lp-role h3, .lp-feat h3, .lp-start h3 { font-size: 1.15rem; font-weight: 700; margin: .9rem 0 .4rem; }
.lp-role p, .lp-feat p, .lp-start p { color: #64748b; margin: 0; line-height: 1.85; }
.lp-role-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 12px 26px rgba(79,70,229,.35); }
.lp-role-ic.green { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 12px 26px rgba(16,185,129,.3); }
.lp-role-ic.amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 12px 26px rgba(245,158,11,.3); }
.lp-feat-ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.4rem; }
.lp-feat-ic.blue { background: #eef2ff; color: #4338ca; } .lp-feat-ic.violet { background: #f5f3ff; color: #7c3aed; }
.lp-feat-ic.green { background: #ecfdf5; color: #059669; } .lp-feat-ic.red { background: #fef2f2; color: #dc2626; } .lp-feat-ic.amber { background: #fffbeb; color: #d97706; }
.lp-start { text-align: center; } .lp-start > i { font-size: 2.2rem; color: #4338ca; }
.lp-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; position: relative; }
.lp-flow::before { content: ""; position: absolute; top: 34px; inset-inline: 12%; height: 3px; background: linear-gradient(90deg, #c7d2fe, #fde68a, #a7f3d0); z-index: 0; }
.lp-step { position: relative; z-index: 1; text-align: center; padding: 0 .6rem; }
.lp-step h3 { font-size: 1.15rem; font-weight: 700; margin: 1rem 0 .4rem; } .lp-step p { color: #64748b; line-height: 1.85; margin: 0; }
.lp-num { width: 68px; height: 68px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #312e81, #4f46e5); border: 6px solid #fff; box-shadow: 0 10px 26px rgba(49,46,129,.3); }
.lp-free { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1.8rem, 4vw, 2.8rem); border-radius: 28px; color: #fff;
    background: radial-gradient(600px 300px at 10% 120%, rgba(245,158,11,.35), transparent 60%), linear-gradient(135deg, #1e1b4b, #4338ca); box-shadow: 0 25px 60px rgba(30,27,75,.25); }
.lp-free h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin: .6rem 0 .3rem; } .lp-free p { color: #c7d2fe; margin: 0; max-width: 34rem; }
.lp-faq details { background: #fff; border: 1px solid #e7e9f2; border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: .7rem; transition: box-shadow .2s; }
.lp-faq details[open] { box-shadow: 0 12px 30px rgba(30,27,75,.08); border-color: #c7d2fe; }
.lp-faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: #4338ca; font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq p { color: #64748b; margin: .7rem 0 0; line-height: 1.9; }
.lp-final { text-align: center; padding: clamp(2.2rem, 5vw, 3.5rem) 1.5rem; border-radius: 30px; color: #fff; background: linear-gradient(160deg, #0f0c3d, #312e81); box-shadow: 0 25px 60px rgba(30,27,75,.3); }
.lp-final img { width: 64px; height: 64px; border-radius: 18px; background: #fff; padding: 6px; }
.lp-final h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; margin: 1rem 0 .4rem; } .lp-final p { color: #c7d2fe; margin-bottom: 1.4rem; }
.lp-anim .lp-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0s); }
.lp-anim .lp-reveal.in { opacity: 1; transform: none; }
.public-content:has(.lp-hero) { padding: 0; }
@media (max-width: 991.98px) { .lp-window { transform: none; } .lp-stage { padding-bottom: 1rem; } .lp-phone { position: relative; left: auto; bottom: auto; margin: 1rem auto 0; } }
@media (max-width: 767.98px) { .lp-flow { grid-template-columns: 1fr; } .lp-flow::before { display: none; } .lp-mini-grid { grid-template-columns: repeat(2, 1fr); } }
.quick-img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 12px; background: #f4f5fb; }
.quick-panel { position: sticky; top: 80px; }
.need-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .7rem .9rem; border: 1px solid var(--s-border); border-radius: 14px; background: #fff; }
.need-row .chip { font-size: .78rem; border-radius: 999px; padding: .15rem .6rem; }
.need-row .chip.red { background: #fef2f2; color: #b91c1c; } .need-row .chip.amber { background: #fffbeb; color: #b45309; } .need-row .chip.violet { background: #f5f3ff; color: #6d28d9; }
.saved-chip { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.18); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; }
.lp-pains { background: linear-gradient(180deg, #fff, #f6f7ff); }
.lp-sub { color: #64748b; max-width: 40rem; margin: .6rem auto 0; line-height: 1.9; }
.lp-pain { height: 100%; background: #fff; border: 1px solid #e7e9f2; border-radius: 22px; padding: 1.4rem; transition: transform .25s, box-shadow .25s; }
.lp-pain:hover { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(30,27,75,.1); }
.lp-pain-top { display: flex; gap: .9rem; align-items: center; padding-bottom: .9rem; margin-bottom: .9rem; border-bottom: 1px dashed #e2e8f0; }
.lp-pain-num { flex: none; min-width: 74px; height: 64px; padding: 0 .5rem; border-radius: 18px; display: grid; place-items: center; font-size: 1.45rem; font-weight: 700; color: #b91c1c; background: #fef2f2; }
.lp-pain h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .2rem; }
.lp-pain small { color: #94a3b8; font-size: .76rem; }
.lp-pain ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.lp-pain li { color: #334155; font-size: .93rem; line-height: 1.7; display: flex; gap: .45rem; }
.lp-pain li i { color: #10b981; margin-top: .2rem; }
.lp-sources { text-align: center; color: #94a3b8; font-size: .8rem; margin: 1.8rem auto 0; max-width: 52rem; line-height: 1.9; }
.lp-sources a { color: #6366f1; }
.side-more > summary { list-style: none; cursor: pointer; }
.side-more > summary::-webkit-details-marker { display: none; }
.side-more > summary::after { content: "▾"; margin-inline-start: auto; opacity: .6; transition: transform .2s; }
.side-more[open] > summary::after { transform: rotate(180deg); }
.side-more[open] { background: rgba(67,56,202,.04); border-radius: 12px; padding-bottom: .25rem; }
.welcome-card { border: 2px solid #c7d2fe; background: linear-gradient(160deg, #ffffff, #eef2ff); }
.welcome-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.welcome-steps > div { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #e0e7ff; border-radius: 999px; padding: .5rem 1rem .5rem .6rem; font-weight: 600; }
.welcome-steps span { width: 28px; height: 28px; border-radius: 50%; background: #4338ca; color: #fff; display: grid; place-items: center; font-size: .85rem; }
.plan-next { font-size: .8rem; color: #4338ca; }
/* مواعيد المجموعة والأماكن وقت التسجيل */
.group-info { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 16px; padding: .9rem 1rem; display: grid; gap: .25rem; }
.group-pick { display: grid; gap: .5rem; }
.group-option { display: grid; gap: .15rem; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: .7rem .9rem; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.btn-check:checked + .group-option { border-color: #4f46e5; background: #eef2ff; box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.seat.green { color: #15803d; } .seat.amber { color: #b45309; } .seat.red { color: #b91c1c; } .seat.muted { color: #64748b; }

/* ================= الجدول ================= */
.day-strip { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .8rem; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip { flex: 1 0 52px; display: grid; justify-items: center; gap: .05rem; border: 1px solid #e2e8f0; background: #fff; border-radius: 16px; padding: .45rem .3rem; position: relative; }
.day-chip span { font-size: .75rem; color: #64748b; } .day-chip b { font-size: 1.15rem; }
.day-chip i { position: absolute; top: -6px; inset-inline-start: -4px; font-style: normal; font-size: .68rem; background: #4f46e5; color: #fff; border-radius: 999px; min-width: 18px; padding: 0 5px; }
.day-chip.today { border-color: #4f46e5; } .day-chip.active { background: #4f46e5; border-color: #4f46e5; } .day-chip.active span, .day-chip.active b { color: #fff; }
.day-list { display: grid; gap: .7rem; }

.sess { --c: #4f46e5; --cs: #eef2ff; background: #fff; border: 1px solid #e7e9f2; border-inline-start: 5px solid var(--c); border-radius: 18px; padding: .9rem 1rem; box-shadow: 0 4px 14px rgba(15,23,42,.04); }
.sess-time { font-weight: 700; color: var(--c); font-size: .95rem; }
.sess-state { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .2rem .6rem; background: #f1f5f9; color: #475569; white-space: nowrap; }
.sess.now { box-shadow: 0 0 0 2px #f59e0b, 0 8px 24px rgba(245,158,11,.18); } .sess.now .sess-state { background: #fef3c7; color: #b45309; }
.sess.warn .sess-state { background: #fee2e2; color: #b91c1c; } .sess.next .sess-state { background: var(--cs); color: var(--c); }
.sess.muted { opacity: .6; } .sess.muted .fw-bold { text-decoration: line-through; }
.sess-bar, .cal-ev .bar { display: block; height: 6px; border-radius: 6px; background: #eef0f6; overflow: hidden; } .sess-bar i, .cal-ev .bar i { display: block; height: 100%; background: #10b981; border-radius: 6px; }

.cal { grid-template-columns: 64px repeat(7, minmax(0, 1fr)); grid-template-rows: auto calc(var(--hours) * var(--hour)); background: #fff; border: 1px solid #e7e9f2; border-radius: 20px; overflow: hidden; }
.cal-corner { border-bottom: 1px solid #eef0f6; }
.cal-head { display: flex; flex-direction: column; align-items: center; padding: .6rem 0; border-bottom: 1px solid #eef0f6; border-inline-start: 1px solid #f1f3f8; }
.cal-head span { font-size: .8rem; color: #64748b; } .cal-head b { font-size: 1.2rem; }
.cal-head.today b { background: #4f46e5; color: #fff; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; }
.cal-times > div { height: var(--hour); font-size: .72rem; color: #94a3b8; text-align: center; padding-top: 2px; border-top: 1px solid #f1f3f8; }
.cal-col { position: relative; border-inline-start: 1px solid #f1f3f8; background-image: repeating-linear-gradient(to bottom, #f1f3f8 0 1px, transparent 1px var(--hour)); }
.cal-col.today { background-color: #fafbff; }
.cal-now { position: absolute; inset-inline: 0; height: 2px; background: #ef4444; z-index: 3; } .cal-now::before { content: ""; position: absolute; inset-inline-start: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.cal-ev { --c: #4f46e5; --cs: #eef2ff; position: absolute; inset-inline: 4px; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: .35rem .5rem; border-radius: 12px; background: var(--cs); border-inline-start: 4px solid var(--c); color: #0f172a; text-decoration: none; overflow: hidden; font-size: .82rem; line-height: 1.35; transition: transform .15s, box-shadow .15s; }
.cal-ev:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15,23,42,.12); z-index: 4; }
.cal-ev .t { font-weight: 700; color: var(--c); font-size: .75rem; } .cal-ev b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.now { box-shadow: 0 0 0 2px #f59e0b; } .cal-ev.warn { box-shadow: 0 0 0 2px #fca5a5; } .cal-ev.muted { opacity: .5; text-decoration: line-through; }
.c0 { --c: #4f46e5; --cs: #eef2ff; } .c1 { --c: #059669; --cs: #ecfdf5; } .c2 { --c: #d97706; --cs: #fffbeb; } .c3 { --c: #db2777; --cs: #fdf2f8; }
.c4 { --c: #0891b2; --cs: #ecfeff; } .c5 { --c: #7c3aed; --cs: #f5f3ff; } .c6 { --c: #dc2626; --cs: #fef2f2; } .c7 { --c: #65a30d; --cs: #f7fee7; }
/* يومك: الخط الزمني */
.timeline { display: grid; gap: .6rem; position: relative; }
.tl-item { display: grid; grid-template-columns: 64px 1fr; gap: .7rem; align-items: start; }
.tl-time { font-weight: 700; font-size: .95rem; padding-top: .55rem; text-align: center; }
.tl-body { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: .65rem .8rem; }
.tl-item.now .tl-body { background: #fff; color: #0f172a; border-color: #f59e0b; box-shadow: 0 0 0 2px #f59e0b; }
.tl-item.after .tl-body { opacity: .95; } .tl-item.cancelled { opacity: .55; } .tl-item.cancelled .fw-bold { text-decoration: line-through; }
.tl-phase { font-size: .72rem; border-radius: 999px; padding: .1rem .55rem; background: rgba(255,255,255,.2); }
.tl-item.now .tl-phase { background: #fef3c7; color: #b45309; }
.tl-steps { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tl-step { font-size: .8rem; border-radius: 999px; padding: .25rem .7rem; background: rgba(255,255,255,.92); color: #312e81; text-decoration: none; border: 1px solid transparent; }
.tl-step.done { background: rgba(16,185,129,.15); color: #d1fae5; text-decoration: none; }
.tl-item.now .tl-step.done { color: #047857; }
.tl-step.urgent { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; font-weight: 600; }
.desk-item form { margin: 0; }
