/* منصة مسار — الهوية البصرية الجديدة
   ورق دافئ + حبر كحلي عميق + لمسة زعفران. */

@font-face { font-family: 'Tajawal'; src: url('assets/fonts/Tajawal-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('assets/fonts/Tajawal-Medium.ttf'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('assets/fonts/Tajawal-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('assets/fonts/Tajawal-ExtraBold.ttf'); font-weight: 800; font-display: swap; }

:root {
  --paper: #f8f5ef;
  --paper-2: #fffdf9;
  --ink: #16203a;
  --ink-2: #2c3a63;
  --ink-soft: #3f4a68;
  --muted: #6f7789;
  --line: #e7e0d2;
  --line-2: #efe9dd;
  --accent: #c07f2a;
  --accent-2: #e0a84a;
  --accent-soft: #f7ead4;
  --success: #1f7a5a;
  --success-soft: #e3f2ea;
  --danger: #b3402f;
  --danger-soft: #fbe8e3;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 40px -28px rgba(22, 32, 58, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.2px; }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 14px; }
.spacer { flex: 1; }

/* ---------- الترويسة ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px clamp(16px, 5vw, 56px);
  background: rgba(248, 245, 239, .88);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; }
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.brand-text em { font-style: normal; font-size: 12px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
  padding: 9px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--ink-soft);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav a:hover { background: var(--line-2); }
.nav a.active { background: var(--ink); color: #fff; }
.nav a.cta { background: var(--accent); color: #241a06; font-weight: 700; }
.nav a.cta:hover { background: var(--accent-2); }

/* ---------- الحاوية ---------- */
.view { max-width: 1120px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(16px, 5vw, 40px) 72px; }
.footer {
  border-top: 1px solid var(--line); padding: 20px clamp(16px, 5vw, 56px);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 13.5px;
}
.badge-quiet { font-size: 12px; color: var(--muted); }

/* ---------- عناصر ---------- */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--line-2); color: var(--ink-soft);
}
.pill.accent { background: var(--accent-soft); color: #7a4e12; }
.pill.success { background: var(--success-soft); color: #14543d; }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1.4px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  background: var(--ink); color: #fff; transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn.accent { background: var(--accent); color: #241a06; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.field { display: grid; gap: 6px; }
.field > label { font-size: 13.5px; font-weight: 600; color: var(--muted); padding-inline-start: 4px; }
input, textarea, select {
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1.2px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(44, 58, 99, .12);
}
textarea { resize: vertical; min-height: 90px; }

/* ---------- الرئيسية ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(140deg, #16203a 0%, #24304f 55%, #2f3d61 100%);
  color: #fff; border-radius: 28px; padding: clamp(26px, 4vw, 46px);
}
.hero::after {
  content: ''; position: absolute; inset-inline-start: -80px; bottom: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 168, 74, .34), transparent 65%);
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); max-width: 15ch; }
.hero p { color: rgba(255, 255, 255, .78); max-width: 46ch; margin-top: 12px; }
.hero .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .34); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.hero .pill { background: rgba(255, 255, 255, .12); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 26px; align-items: center; }
.hero-figure {
  position: relative; border-radius: 22px; padding: 18px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
}
.hero-figure .line { display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.72); padding: 9px 4px; border-bottom: 1px dashed rgba(255,255,255,.16); }
.hero-figure .line:last-child { border-bottom: none; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.feature { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; }
.feature .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: #7a4e12; font-size: 13px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 34px 0 16px; }
.section-head p { color: var(--muted); font-size: 14.5px; }

/* ---------- شبكة الكورسات ---------- */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.course-card { display: grid; overflow: hidden; padding: 0; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -30px rgba(22, 32, 58, .5); }
.course-cover {
  height: 150px; display: flex; align-items: flex-end; padding: 14px;
  background: linear-gradient(150deg, #eae3d4, #f3eee3);
  position: relative;
}
.course-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-cover::after {
  content: ''; position: absolute; inset-inline-end: 18px; top: 18px; width: 92px; height: 54px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 54'%3E%3Cpath d='M6 46C24 40 28 24 46 18s26-8 40-12' fill='none' stroke='%23c07f2a' stroke-opacity='.35' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='46' r='3' fill='%23c07f2a' fill-opacity='.3'/%3E%3Ccircle cx='46' cy='18' r='3' fill='%23c07f2a' fill-opacity='.3'/%3E%3Ccircle cx='86' cy='6' r='3' fill='%23c07f2a' fill-opacity='.3'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
}
.course-cover img + .pill, .course-cover .pill { position: relative; z-index: 1; }
.course-cover .pill { background: rgba(255, 253, 249, .94); }
.course-body { padding: 16px 18px 18px; display: grid; gap: 8px; }
.course-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.course-price { font-weight: 800; color: var(--ink); }

/* ---------- صفحة الكورس ---------- */
.course-page { display: grid; grid-template-columns: 1.55fr .85fr; gap: 20px; align-items: start; }
.player-wrap { position: relative; padding-top: 56.25%; border-radius: 18px; overflow: hidden; background: #0d1424; }
.player-wrap iframe, .player-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-list { display: grid; gap: 8px; margin-top: 14px; }
.lesson {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2);
  cursor: pointer; transition: border-color .16s ease, background .16s ease;
}
.lesson:hover { border-color: var(--ink-2); }
.lesson.active { border-color: var(--ink); background: var(--line-2); }
.lesson .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: #7a4e12; font-size: 13px; font-weight: 700; }
.lesson .t { flex: 1; font-weight: 600; font-size: 14.5px; }
.lesson .d { color: var(--muted); font-size: 12.5px; }
.locked { display: grid; gap: 10px; place-items: center; padding: 34px 20px; text-align: center; background: var(--paper-2); border: 1px dashed var(--line); border-radius: 18px; }

/* ---------- المحفظة ---------- */
.wallet-balance { font-size: 42px; font-weight: 800; letter-spacing: -1px; }
.tx-list { display: grid; gap: 8px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2); }
.tx .amt { font-weight: 800; }
.tx .amt.in { color: var(--success); }
.tx .amt.out { color: var(--danger); }

/* ---------- لوحة التحكم ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 9px 16px; border-radius: 999px; border: 1.2px solid var(--line); background: var(--paper-2); cursor: pointer; font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: start; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); }
.lesson-row { display: grid; grid-template-columns: 34px 1fr 110px 1.3fr 40px; gap: 8px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ---------- تنبيه ---------- */
.toast {
  position: fixed; inset-inline: 0; bottom: 26px; margin: auto; width: max-content; max-width: 90vw;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14.5px; opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateY(0); }
.fade-in { animation: fadeIn .32s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero-grid, .course-page, .features, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 27px; }
  .topbar { flex-wrap: wrap; }
  .nav a { padding: 8px 11px; font-size: 14px; }
  .lesson-row { grid-template-columns: 28px 1fr 80px 40px; }
  .lesson-row .youtube { display: none; }
}

/* v4 extras: progress, announcement bar, stats strip */
.ann { display: block; text-align: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; padding: 9px 14px; text-decoration: none; }
.ann::before { content: '✦ '; color: var(--accent-2); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 8px; }
.stt { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 12px; text-align: center; display: grid; gap: 2px; }
.stt b { font-size: 26px; color: var(--ink); font-weight: 800; }
.stt span { color: var(--muted); font-size: 13px; }
.vbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.vbar b { font-size: 15.5px; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.prg { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 10px; }
.prg i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.lesson.done .n { background: var(--success); color: #fff; }
.lesson.done .n::before { content: '✓'; }
.lesson.done .n { font-size: 0; }
.lesson.done .n::before { font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } .vbar { flex-direction: column; align-items: flex-start; } }

/* ---- login ---- */
.badge-quiet:empty { display: none; }
.auth-wrap { display: grid; place-items: center; padding: 18px 0 40px; }
.auth-card { width: min(440px, 100%); padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 24px 60px -28px rgba(22,32,58,.35); }
.auth-head { text-align: center; }
.auth-head h1 { margin: 0 0 6px; font-size: 26px; }
.auth-head p { margin: 0; color: var(--muted); }
.auth-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--line-2); font-size: 14px; text-align: center; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; background: #fff; color: #1f2937; border: 1.5px solid #d6d2c8; font-size: 17px; font-weight: 800; box-shadow: 0 8px 22px -12px rgba(22,32,58,.45); }
.google-btn:hover { border-color: var(--ink); background: #fff; }
.auth-fast { text-align: center; margin: -6px 0 0; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 12px; }
.auth-tabs button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(22,32,58,.12); }
.stack[hidden] { display: none; }
.google-btn span { line-height: 1; padding-top: 2px; }
.google-btn svg { flex: none; }

/* ---- ألوان إضافية ---- */
:root { --teal: #1f9d8f; --teal-soft: #d9f1ee; --rose: #e0587a; --rose-soft: #fbe1e8; --violet: #7a5cd6; --violet-soft: #e8e1fa; --sky: #3a8fd8; --sky-soft: #dcecfa; --leaf: #5aa65a; --leaf-soft: #e1f1de; }
.stats .stt { border-top: 3px solid var(--c, var(--accent)); }
.stats .stt:nth-child(1) { --c: var(--teal); } .stats .stt:nth-child(1) b { color: var(--teal); }
.stats .stt:nth-child(2) { --c: var(--violet); } .stats .stt:nth-child(2) b { color: var(--violet); }
.stats .stt:nth-child(3) { --c: var(--rose); } .stats .stt:nth-child(3) b { color: var(--rose); }
.stats .stt:nth-child(3) { --c: var(--accent); } .stats .stt:nth-child(3) b { color: var(--accent); }
.feature:nth-child(1) .dot { background: var(--teal-soft); color: var(--teal); }
.feature:nth-child(2) .dot { background: var(--violet-soft); color: var(--violet); }
.feature:nth-child(3) .dot { background: var(--rose-soft); color: var(--rose); }
.course-card .course-cover { background: linear-gradient(135deg, var(--cv1, #f0e6d2), var(--cv2, #f7ead4)); }
.tone-0 { --cv1: #d9f1ee; --cv2: #b5e3dd; } .tone-1 { --cv1: #e8e1fa; --cv2: #cfc2f3; }
.tone-2 { --cv1: #fbe1e8; --cv2: #f5bccb; } .tone-3 { --cv1: #dcecfa; --cv2: #b7d6f2; } .tone-4 { --cv1: #f7ead4; --cv2: #efd09b; }
.tone-0 .course-price { color: var(--teal); } .tone-1 .course-price { color: var(--violet); } .tone-2 .course-price { color: var(--rose); } .tone-3 .course-price { color: var(--sky); }
.hero { background-size: 160% 160%; animation: heroShift 14s ease-in-out infinite alternate; }
@keyframes heroShift { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
.hero::before { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(31,157,143,.35), transparent 70%); top: -80px; left: 10%; animation: floatY 7s ease-in-out infinite; pointer-events: none; }
.hero-figure { animation: floatY 6s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero h1 { background: linear-gradient(90deg, #fff, #f7ead4 60%, #ffd9a0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.btn { transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn.accent { box-shadow: 0 10px 24px -12px rgba(192,127,42,.8); }
.btn.accent:hover { box-shadow: 0 14px 28px -10px rgba(192,127,42,.9); }
.btn.accent { background-image: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent)); background-size: 200% 100%; }
.btn.accent:hover { background-position: 100% 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--d, 0ms), transform .6s cubic-bezier(.2,.7,.2,1) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.course-card.reveal.in:hover { transform: translateY(-5px); }
.feature { transition: transform .2s ease, box-shadow .2s ease; } .feature:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -20px rgba(22,32,58,.5); }
.nav a { transition: background .2s ease, color .2s ease; }
.toast { animation: toastIn .3s ease both; } @keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
/* ---- الحجز ---- */
.book-steps { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.book-steps span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.book-steps i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; font-size: 12px; }
.book-steps span:nth-child(2) i { background: var(--violet); } .book-steps span:nth-child(3) i { background: var(--rose); }
.book-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.day-card h3 { margin: 0 0 12px; }
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { font-family: inherit; font-size: 15px; font-weight: 700; padding: 10px 16px; border-radius: 12px; border: 1.5px solid var(--teal); background: var(--teal-soft); color: #0e5e55; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease; display: grid; gap: 0; }
.slot:hover:not(:disabled) { transform: translateY(-2px); background: var(--teal); color: #fff; }
.slot.sel { background: var(--teal); color: #fff; box-shadow: 0 10px 22px -12px var(--teal); }
.slot.taken { border-color: var(--line); background: var(--line-2); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }
.slot small { font-size: 11px; font-weight: 600; text-decoration: none; }
.book-panel { margin-top: 16px; display: grid; gap: 12px; animation: fadeIn .3s ease both; }
.book-panel[hidden] { display: none; }
.my-booking { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bstat { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.bstat.wait { background: var(--accent-soft); color: #7a4e12; } .bstat.ok { background: var(--leaf-soft); color: #2d6a2d; } .bstat.no { background: var(--rose-soft); color: #a02649; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.small-btn { padding: 7px 14px; font-size: 13.5px; min-height: 0; }
.card.inner { background: var(--paper); box-shadow: none; }
.empty-book { display: grid; gap: 10px; justify-items: start; }
.session-cta { border-inline-start: 5px solid var(--violet); }

/* schedule builder */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font-family: inherit; font-size: 14px; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line, #e4dccb); background: #fff; color: var(--ink, #1b2340); cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease; }
.chip:hover { transform: translateY(-1px); }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 6px 14px rgba(31, 157, 140, .28); }
.chip-link { font-family: inherit; font-size: 13px; font-weight: 700; background: none; border: 0; color: var(--violet, #6d4fcf); cursor: pointer; padding: 4px 6px; }
.chip-link:hover { text-decoration: underline; }
.presets { margin-top: 2px; }
.inline-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.inline-add input { max-width: 150px; }
.sch-summary { padding: 12px 14px; border-radius: 12px; background: #f3efe6; color: #6b6a78; font-size: 14px; font-weight: 600; }
.sch-summary.ready { background: var(--teal-soft); color: #0e5e55; }
.day-block { padding: 12px 0; border-top: 1px dashed #e4dccb; display: grid; gap: 8px; }
.day-block:first-of-type { border-top: 0; }
.mini-slot { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--teal-soft); color: #0e5e55; font-size: 13px; font-weight: 700; animation: fadeIn .35s ease both; }
.mini-slot button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(14, 94, 85, .14); color: #0e5e55; cursor: pointer; font-size: 15px; line-height: 1; }
.mini-slot button:hover { background: #d94f6a; color: #fff; }
.mini-slot.taken { background: #f3e4e8; color: #a23a55; padding: 6px 12px; }

/* coupons */
.cp-box { margin: 0 0 12px; } .cp-row { display: flex; gap: 8px; align-items: center; } .cp-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.cp-ok { color: #14543d; font-weight: 700; } .cp-bad { color: #a02649; font-weight: 700; }
.cp-item { padding: 12px 0; border-top: 1px dashed #e4dccb; } .cp-item:first-of-type { border-top: 0; }
.cp-code { font-size: 17px; letter-spacing: 1px; color: var(--violet); }
.cp-uses { margin-top: 6px; display: grid; gap: 2px; }
.check-row { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.check-row input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--teal); padding: 0; } .check-row { white-space: nowrap; }

/* هيرو: كورسات مميزة */
.hero-grid { grid-template-columns: 1.1fr .9fr; }
.hero-figure { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hf-title { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; color: #ffd9a0; padding: 2px 4px 4px; }
.hf-title a { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 500; }
.hf-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.95); color: var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
.hf-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -14px rgba(0,0,0,.6); }
.hf-cover { position: relative; flex: 0 0 62px; height: 62px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--cv1), var(--cv2)); }
.hf-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hf-body small { color: var(--muted); font-size: 11px; }
.hf-body b { font-size: 14.5px; line-height: 1.35; }
.hf-body em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.hf-price { font-weight: 800; font-size: 13px; color: var(--accent); white-space: nowrap; }
.tone-0 .hf-price { color: var(--teal); } .tone-1 .hf-price { color: var(--violet); } .tone-2 .hf-price { color: var(--rose); } .tone-3 .hf-price { color: var(--sky); }
@media (max-width: 860px) { .hero-figure { display: flex; } }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.hero-grid > * { min-width: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { max-width: none; } }

/* هيرو كاروسيل */
.hero-carousel { padding: 0; min-height: 360px; }
.hero-carousel::before { display: none; }
.hc-stage { display: grid; }
.hc-slide { grid-area: 1 / 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding: clamp(26px, 4vw, 46px) clamp(26px, 5vw, 64px) 64px; opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .6s ease, transform .6s ease, visibility .6s; position: relative; z-index: 1;
  background: radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--cv2) 30%, transparent), transparent 55%); }
.hc-slide.on { opacity: 1; visibility: visible; transform: none; }
.hc-text h1 { font-size: clamp(26px, 3.6vw, 42px); max-width: 18ch; margin-top: 12px; }
.hc-text p { max-width: 52ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; line-height: 1.8; }
.hc-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hc-meta span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); padding: 5px 12px; border-radius: 999px; font-size: 13px; }
.hc-meta .hc-price { background: var(--accent-2); color: #16203a; font-weight: 800; border-color: transparent; }
.hc-visual { display: flex; justify-content: center; }
.hc-visual img { width: 100%; max-width: 420px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.2); }
.hc-art { position: relative; width: min(100%, 380px); aspect-ratio: 4 / 3; border-radius: 22px; background: linear-gradient(135deg, var(--cv1), var(--cv2)); display: grid; place-items: center; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(0,0,0,.7); }
.hc-art b { font-size: 120px; color: rgba(22,32,58,.85); font-weight: 800; z-index: 1; }
.hc-art i { position: absolute; border-radius: 50%; background: rgba(255,255,255,.4); }
.hc-art i:nth-of-type(1) { width: 150px; height: 150px; top: -40px; inset-inline-start: -30px; }
.hc-art i:nth-of-type(2) { width: 90px; height: 90px; bottom: -20px; inset-inline-end: 24px; }
.hc-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); }
.hc-nav:hover { background: rgba(255,255,255,.26); }
.hc-nav.prev { inset-inline-end: 14px; } .hc-nav.next { inset-inline-start: 14px; }
.hc-dots { position: absolute; bottom: 20px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.hc-dots button { width: 9px; height: 9px; border-radius: 999px; border: none; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; transition: width .3s, background .3s; }
.hc-dots button.on { width: 28px; background: var(--accent-2); }
@media (max-width: 900px) {
  .hc-slide { grid-template-columns: 1fr; padding: 28px 22px 60px; gap: 18px; }
  .hc-visual { order: -1; } .hc-visual img, .hc-art { max-width: 260px; }
  .hc-art b { font-size: 70px; } .hc-nav { display: none; }
  .hc-text h1 { max-width: none; }
}

/* فعاليات */
.ev-card { padding: 0; overflow: hidden; }
.ev-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; padding: 16px; min-height: 110px; background: linear-gradient(135deg, #24304f, #3a4a78); }
.ev-top.has-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.ev-top > * { position: relative; z-index: 1; }
.ev-date { background: #fff; color: var(--ink); border-radius: 14px; padding: 8px 14px; text-align: center; line-height: 1.1; box-shadow: 0 8px 18px -10px rgba(0,0,0,.5); }
.ev-date b { display: block; font-size: 24px; } .ev-date span { font-size: 12px; color: var(--accent); font-weight: 700; }
.ev-cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 18px; }
.tk { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 14px; background: var(--paper-2); margin-top: 8px; }
.tk-code { font-weight: 800; letter-spacing: 2px; background: var(--accent-soft); color: #7a4e12; padding: 6px 12px; border-radius: 10px; font-size: 15px; }

/* مشغل الفيديو المحمي */
.vp { position: relative; padding-top: 56.25%; border-radius: 18px; overflow: hidden; background: #0b1020; user-select: none; -webkit-user-select: none; }
.vp:fullscreen { padding-top: 0; border-radius: 0; width: 100vw; height: 100vh; }
.vp-host { position: absolute; inset: 0; overflow: hidden; }
.vp-host iframe { position: absolute; left: 0; width: 100%; height: calc(100% + 150px); top: -75px; border: 0; pointer-events: none; }
.vp-top { position: absolute; inset: 0 0 auto 0; height: 64px; background: linear-gradient(#0b1020 30%, transparent); z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s; }
.vp:not(.playing) .vp-top { opacity: 1; }
.vp-shield { position: absolute; inset: 0; z-index: 3; cursor: pointer; background: transparent; }
.vp-mark { position: absolute; z-index: 4; pointer-events: none; color: rgba(255,255,255,.28); font-size: 13px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.5); transition: top 1.5s, left 1.5s; direction: ltr; }
.vp-big { position: absolute; z-index: 5; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: rgba(224, 150, 40, .94); color: #10213f; font-size: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.vp-bar { position: absolute; z-index: 6; inset: auto 0 0 0; display: flex; align-items: center; gap: 10px; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(8,12,26,.88)); color: #fff; }
.vp-bar button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 10px; min-width: 38px; height: 34px; font-size: 15px; cursor: pointer; font-family: inherit; }
.vp-bar button:hover { background: rgba(255,255,255,.24); }
.vp-bar .vp-t { font-size: 12.5px; min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.vp-bar input[type=range] { flex: 1; accent-color: #e09628; height: 4px; cursor: pointer; }
@media (max-width: 600px) { .vp-bar { gap: 6px; padding: 20px 8px 8px; } .vp-bar button { min-width: 32px; height: 30px; } .vp-big { width: 58px; height: 58px; font-size: 22px; } }

.cover-up { display: flex; gap: 14px; align-items: flex-start; }
.cover-prev { width: 150px; aspect-ratio: 4/3; border-radius: 12px; background: var(--paper-2); border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .cover-up { flex-direction: column; } .cover-prev { width: 100%; } }
.field:has(> .cover-up) { grid-column: 1 / -1; }

/* محفظة الهيدر وقايمة الموبايل */
.topbar { flex-wrap: wrap; }
.topbar .brand { order: 0; }
.top-actions { display: flex; align-items: center; gap: 8px; order: 2; margin-inline-start: auto; }
.nav { order: 1; }
.wal-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: #fff3dc; color: #5c3d08; border: 1px solid #f0d9a8; font-size: 14.5px; white-space: nowrap; }
.wal-chip i { font-style: normal; color: var(--accent); font-size: 13px; }
.wal-chip b { font-weight: 800; font-variant-numeric: tabular-nums; }
.wal-chip:hover, .wal-chip.active { background: var(--accent); color: #241a06; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.topbar.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.topbar.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1001px) { .topbar { flex-wrap: nowrap; } .top-actions { order: 1; margin-inline-start: 0; } .nav { order: 0; margin-inline-start: auto; } }
@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 6px; }
  .topbar.menu-open .nav { display: flex; }
  .nav a { padding: 12px 14px; font-size: 15.5px; border-radius: 12px; }
  .brand-text em { display: none; }
}
.wal-chip[hidden] { display: none !important; }
.course-card .course-body > p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; }
.cdesc { max-width: 760px; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cdesc.open { display: block; -webkit-line-clamp: unset; white-space: pre-line; }
.linkbtn { background: none; border: 0; color: var(--accent, #c07a1a); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; }
.course-page > .cmain { grid-column: 1; }
.course-page > aside { grid-column: 2; }
.lessons-card .lesson-list { margin-top: 12px; max-height: 520px; overflow: auto; }
.vbar .vbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-lessons { text-align: center; padding: 56px 24px; border: 1.5px dashed var(--line, #ddd2bd); border-radius: 18px; background: var(--card, #fffdf8); }
.empty-lessons .el-ico { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--accent-soft, #fbe7c3); color: #7a4e12; font-size: 24px; }
@media (min-width: 1001px) { .course-page.focus { grid-template-columns: 1.9fr .8fr; } }
.course-page.focus .about-card { display: none; }
body:has(.course-page.focus) .course-head { display: none; }
@media (max-width: 1000px) { .course-page > .cmain, .course-page > aside { grid-column: 1; } }
.course-card .course-body > p { max-height: 3.4em; }
