/*
 * Tutor LMS in the A-Alaa look.
 * Tutor 4 builds its UI from CSS variables, so most of the restyle is remapping them:
 * the blue brand scale becomes the emerald scale, Nunito becomes Thmanyah,
 * and the dark theme uses the brand's night/forest greens instead of grey-blue.
 */

:root,
[data-tutor-theme] {
	--tutor-brand-100: #d5ede2;
	--tutor-brand-200: #aedcc6;
	--tutor-brand-300: #7cc6a6;
	--tutor-brand-400: #4aae86;
	--tutor-brand-450: #2c9e74;
	--tutor-brand-500: #1a8f63;
	--tutor-brand-600: #08754f;
	--tutor-brand-700: #065e40;
	--tutor-brand-800: #064a33;
	--tutor-brand-900: #062b21;
	--tutor-brand-950: #03110d;

	--tutor-color-primary: #08754f;
	--tutor-color-primary-rgb: 8, 117, 79;
	--tutor-color-primary-hover: #065e40;

	--tutor-font-family-body: "Thmanyah Sans", system-ui, "Segoe UI", Tahoma, sans-serif;
	--tutor-font-family-heading: "Thmanyah Sans", system-ui, "Segoe UI", Tahoma, sans-serif;
	--tutor-button-radius: 999px;
}

[data-tutor-theme="dark"] {
	--tutor-surface-base: #03110d;
	--tutor-surface-l1: #062b21;
	--tutor-surface-l1-hover: #0b3a2c;
	--tutor-surface-l2: #0b3a2c;
	--tutor-surface-l2-hover: #0f4635;
	--tutor-surface-l3: #082f24;
	--tutor-surface-sidebar-l1: #020c09;
	--tutor-surface-brand-tertiary: #0b3a2c;
	--tutor-text-brand: #12c48a;
	--tutor-text-brand-hover: #2ee6a6;
	--tutor-icon-brand: #12c48a;
	--tutor-button-primary: #12c48a;
	--tutor-button-primary-hover: #2ee6a6;
}

/* Headings in the display face, like the rest of the site. */
.tutor-learning-header-title,
.tutor-dashboard h1,
.tutor-dashboard h2 {
	font-family: "Thmanyah Sans Display", "Thmanyah Sans", system-ui, sans-serif;
	font-weight: 900;
}

/* ---------- Learning area header ---------- */
.aa-learn-header { background: #03110d; color: #fff; border: 0; }
.aa-learn-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 10px 20px; }
.aa-learn-header__start { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 320px; }
.aa-learn-header__logo img { display: block; height: 40px; width: auto; }
.aa-learn-header__divider { width: 1px; height: 28px; background: rgba(255, 255, 255, 0.18); }
.aa-learn-header__titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.aa-learn-header__course { font-size: 12px; color: #bfe9d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-learn-header .aa-learn-header__topic { margin: 0; font-family: "Thmanyah Sans", system-ui, sans-serif; font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-learn-header__end { display: flex; align-items: center; gap: 18px; }
.aa-learn-progress { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.aa-learn-progress__label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #bfe9d6; }
.aa-learn-progress__label b { color: #fff; font-weight: 700; }
.aa-learn-progress__bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.aa-learn-progress__bar span { display: block; height: 100%; border-radius: 999px; background: #12c48a; }
.aa-learn-header__account { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; }
.aa-learn-header__account:hover { color: #bfe9d6; }
.aa-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: #08754f; color: #fff; font-weight: 700; }
.aa-learn-header .tutor-learning-header-toggle-mobile .tutor-btn { color: #fff; }
@media (max-width: 767px) {
	.aa-learn-progress { min-width: 0; flex: 1 1 100%; order: 3; }
	.aa-learn-header__end { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; }
	.aa-learn-header__account-label, .aa-learn-header__divider { display: none; }
}

/* ---------- Lesson actions ---------- */
.aa-lesson-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 0; }
.aa-lesson-actions__main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.aa-lesson-done { display: inline-flex; align-items: center; gap: 8px; color: var(--tutor-text-brand, #08754f); font-weight: 700; font-size: 15px; }
.aa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; font-family: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background-color 150ms, color 150ms, border-color 150ms; }
.aa-btn--brand { background: #08754f; color: #fff; }
.aa-btn--brand:hover { background: #065e40; color: #fff; }
.aa-btn--ghost { background: transparent; color: var(--tutor-text-primary, #0a1f18); border: 1px solid var(--tutor-border-idle, #d5e6de); }
.aa-btn--ghost:hover { border-color: #08754f; color: #08754f; }
[data-tutor-theme="dark"] .aa-btn--brand { background: #12c48a; color: #03110d; }
[data-tutor-theme="dark"] .aa-btn--brand:hover { background: #2ee6a6; color: #03110d; }
.aa-learn-header .aa-learn-header__inner { background: transparent; border: 0; box-shadow: none; border-radius: 0; margin: 0; max-width: none; }
/* Tutor styles its complete button pale; ours is the page's main action. */
.aa-lesson-actions .aa-btn--brand.tutor-mark-as-complete-button { background: #08754f; color: #fff; opacity: 1; border: 0; box-shadow: none; width: auto; }
.aa-lesson-actions .aa-btn--brand.tutor-mark-as-complete-button:hover { background: #065e40; color: #fff; }
[data-tutor-theme="dark"] .aa-lesson-actions .aa-btn--brand.tutor-mark-as-complete-button { background: #12c48a; color: #03110d; }

/* ---------- Account (dashboard) ---------- */
.aa-brand-logo img { display: block; height: 44px; width: auto; }
.aa-dash { display: flex; flex-direction: column; gap: 24px; }
.aa-dash__head { display: flex; flex-direction: column; gap: 4px; }
.aa-dash__title { margin: 0; font-family: "Thmanyah Sans Display", "Thmanyah Sans", system-ui, sans-serif; font-weight: 900; font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); line-height: 1.25; color: var(--tutor-text-primary); }
.aa-dash__lead { margin: 0; font-size: 16px; color: var(--tutor-text-secondary); }
.aa-dash__section { display: flex; flex-direction: column; gap: 12px; }
.aa-dash__h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--tutor-text-primary); }
.aa-card { background: var(--tutor-surface-l1, #fff); border: 1px solid var(--tutor-border-idle, #d5e6de); border-radius: 20px; }
.aa-muted { margin: 0; color: var(--tutor-text-secondary); font-size: 14px; }
.aa-note { margin: 0; font-size: 14px; color: var(--tutor-text-secondary); }

.aa-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; align-items: center; padding: 24px; border-radius: 24px; background: #062b21; background-image: radial-gradient(70% 90% at 0% 100%, rgba(18, 196, 138, 0.25) 0%, rgba(8, 117, 79, 0) 70%); color: #fff; }
.aa-resume__text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.aa-resume__eyebrow { font-size: 13px; color: #bfe9d6; }
.aa-resume__title { font-family: "Thmanyah Sans Display", "Thmanyah Sans", system-ui, sans-serif; font-weight: 900; font-size: 24px; line-height: 1.35; }
.aa-resume__meta { font-size: 14px; color: #bfe9d6; }
.aa-resume__progress { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px; background: rgba(3, 17, 13, 0.5); border: 1px solid rgba(255, 255, 255, 0.12); }
.aa-resume__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.aa-resume__row span { color: #bfe9d6; }

.aa-meter { height: 8px; border-radius: 999px; background: var(--tutor-surface-l2, #e2ece7); overflow: hidden; }
.aa-meter span { display: block; height: 100%; border-radius: 999px; background: #08754f; }
.aa-meter--dark { background: rgba(255, 255, 255, 0.14); }
.aa-meter--dark span { background: #12c48a; }

.aa-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-radius: 16px; background: #fff7e0; border: 1px solid #f1d58a; color: #5c3d00; font-size: 15px; }
[data-tutor-theme="dark"] .aa-notice { background: #3a2c08; border-color: #6b5214; color: #fbe3a6; }

.aa-abboud { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; align-items: center; padding: 24px; }
.aa-abboud__text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.aa-abboud__eyebrow { font-size: 13px; font-weight: 700; color: #08754f; }
.aa-abboud__title { font-family: "Thmanyah Sans Display", "Thmanyah Sans", system-ui, sans-serif; font-weight: 900; font-size: 22px; line-height: 1.35; }
.aa-abboud__body { font-size: 15px; line-height: 1.8; color: var(--tutor-text-secondary); }
.aa-abboud__hide { margin-top: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--tutor-text-secondary); text-decoration: underline; cursor: pointer; }
.aa-abboud__video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #03110d; }

.aa-waiting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; margin-bottom: 20px; background: #eef6f2; border-color: #bfe9d6; border-inline-start: 4px solid #12c48a; }
.aa-waiting > div { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; }
.aa-waiting b { font-size: 17px; color: #062b21; }
.aa-waiting span { font-size: 14px; line-height: 1.8; color: #3c5a4f; }
[data-tutor-theme="dark"] .aa-waiting { background: #0b2a20; border-color: #1d4a3a; }
[data-tutor-theme="dark"] .aa-waiting b { color: #ffffff; }
[data-tutor-theme="dark"] .aa-waiting span { color: #bfe9d6; }

.aa-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.aa-help > div { display: flex; flex-direction: column; gap: 4px; }
.aa-help span { font-size: 14px; color: var(--tutor-text-secondary); }
.aa-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; }

.aa-btn--mint { background: #12c48a; color: #03110d; }
.aa-btn--mint:hover { background: #2ee6a6; color: #03110d; }
.aa-btn--whatsapp { background: #25d366; color: #0a1f18; }
.aa-btn--whatsapp:hover { background: #20bd5b; color: #0a1f18; }

/* «تفاصيل اشتراكي» */
.aa-subs { display: flex; flex-direction: column; gap: 12px; }
.aa-sub { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 16px 24px; align-items: center; padding: 20px 24px; }
.aa-sub__name { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.aa-sub__name b { font-size: 17px; color: var(--tutor-text-primary); }
.aa-sub__dates { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 14px; }
.aa-sub__dates dt { color: var(--tutor-text-secondary); }
.aa-sub__dates dd { margin: 0; font-weight: 700; color: var(--tutor-text-primary); }
.aa-sub__left { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--tutor-text-secondary); min-width: 0; }
.aa-sub--expiring .aa-meter span { background: #d99a00; }
.aa-sub--expired .aa-meter span { background: #c9b6ba; }
.aa-sub--expired { opacity: 0.85; }
.aa-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.aa-pill::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.aa-pill--active, .aa-pill--lifetime { background: #e2f3ea; color: #08754f; }
.aa-pill--expiring { background: #fff1c7; color: #8a5a00; }
.aa-pill--expired { background: #f6e4e7; color: #9b2335; }

.aa-table-wrap { overflow-x: auto; }
.aa-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.aa-table th { text-align: right; padding: 14px 20px; font-weight: 500; color: var(--tutor-text-secondary); border-bottom: 1px solid var(--tutor-border-idle, #d5e6de); }
.aa-table td { padding: 14px 20px; border-bottom: 1px solid var(--tutor-border-idle, #eef3f0); color: var(--tutor-text-primary); }
.aa-table tr:last-child td { border-bottom: 0; }
.aa-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.aa-ok { color: #08754f; font-weight: 700; }
.aa-wait { color: #8a5a00; font-weight: 700; }

/* ---------- Login ---------- */
.aa-login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; background: #fff; }
.aa-login__form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.aa-login__inner { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 24px; }
.aa-login__logo { align-self: flex-start; display: inline-flex; padding: 10px 12px; border-radius: 14px; background: #03110d; }
.aa-login__logo img { display: block; height: 40px; width: auto; }
.aa-login__head h1 { margin: 0 0 6px; font-family: "Thmanyah Sans Display", "Thmanyah Sans", system-ui, sans-serif; font-weight: 900; font-size: 36px; line-height: 1.25; color: #0a1f18; }
.aa-login__head p { margin: 0; font-size: 16px; color: #3c5a4f; }
.aa-login__tutor { padding: 0 !important; }
.aa-login__tutor .tutor-form-control { height: 52px; border-radius: 14px; border-color: #d5e6de; font-size: 16px; }
.aa-login__tutor .tutor-form-control:focus { border-color: #08754f; box-shadow: 0 0 0 3px rgba(8, 117, 79, 0.18); }
.aa-login__tutor .tutor-btn-primary { min-height: 52px; border-radius: 999px; background: #08754f; border-color: #08754f; font-size: 16px; font-weight: 700; }
.aa-login__tutor .tutor-btn-primary:hover { background: #065e40; border-color: #065e40; }
.aa-login__google-note { margin: -4px 0 0; font-size: 13px; line-height: 1.7; color: var(--tutor-text-secondary, #4b5c56); text-align: center; }
.aa-login__help { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 16px; background: #eef6f2; font-size: 14px; line-height: 1.7; color: #3c5a4f; }
.aa-login__help b { color: #0a1f18; }
.aa-login__help a { font-weight: 700; color: #08754f; text-decoration: none; }
.aa-login__more { margin: 0; font-size: 14px; color: #3c5a4f; }
.aa-login__more a { font-weight: 700; color: #08754f; }
.aa-login__brand { position: relative; display: flex; align-items: flex-end; padding: 56px; color: #fff; background: #062b21; background-image: radial-gradient(80% 70% at 100% 0%, rgba(18, 196, 138, 0.35) 0%, rgba(8, 117, 79, 0) 70%), url("../img/portrait.webp"); background-size: auto, cover; background-position: center, 50% 15%; }
.aa-login__brand::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3, 17, 13, 0.92) 10%, rgba(3, 17, 13, 0.1) 60%); }
.aa-login__brand-inner { position: relative; display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
.aa-login__brand-inner b { font-family: "Thmanyah Sans Display", "Thmanyah Sans", system-ui, sans-serif; font-weight: 900; font-size: 40px; line-height: 1.2; }
.aa-login__brand-inner > span { font-size: 16px; color: #bfe9d6; max-width: none; }
@media (max-width: 899px) { .aa-login { grid-template-columns: minmax(0, 1fr); } .aa-login__brand { display: none; } }
/* Our page has its own «لسه مش مشترك؟» line. */
.aa-login__tutor #tutor-login-form .tutor-justify-center.tutor-mt-7 { display: none; }

/* No extra pages for this course (see inc/learning.php): hide the empty «المزيد» block. */
.tutor-learning-sidebar-pages:not(:has(a[href*="subpage="])) { display: none; }

/* Upgrade to Pro card (inc/upgrade.php) */
.aa-upgrade { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-radius: 24px; background: #062b21; background-image: radial-gradient(70% 90% at 100% 0%, rgba(18, 196, 138, 0.25) 0%, rgba(8, 117, 79, 0) 70%); color: #fff; }
.aa-upgrade__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 320px; }
.aa-upgrade__tag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); font-size: 12px; color: #bfe9d6; }
.aa-upgrade__title { margin: 0; font-size: 22px; line-height: 1.4; color: #fff; }
.aa-upgrade p { margin: 0; color: #bfe9d6; font-size: 15px; }
.aa-upgrade ul { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.7; }
.aa-upgrade ul li::marker { color: #12c48a; }

/* «رشّح صاحبك» (tutor/dashboard/referral.php) */
.aa-ref, .aa-ref__payout { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px; }
.aa-ref__label, .aa-ref__payout label { font-size: 14px; font-weight: 600; }
.aa-ref__row { display: flex; flex-wrap: wrap; gap: 10px; }
.aa-ref__input { flex: 1 1 260px; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--tutor-border-idle, #d5e6de); background: var(--tutor-surface-l1, #fff); color: inherit; font: inherit; font-size: 15px; }
.aa-ref__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.aa-ref__stats .aa-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.aa-ref__stats span { font-size: 14px; color: var(--tutor-text-secondary); }
.aa-ref__stats b { font-size: 24px; }
.aa-ref__ok { margin: 0; color: #08754f; font-size: 14px; }
.aa-ref__rules { padding: 20px 24px; }
.aa-ref__rules ol { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.7; }

/* «قيّم الكورس» form */
.aa-rvf { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.aa-rvf__field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; }
.aa-rvf__field > span, .aa-rvf__field > legend { font-weight: 700; font-size: 15px; color: var(--tutor-text-primary, #0a1f18); }
.aa-rvf__field small { font-weight: 400; color: var(--tutor-text-secondary, #4b5c56); }
.aa-rvf input[type="text"], .aa-rvf input[type="tel"], .aa-rvf select, .aa-rvf textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--tutor-border-idle, #d5e6de); border-radius: 12px; font: inherit; font-size: 15px; background: var(--tutor-surface-l1, #fff); color: inherit; }
.aa-rvf textarea { resize: vertical; line-height: 1.8; }
.aa-rvf__opt { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.7; cursor: pointer; }
.aa-rvf__opt input { margin-top: 5px; accent-color: #08754f; }
.aa-rvf__consent { padding: 14px; border-radius: 12px; background: #eef6f2; }
.aa-rvf__stars { flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.aa-rvf__stars legend { width: 100%; margin-bottom: 6px; }
.aa-rvf__stars input { position: absolute; opacity: 0; pointer-events: none; }
.aa-rvf__stars label { font-size: 34px; line-height: 1; color: #d5e6de; cursor: pointer; }
.aa-rvf__stars input:checked ~ label, .aa-rvf__stars label:hover, .aa-rvf__stars label:hover ~ label { color: #f5b301; }
.aa-rvf__stars input:focus-visible + label { outline: 2px solid #08754f; outline-offset: 2px; border-radius: 4px; }
.aa-rvf button[type="submit"] { align-self: flex-start; }

/* Approved reviews, [aalaa_reviews] */
.aa-rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.aa-rv { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid #d5e6de; border-radius: 20px; background: #fff; }
.aa-rv__head { display: flex; align-items: center; gap: 12px; }
.aa-rv__head div { display: flex; flex-direction: column; gap: 2px; }
.aa-rv__head b { font-size: 16px; color: #0a1f18; }
.aa-rv__head span { font-size: 13px; color: #4b5c56; }
.aa-rv__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.aa-rv__photo--empty { display: grid; place-items: center; background: #062b21; color: #12c48a; font-weight: 900; font-size: 22px; }
.aa-rv__stars { color: #f5b301; font-size: 18px; letter-spacing: 2px; }
.aa-rv__quote { margin: 0; font-size: 16px; line-height: 1.9; color: #0a1f18; }
.aa-rv__result { margin: 0; font-size: 14px; line-height: 1.8; color: #3c5a4f; padding: 10px 12px; border-radius: 12px; background: #eef6f2; }
.aa-rv__badge { margin-top: auto; font-size: 13px; font-weight: 700; color: #08754f; }
.aa-rv-empty { color: #4b5c56; }

/* Google sign-in button: centered under «دخول» */
#tutor-pro-google-authentication { display: flex; justify-content: center; width: 100%; }
#tutor-pro-google-authentication > div { margin-inline: auto; }
