
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

:root {
    --primary: #8b672e;
    --primary-dark: #62491f;
    --navy: #382b1b;
    --text: #625746;
    --muted: #8d806c;
    --line: #e7dfd1;
    --bg: #faf7f0;
    --white: #fff;
    --green: #26714f;
    --orange: #b78332;
    --red: #b94f4a;
    --gold-light: #d2b579;
    --brown: #604b2c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: Inter, Arial, sans-serif;
    color: var(--navy);
    background: #fff;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1160px, calc(100% - 48px));
    margin: auto;
}

/* =========================
   HEADER AND NAVIGATION
========================= */

.site-header {
    height: 82px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav-wrap {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -1px;
}

.brand strong {
    display: block;
    font-size: 15px;
    letter-spacing: 1px;
    line-height: 1.3;
}

.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--muted);
    margin-top: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
     gap: 30px; /* Space between menu items */
    margin-left: 400px; /* Gap between logo and menu */
}

.main-nav > a {
    font-size: 12px;
    color: var(--text);
    font-weight: 600;
}

.main-nav > a:hover,
.main-nav > a.active {
    color: var(--primary);
}

.main-nav .nav-login {
    padding: 11px 17px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 40px;
    height: 40px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    margin: 5px auto;
}

/* INSTITUTE LOGO */

.institute-logo {
    width: 250px;
    height: 70px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* LOGO BRAND ALIGNMENT */

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-left: 80px;
    margin-top: 20px;
}

.brand img {
    max-width: 100%;
}

/* MOBILE LOGO */

@media (max-width: 700px) {

    .institute-logo {
        width: 40px;
        height: 40px;
    }

    .brand strong {
        font-size: 13px;
    }

}

/* =========================
   HERO SECTION
========================= */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(115deg, #49361e, #8b672e);
    color: #fff;
    min-height: 550px;
    display: flex;
    align-items: center;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: .12;
    background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
    background-size: 28px 28px;
    mask-image: linear-gradient(90deg, transparent, #000);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 40px;
    padding-top: 65px;
    padding-bottom: 65px;
    position: relative;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #f0dfbd;
}

.eyebrow-blue {
    color: var(--primary);
}

.hero h1 {
    font-size: clamp(42px, 5.3vw, 67px);
    line-height: 1.08;
    letter-spacing: -2.5px;
    margin: 22px 0;
}

.hero h1 em,
.section-copy h2 em,
.section-heading h2 em,
.contact-grid h2 em,
.application-intro h1 em {
    font-family: Amiri, serif;
    font-weight: 400;
    color: #e4c990;
    font-style: normal;
}

.hero-copy > p {
    max-width: 560px;
    color: #f1e8d8;
    font-size: 14px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 14px 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-light {
    background: #fff;
    color: var(--primary);
}

.btn-outline-light {
    border: 1px solid #d2b579;
    color: #fff;
    background: transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.hero-note {
    margin-top: 28px;
    font-size: 11px;
    color: #f0dfbd;
}

.note-icon {
    color: #e5c27a;
    margin-right: 7px;
}

/* HERO ART */

.hero-art {
    height: 350px;
    display: grid;
    place-items: center;
    position: relative;
}

.art-ring {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    transform: rotate(45deg);
}

.ring-one {
    width: 290px;
    height: 290px;
}

.ring-two {
    width: 230px;
    height: 230px;
    border-style: dashed;
}

.art-center {
    width: 185px;
    height: 185px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 18px rgba(255, 255, 255, .035);
}

.arabic {
    font-family: Amiri, serif;
    font-size: 65px;
    line-height: 1.2;
}

.art-center small {
    font-size: 8px;
    letter-spacing: 2px;
    color: #f1e8d8;
}

.art-center b {
    font-size: 17px;
    color: #e5c27a;
    margin-top: 7px;
}

.art-star {
    position: absolute;
    color: #e5c27a;
    font-size: 30px;
}

.star-a {
    top: 35px;
    right: 80px;
}

.star-b {
    bottom: 42px;
    left: 70px;
}

.star-c {
    top: 80px;
    left: 55px;
}

/* =========================
   TRUST STRIP
========================= */

.trust-strip {
    background: #f7f3e9;
    border-bottom: 1px solid var(--line);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 22px 0;
}

.trust-grid > div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 13px;
    border-right: 1px solid var(--line);
}

.trust-grid > div:last-child {
    border: 0;
}

.trust-grid strong {
    font-size: 17px;
    color: var(--primary);
}

.trust-grid span {
    font-size: 11px;
    color: var(--text);
    font-weight: 600;
}

/* =========================
   GENERAL SECTIONS
========================= */

.section {
    padding: 95px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 90px;
}

.section-visual {
    min-height: 340px;
    background: #f4eddd;
    border-radius: 18px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.section-visual:before,
.section-visual:after {
    content: "";
    position: absolute;
    width: 270px;
    height: 270px;
    border: 1px solid #d8c49c;
    border-radius: 50%;
}

.section-visual:after {
    width: 220px;
    height: 220px;
    border-style: dashed;
}

.visual-card {
    position: relative;
    z-index: 1;
    width: 205px;
    height: 235px;
    background: linear-gradient(145deg, #4a371f, #a27a39);
    border-radius: 12px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 45px #604b2c35;
}

.visual-symbol {
    font-size: 32px;
    color: #f0d99f;
}

.visual-arabic {
    font-family: Amiri, serif;
    font-size: 48px;
}

.visual-card small {
    font-size: 8px;
    letter-spacing: 2px;
    color: #f1e8d8;
}

.visual-caption {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: #75654b;
    font-size: 10px;
}

.section-copy h2,
.section-heading h2,
.contact-grid h2 {
    font-size: 39px;
    line-height: 1.2;
    letter-spacing: -1.4px;
    margin: 17px 0;
}

.section-copy h2 em,
.section-heading h2 em,
.contact-grid h2 em,
.application-intro h1 em {
    color: var(--primary);
}

.section-copy p,
.contact-grid > div > p {
    font-size: 13px;
    line-height: 1.9;
    color: var(--text);
    margin: 12px 0;
}

.text-link {
    display: inline-flex;
    gap: 14px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    margin-top: 18px;
}

/* =========================
   COURSES
========================= */

.courses-section {
    background: #f7f3e9;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 35px;
}

.section-heading h2 {
    margin-bottom: 0;
}

.section-heading > p {
    max-width: 300px;
    color: var(--text);
    font-size: 12px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 19px;
}

.course-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px 25px;
    min-height: 265px;
    transition: .2s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px #263e8812;
}

.course-card.featured {
    border-color: #d2b579;
    box-shadow: 0 12px 30px #8b672e1c;
}

.course-icon {
    width: 47px;
    height: 47px;
    border-radius: 11px;
    background: #f4eddd;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-family: Amiri, serif;
    font-size: 25px;
    margin-bottom: 22px;
}

.course-number {
    font-size: 9px;
    letter-spacing: 1.3px;
    color: #897a62;
    font-weight: 700;
}

.course-card h3 {
    font-size: 19px;
    margin: 7px 0;
}

.course-card p {
    font-size: 12px;
    line-height: 1.8;
    color: var(--text);
    min-height: 66px;
}

.course-card > a {
    display: inline-flex;
    gap: 12px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    margin-top: auto;
    padding-top: 18px;
}

.course-catalog-error {
    margin-top: 16px;
    color: #a33b35;
    font-size: 13px;
}

/* =========================
   ADMISSION CTA
========================= */

.admission-cta {
    background: linear-gradient(110deg, #49361e, #9b7538);
    color: #fff;
    padding: 65px 0;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.cta-inner h2 {
    font-size: 36px;
    line-height: 1.2;
    margin: 13px 0;
}

.cta-inner p {
    max-width: 490px;
    font-size: 12px;
    line-height: 1.8;
    color: #f1e8d8;
}

.cta-inner .btn {
    flex-shrink: 0;
}

/* =========================
   CONTACT SECTION
========================= */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.contact-details {
    display: grid;
    gap: 20px;
}

.contact-details > div {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 43px;
    height: 43px;
    border-radius: 10px;
    background: #f4eddd;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 18px;
}

.contact-details small {
    display: block;
    color: #8d806c;
    font-size: 9px;
    letter-spacing: 1px;
    font-weight: 700;
}

.contact-details strong {
    font-size: 12px;
    color: var(--navy);
    overflow-wrap: anywhere;
}

/* =========================
   FOOTER
========================= */

.site-footer {
    background: linear-gradient(110deg, #382b1b, #604b2c);
    color: #f1e8d8;
    padding: 23px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner > span,
.footer-inner > a:not(.brand) {
    font-size: 10px;
    color: #e6d9c0;
}

.footer-brand .brand-mark {
    background: #fff;
    color: var(--primary);
}

.footer-brand strong {
    color: #fff;
}

.footer-brand small {
    color: #e6d9c0;
}
/* INSTITUTE LOGO */

.institute-logo {
    width: 250px;
    height: 70px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* LOGO BRAND ALIGNMENT */

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-left: 80px;
    margin-top: 20px;
}

.brand img {
    max-width: 100%;
}

/* MOBILE LOGO */

@media (max-width: 700px) {

    .institute-logo {
        width: 40px;
        height: 40px;
    }

    .brand strong {
        font-size: 13px;
    }

}
/* =========================
   APPLICATION FORM
========================= */

.back-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.application-main {
    background: var(--bg);
    padding: 65px 0 90px;
}

.application-wrap {
    max-width: 850px;
}

.application-intro {
    text-align: center;
    margin: 0 auto 35px;
    max-width: 650px;
}

.application-intro h1 {
    font-size: 39px;
    letter-spacing: -1.3px;
    margin: 12px 0;
}

.application-intro h1 em {
    font-style: normal;
}

.application-intro > p {
    font-size: 12px;
    color: var(--text);
    line-height: 1.8;
}

/* FORM STEPS */

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin-top: 27px;
    color: #8d806c;
    font-size: 10px;
    font-weight: 700;
}

.steps span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.steps small {
    font-size: 9px;
    font-weight: 500;
}

.steps i {
    width: 45px;
    height: 1px;
    background: #e7dfd1;
}

.steps .step-active {
    color: var(--primary);
}

/* APPLICATION FORM */

.application-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 35px;
    box-shadow: 0 12px 35px #382b1b09;
}

.form-section {
    padding-bottom: 30px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.form-section-title {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.form-section-title > span {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f2e8d4;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 12px;
}

.form-section-title h2 {
    font-size: 17px;
}

.form-section-title p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--navy);
    font-size: 12px;
    outline: none;
    transition: .2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #8b672e1a;
}

.field textarea {
    resize: vertical;
}

.field input[type=file] {
    font-size: 10px;
    color: var(--text);
}

.field.full {
    grid-column: 1 / -1;
}

.form-hint,
.privacy-note {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 12px;
}

.payment-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: center;
    gap: 20px 28px;
    padding: 22px;
    margin: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #faf7f0);
}

.payment-copy h2 {
    margin: 5px 0;
    font-size: 19px;
}

.payment-copy > p {
    color: var(--text);
    font-size: 11px;
    line-height: 1.7;
}

.payment-upi {
    margin-top: 9px;
}

.payment-upi strong {
    margin-right: 5px;
}

.payment-upi span {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
}

.payment-link {
    margin-top: 12px;
}

.payment-qr {
    display: block;
    width: 240px;
    height: 240px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    image-rendering: pixelated;
}

.payment-qr-download {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.payment-upload {
    grid-column: 1 / -1;
}

.payment-upload-hint {
    grid-column: 1 / -1;
    margin-top: -14px;
}

.consent {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 12px;
    color: var(--text);
    margin: 5px 0 15px;
    line-height: 1.6;
    cursor: pointer;
}

.consent input {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    margin: 0;
}

.consent span {
    min-width: 0;
}

.form-error {
    font-size: 11px;
    color: var(--red);
    min-height: 17px;
    margin-bottom: 7px;
}

.submit-application {
    width: 100%;
    padding: 16px;
}

.privacy-note {
    text-align: center;
}

/* SUCCESS MESSAGE */

.success-overlay,
.detail-overlay {
    position: fixed;
    inset: 0;
    background: #382b1ba8;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
}

.success-overlay[hidden],
.detail-overlay[hidden] {
    display: none;
}

.success-card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 38px;
    text-align: center;
}

.success-check {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #e6f8ef;
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 25px;
    margin: 0 auto 18px;
}

.success-card h2 {
    font-size: 24px;
    margin: 10px 0;
}

.success-card p {
    font-size: 12px;
    color: var(--text);
}

.application-number {
    padding: 12px;
    background: #f7f1e4;
    border-radius: 8px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 1px;
    margin: 18px 0;
}

.success-note {
    margin-bottom: 20px;
}

/* =========================
   ADMIN LOGIN
========================= */

.admin-login-page {
    min-height: 100vh;
    background: var(--bg);
    display: grid;
    place-items: center;
    padding: 30px 18px;
}

.admin-login-shell {
    width: min(450px, 100%);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login-brand {
    justify-content: center;
}

.admin-login-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 35px;
    box-shadow: 0 12px 40px #382b1b0c;
}

.login-emblem {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: #f2e8d4;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 25px;
    margin: 0 auto 18px;
}

.center-heading {
    text-align: center;
    margin-bottom: 28px;
}

.center-heading h1 {
    font-size: 27px;
}

.center-heading p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 7px;
}

.admin-login-card .field {
    margin-top: 18px;
}

/* PASSWORD FIELD */

.password-wrap {
    position: relative;
}

.password-wrap input {
    display: block;
    width: 100%;
    padding-right: 65px;
}

.password-wrap button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px;
    cursor: pointer;
}

/* LOGIN OPTIONS */

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 17px 0;
    font-size: 10px;
}

.login-options a {
    color: var(--primary);
    font-weight: 600;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.check-label input {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
}

.login-submit {
    width: 100%;
}

.login-demo {
    display: grid;
    gap: 4px;
    background: #f3f6ff;
    border-radius: 8px;
    padding: 12px;
    margin-top: 18px;
    font-size: 10px;
    color: var(--text);
}

.login-demo strong {
    color: var(--primary);
}

.login-security {
    text-align: center;
    font-size: 9px;
    color: var(--muted);
    margin-top: 15px;
}

/* =========================
   ADMIN DASHBOARD
========================= */

.dashboard-page {
    background: var(--bg);
    min-height: 100vh;
}

/* SIDEBAR */

.dash-sidebar {
    width: 245px;
    background: #fff;
    border-right: 1px solid var(--line);
    position: fixed;
    inset: 0 auto 0 0;
    padding: 25px 18px;
    display: flex;
    flex-direction: column;
    z-index: 30;
}

.dash-menu-label {
    font-size: 9px;
    letter-spacing: 1.3px;
    color: #8d806c;
    font-weight: 700;
    margin: 40px 10px 13px;
}

.dash-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 12px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: #625746;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.dash-link.selected,
.dash-link:hover {
    background: #f2e8d4;
    color: var(--primary);
}

.sidebar-bottom {
    margin-top: auto;
}

.logout-button {
    width: 100%;
}

/* DASHBOARD MAIN */

.dash-main {
    margin-left: 245px;
    min-height: 100vh;
}

/* TOPBAR */

.dash-topbar {
    height: 82px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
}

.dash-top-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-topbar h1 {
    font-size: 17px;
}

.dash-topbar p {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f2e8d4;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

.admin-user strong,
.admin-user small {
    display: block;
}

.admin-user strong {
    font-size: 11px;
}

.admin-user small {
    font-size: 9px;
    color: var(--muted);
}

.dash-menu-toggle {
    display: none;
    border: 0;
    background: none;
    font-size: 21px;
}

/* DASHBOARD CONTENT */

.dash-content {
    padding: 30px 35px;
    max-width: 1500px;
    margin: auto;
}

.dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.dash-welcome h2 {
    font-size: 24px;
    margin: 5px 0;
}

.dash-welcome p {
    font-size: 11px;
    color: var(--muted);
}

/* DASHBOARD STATISTICS */

.dash-stats {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 22px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    display: grid;
    gap: 8px;
}

.stat-icon {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.blue-icon {
    background: #f2e8d4;
    color: var(--primary);
}

.green-icon {
    background: #e6f8ef;
    color: var(--green);
}

.orange-icon {
    background: #fff3df;
    color: var(--orange);
}

.red-icon {
    background: #ffedef;
    color: var(--red);
}

.stat-card small {
    font-size: 10px;
    color: var(--muted);
}

.stat-card strong {
    font-size: 25px;
}

/* DASHBOARD PANEL */

.dash-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 22px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.panel-head h2 {
    font-size: 15px;
}

.panel-head p {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
}

.btn-soft {
    background: #f2e8d4;
    color: var(--primary);
    padding: 10px 14px;
}

.course-management-panel {
    margin: 22px 0;
}

.course-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 2fr);
    gap: 14px;
    align-items: end;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.course-form .field {
    margin: 0;
}

.course-form .form-error {
    grid-column: 1 / -1;
    margin: 0;
}

.course-form > button {
    justify-self: start;
}

.managed-course-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    padding-top: 18px;
}

.managed-course {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.managed-course-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.managed-course-heading .course-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
    font-size: 19px;
}

.managed-course-number {
    flex: 1;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .4px;
}

.managed-course h3 {
    margin-bottom: 6px;
    color: var(--navy);
    font-size: 13px;
}

.managed-course p,
.managed-course > small {
    display: block;
    color: var(--text);
    font-size: 10px;
    line-height: 1.6;
}

.managed-course > small {
    margin-top: 8px;
    color: var(--muted);
}

.course-remove,
.course-locked {
    flex: 0 0 auto;
    border: 0;
    border-radius: 5px;
    padding: 6px 8px;
    background: #f2e8d4;
    color: var(--primary);
    font: inherit;
    font-size: 9px;
    font-weight: 700;
}

.course-remove {
    cursor: pointer;
}

.course-remove:disabled {
    background: #f1eee8;
    color: var(--muted);
    cursor: not-allowed;
}

/* TABLE TOOLBAR */

.table-toolbar {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.table-toolbar input,
.table-toolbar select {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 11px 12px;
    font-size: 11px;
    outline: none;
    background: #fff;
    color: var(--text);
}

.table-toolbar input {
    flex: 1;
    min-width: 150px;
}

/* APPLICATION TABLE */

.table-scroll {
    overflow-x: auto;
}

.application-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.application-table th {
    text-align: left;
    background: #faf7f0;
    padding: 13px 11px;
    font-size: 9px;
    letter-spacing: .5px;
    color: #8d806c;
}

.application-table td {
    padding: 14px 11px;
    border-bottom: 1px solid #e7dfd1;
    font-size: 10px;
    color: var(--text);
}

.application-table td strong {
    display: block;
    color: var(--navy);
    font-size: 11px;
}

.application-table td small {
    color: var(--muted);
}

/* STATUS LABELS */

.status-pill {
    display: inline-block;
    border-radius: 20px;
    padding: 5px 9px;
    font-size: 9px;
    font-weight: 700;
}

.status-Pending {
    background: #fff3df;
    color: #c2831e;
}

.status-Approved {
    background: #e6f8ef;
    color: var(--green);
}

.status-Rejected {
    background: #ffedef;
    color: var(--red);
}

.table-action {
    border: 0;
    background: #f2e8d4;
    color: var(--primary);
    border-radius: 5px;
    padding: 7px 9px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

/* EMPTY STATE */

.empty-state {
    text-align: center;
    padding: 48px 15px;
    color: var(--muted);
}

.empty-state > span {
    font-size: 28px;
    color: #c8aa70;
}

.empty-state h3 {
    font-size: 14px;
    color: var(--navy);
    margin: 8px;
}

.empty-state p,
.empty-state a {
    font-size: 10px;
}

.empty-state a {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    margin-top: 10px;
}

/* DEMO WARNING */

.demo-warning {
    font-size: 10px;
    color: #9a6a22;
    background: #fff6e7;
    padding: 12px;
    border-radius: 7px;
    margin-top: 15px;
}

/* =========================
   APPLICATION DETAILS MODAL
========================= */

.detail-modal {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    padding: 30px;
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 12px;
    background: none;
    border: 0;
    font-size: 25px;
    color: var(--muted);
    cursor: pointer;
}

.detail-modal h2 {
    font-size: 22px;
    margin: 8px 0 18px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 22px;
}

.payment-receipt {
    margin: 0 0 20px;
}

.payment-receipt h3 {
    margin-bottom: 4px;
    font-size: 14px;
}

.payment-receipt p {
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.payment-receipt img {
    display: block;
    max-width: 100%;
    max-height: 420px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: contain;
}

.detail-item {
    padding: 11px;
    background: #faf7f0;
    border-radius: 7px;
    min-width: 0;
}

.detail-item small {
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.detail-item strong {
    display: block;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.student-credentials {
    padding: 16px;
    margin: -4px 0 20px;
    border: 1px solid #cfe7d9;
    border-radius: 9px;
    background: #f1faf5;
}

.student-credentials h3 {
    color: var(--navy);
    font-size: 14px;
}

.student-credentials p {
    margin: 5px 0 12px;
    color: var(--text);
    font-size: 11px;
    line-height: 1.5;
}

.student-credentials > div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid #dceee3;
    font-size: 12px;
}

.student-credentials code {
    overflow-wrap: anywhere;
    color: var(--navy);
    font-weight: 700;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

/* =========================
   RESPONSIVE: TABLETS
========================= */

@media (max-width: 900px) {

    .main-nav {
        gap: 17px;
    }

    .about-grid {
        gap: 45px;
    }

    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-content {
        padding: 25px 20px;
    }

    .dash-topbar {
        padding: 0 20px;
    }
}

/* =========================
   RESPONSIVE: MOBILE
========================= */

@media (max-width: 700px) {

    .container {
        width: min(100% - 36px, 560px);
    }

    .site-header {
        height: 72px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 71px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px 22px 22px;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 20px #17233d0d;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav > a {
        padding: 12px 5px;
    }

    .main-nav .nav-login {
        text-align: center;
        margin-top: 8px;
    }

    /* HERO */

    .hero {
        min-height: 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        padding-top: 65px;
        padding-bottom: 45px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero-art {
        height: 240px;
    }

    .ring-one {
        width: 210px;
        height: 210px;
    }

    .ring-two {
        width: 170px;
        height: 170px;
    }

    .art-center {
        width: 135px;
        height: 135px;
    }

    .arabic {
        font-size: 48px;
    }

    /* SECTIONS */

    .section {
        padding: 65px 0;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .section-visual {
        min-height: 280px;
    }

    .section-heading {
        display: block;
    }

    .section-heading > p {
        margin-top: 12px;
    }

    /* COURSES */

    .course-grid {
        grid-template-columns: 1fr;
    }

    .course-card {
        min-height: 0;
    }

    .course-card p {
        min-height: 0;
    }

    /* CTA */

    .cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .cta-inner h2 {
        font-size: 31px;
    }

    /* FOOTER */

    .trust-grid {
        gap: 10px;
    }

    .trust-grid > div {
        flex-direction: column;
        text-align: center;
        gap: 3px;
    }

    .trust-grid span {
        font-size: 9px;
    }

    .footer-inner {
        flex-wrap: wrap;
    }

    .footer-inner > span {
        order: 3;
        width: 100%;
    }

    /* APPLICATION FORM */

    .application-main {
        padding: 45px 0 65px;
    }

    .application-intro h1 {
        font-size: 31px;
    }

    .steps {
        gap: 7px;
    }

    .steps i {
        width: 18px;
    }

    .steps small {
        font-size: 8px;
    }

    .application-form {
        padding: 23px 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .payment-section {
        grid-template-columns: 1fr;
        justify-items: start;
        padding: 18px;
    }

    .payment-upload,
    .payment-upload-hint {
        grid-column: auto;
    }

    .payment-upload-hint {
        margin-top: -14px;
    }

    .field.full {
        grid-column: auto;
    }

    /* ADMIN LOGIN */

    .admin-login-card {
        padding: 27px 21px;
    }

    /* DASHBOARD */

    .dash-sidebar {
        transform: translateX(-100%);
        transition: .25s;
    }

    .dash-sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 30px #17233d20;
    }

    .dash-main {
        margin-left: 0;
    }

    .dash-menu-toggle {
        display: block;
    }

    .dash-topbar {
        height: 72px;
        padding: 0 16px;
    }

    .dash-topbar h1 {
        font-size: 14px;
    }

    .admin-user > span:last-child {
        display: none;
    }

    .dash-content {
        padding: 22px 15px;
    }

    .dash-welcome {
        align-items: flex-start;
        gap: 10px;
    }

    .dash-welcome h2 {
        font-size: 19px;
    }

    .dash-welcome .btn {
        padding: 10px;
        font-size: 10px;
    }

    .dash-stats {
        gap: 10px;
    }

    .stat-card {
        padding: 13px;
    }

    .stat-card strong {
        font-size: 21px;
    }

    .dash-panel {
        padding: 15px;
    }

    .course-form {
        grid-template-columns: 1fr;
    }

    .course-form .form-error {
        grid-column: auto;
    }

    .course-form > button {
        width: 100%;
    }

    .table-toolbar {
        flex-wrap: wrap;
    }

    .table-toolbar input {
        flex-basis: 100%;
    }

    .table-toolbar select {
        flex: 1;
        min-width: 0;
    }

    /* DETAILS MODAL */

    .detail-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================
   RESPONSIVE: SMALL MOBILE
========================= */

@media (max-width: 390px) {

    .hero h1 {
        font-size: 39px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .trust-grid span {
        font-size: 8px;
    }

    .application-intro h1 {
        font-size: 27px;
    }

    .steps small {
        display: none;
    }

    .dash-stats {
        grid-template-columns: 1fr 1fr;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }
}

:root {
    --primary: #8b672e;
    --primary-dark: #62491f;
    --navy: #382b1b;
    --text: #625746;
    --muted: #8d806c;
    --line: #e7dfd1;
    --bg: #faf7f0;
    --white: #ffffff;
    --green: #26714f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--navy);
}

/* HEADER */

.header {
    width: 100%;
    min-height: 78px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 17px;
}

.brand h2 {
    font-size: 17px;
    font-weight: 800;
}

.brand p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.header nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.header nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.header nav a.active,
.header nav a:hover {
    color: var(--primary);
}

/* MAIN CONTAINER */

.container {
    width: 88%;
    max-width: 1350px;
    margin: 40px auto;
}

/* PAGE HEADING */

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.eyebrow,
.course-label {
    font-size: 11px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 1.5px;
}

.page-heading h1 {
    font-size: 30px;
    margin: 8px 0;
}

.page-heading p {
    font-size: 14px;
    color: var(--text);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e8edff;
    color: var(--primary);
    font-weight: 800;
}

.student-info strong,
.student-info small {
    display: block;
}

.student-info strong {
    font-size: 13px;
}

.student-info small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
}

/* COURSE OVERVIEW */

.course-overview {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}

.course-overview h2 {
    font-size: 21px;
    margin: 8px 0;
}

.course-overview p {
    font-size: 13px;
    color: var(--text);
}

.progress-area {
    width: 290px;
    flex-shrink: 0;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
}

.progress-text span {
    color: var(--text);
}

.progress-text strong {
    color: var(--primary);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: #edf0f7;
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--green);
    border-radius: 20px;
    transition: width 0.3s ease;
}

.progress-area small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 9px;
}

/* LEARNING LAYOUT */

.learning-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 25px;
    align-items: start;
}

/* VIDEO SECTION */

.video-section {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 15px;
    overflow: hidden;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #101827;
}

#youtubePlayer {
    width: 100%;
    height: 100%;
}

.video-details {
    padding: 25px;
}

.lesson-number {
    font-size: 11px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 1px;
}

.video-details h2 {
    font-size: 21px;
    margin: 10px 0;
}

.video-details > p {
    color: var(--text);
    font-size: 13px;
    line-height: 1.7;
}

.video-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.primary-btn,
.secondary-btn {
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.primary-btn {
    background: var(--primary);
    color: var(--white);
}

.primary-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.secondary-btn {
    background: #eef1f8;
    color: var(--navy);
}

.primary-btn:disabled,
.secondary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.watch-message {
    margin-top: 18px;
    padding: 12px;
    background: #f0f4ff;
    color: var(--primary);
    border-radius: 8px;
    font-size: 12px;
}

/* LESSON PANEL */

.lessons-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 15px;
    overflow: hidden;
}

.panel-heading {
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
    font-size: 16px;
}

.panel-heading p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}

.list-icon {
    color: var(--primary);
    font-size: 20px;
}

.lesson-list {
    padding: 10px;
}

.lesson-item {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 14px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 4px;
}

.lesson-item:hover:not(:disabled) {
    background: #f4f6fc;
}

.lesson-item.active {
    background: #edf1ff;
}

.lesson-item:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.lesson-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf0f6;
    color: var(--text);
    font-size: 13px;
}

.lesson-item.completed .lesson-icon {
    background: #e5f6ee;
    color: var(--green);
}

.lesson-item.active .lesson-icon {
    background: var(--primary);
    color: var(--white);
}

.lesson-content {
    flex: 1;
    min-width: 0;
}

.lesson-content strong {
    display: block;
    color: var(--navy);
    font-size: 12px;
    line-height: 1.5;
}

.lesson-content small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 5px;
}

.lesson-status {
    color: var(--muted);
    font-size: 14px;
}

/* FOOTER */

.footer {
    text-align: center;
    padding: 25px;
    color: var(--muted);
    font-size: 11px;
    margin-top: 30px;
}

/* TABLET */

@media (max-width: 1000px) {
    .learning-layout {
        grid-template-columns: 1fr;
    }

    .lessons-panel {
        width: 100%;
    }

    .lesson-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* MOBILE */

@media (max-width: 700px) {
    .header {
        padding: 14px 5%;
        align-items: flex-start;
        flex-direction: column;
    }

    .header nav {
        width: 100%;
        gap: 18px;
        flex-wrap: wrap;
    }

    .header nav a {
        font-size: 11px;
    }

    .container {
        width: 92%;
        margin: 25px auto;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading h1 {
        font-size: 25px;
    }

    .course-overview {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .progress-area {
        width: 100%;
    }

    .video-details {
        padding: 18px;
    }

    .video-details h2 {
        font-size: 18px;
    }

    .video-actions {
        flex-direction: column;
    }

    .video-actions button {
        width: 100%;
    }

    .lesson-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .brand h2 {
        font-size: 15px;
    }

    .panel-heading {
        padding: 16px;
    }

    .lesson-item {
        padding: 12px 8px;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8b672e;
    --primary-dark: #62491f;
    --navy: #382b1b;
    --text: #625746;
    --muted: #8d806c;
    --line: #e7dfd1;
    --bg: #faf7f0;
    --white: #ffffff;
    --green: #26714f;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--navy);
}

.header {
    background: var(--white);
    padding: 18px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-weight: bold;
}

.brand h2 {
    font-size: 18px;
}

.brand p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.container {
    width: 92%;
    max-width: 1250px;
    margin: 40px auto;
}

.login-card {
    max-width: 430px;
    margin: 65px auto;
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 8px 35px rgba(20, 40, 80, 0.07);
}

.login-card h1 {
    margin-bottom: 10px;
}

.login-card > p {
    color: var(--text);
    margin-bottom: 25px;
}

label {
    display: block;
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    font-size: 15px;
}

input:focus {
    border-color: var(--primary);
}

button {
    border: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 600;
}

#loginBtn {
    width: 100%;
    margin-top: 22px;
    background: var(--primary);
    color: white;
}

#loginBtn:hover {
    background: var(--primary-dark);
}

.logout-btn {
    background: #fff0f0;
    color: #d95562;
}

.welcome {
    margin-bottom: 25px;
}

.welcome h1 {
    font-size: 27px;
    margin-bottom: 8px;
}

.welcome p {
    color: var(--text);
}

.class-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 25px;
    align-items: start;
}

.lesson-sidebar,
.video-content {
    background: white;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.lesson-sidebar h3 {
    margin-bottom: 20px;
}

.course-item {
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    background: #f1f4fc;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--navy);
    text-align: left;
}

.course-item.selected {
    background: #edf1ff;
    color: var(--primary);
}

.lesson-item {
    padding: 13px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.lesson-item:hover {
    background: #f5f7fc;
}

.lesson-item.current {
    color: var(--primary);
    background: #edf1ff;
    font-weight: 600;
}

.lesson-item:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.lesson-item.active {
    color: var(--primary);
    background: #edf1ff;
    font-weight: 600;
}

.lesson-item.locked {
    cursor: not-allowed;
    opacity: 0.55;
}

.lesson-heading {
    margin: 18px 0 8px;
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
}

.video-heading {
    margin-bottom: 20px;
}

.video-heading p {
    color: var(--primary);
    font-size: 13px;
    margin-bottom: 8px;
}

.video-heading h2 {
    font-size: 22px;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
}

#youtubePlayer {
    width: 100%;
    height: 100%;
}

.video-info {
    margin-top: 20px;
    color: var(--text);
    line-height: 1.6;
}

.lesson-navigation {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

#completeBtn {
    background: var(--primary);
    color: white;
}

#completeBtn:disabled {
    background: #aab4ce;
    cursor: not-allowed;
}

.message {
    margin-top: 12px;
    font-size: 13px;
    color: #d95562;
}

.message.success {
    color: var(--green);
}

[hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    .class-layout {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        order: 2;
    }

    .video-content {
        order: 1;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 14px 4%;
    }

    .container {
        width: 94%;
        margin: 25px auto;
    }

    .login-card {
        padding: 25px 20px;
        margin: 35px auto;
    }

    .welcome h1 {
        font-size: 22px;
    }

    .video-heading h2 {
        font-size: 19px;
    }
}

.online-classes-header .online-classes-brand {
    margin: 0;
}

.online-classes-header .online-classes-logo {
    width: 220px;
    height: 60px;
}

@media (max-width: 700px) {
    .online-classes-header .online-classes-logo {
        width: 180px;
        height: 50px;
    }
}

.site-header .brand,
.application-brand,
.login-brand,
.dashboard-brand,
.footer-brand {
    margin: 0;
}

.site-header .institute-logo,
.application-logo,
.login-logo {
    width: 210px;
    height: 58px;
}

.dashboard-brand {
    justify-content: center;
    width: 100%;
}

.dashboard-logo {
    width: 190px;
    height: 60px;
}

.dashboard-avatar {
    width: 46px;
    height: 46px;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
}

.footer-brand {
    flex-shrink: 0;
}

.footer-logo {
    width: 185px;
    height: 55px;
}

@media (max-width: 700px) {
    .site-header .institute-logo,
    .application-logo,
    .login-logo {
        width: 175px;
        height: 50px;
    }

    .dashboard-logo {
        width: 165px;
        height: 54px;
    }

    .footer-logo {
        width: 155px;
        height: 48px;
    }
}

.site-header > .brand {
    width: min(1160px, calc(100% - 48px));
    height: 100%;
    margin: 0 auto;
    justify-content: space-between;
    gap: 24px;
}

.site-header .main-nav {
    flex: 1;
    justify-content: flex-end;
    gap: clamp(12px, 2vw, 26px);
    margin-left: auto;
}

@media (max-width: 900px) and (min-width: 701px) {
    .site-header .institute-logo {
        width: 195px;
        height: 58px;
    }

    .site-header .main-nav {
        gap: 12px;
    }

    .site-header .main-nav > a {
        font-size: 11px;
    }
}

@media (max-width: 700px) {
    .site-header > .brand {
        width: calc(100% - 36px);
        gap: 12px;
    }

    .site-header .institute-logo {
        width: 190px;
        height: 54px;
    }

    .site-header .nav-toggle {
        flex: 0 0 40px;
        margin-left: auto;
    }
}

@media (max-width: 390px) {
    .site-header .institute-logo {
        width: 165px;
        height: 48px;
    }
}

/* ONLINE LEARNING PORTAL */

.online-classes-header {
    min-height: 82px;
    padding: 10px max(24px, calc((100% - 1160px) / 2));
    background: #fff;
}

.online-classes-header .online-classes-brand {
    margin: 0;
}

.online-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.online-home-link {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.online-home-link:hover {
    color: var(--primary);
}

.online-page {
    margin-top: 40px;
    margin-bottom: 72px;
}

.online-eyebrow {
    display: inline-block;
    color: #947035;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
    line-height: 1.5;
}

.online-login-card {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.8fr);
    align-items: center;
    gap: clamp(30px, 7vw, 90px);
    max-width: 1000px;
    margin: 40px auto 70px;
    padding: clamp(28px, 6vw, 64px);
    border: 1px solid #e8e3d8;
    background: linear-gradient(135deg, #fff 20%, #faf8f2);
}

.online-login-copy h1 {
    margin: 14px 0;
    font-size: clamp(32px, 4.5vw, 54px);
    line-height: 1.12;
    letter-spacing: -1.5px;
}

.online-login-copy h1 em {
    color: #947035;
    font-family: Georgia, serif;
    font-weight: 400;
}

.online-login-copy > p,
.online-demo-note {
    color: var(--text);
    font-size: 13px;
    line-height: 1.7;
}

.online-login-form {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.online-login-form h2 {
    margin-bottom: 16px;
    font-size: 20px;
}

.online-login-form label {
    margin: 14px 0 7px;
    font-size: 12px;
}

.online-login-form input {
    padding: 12px 13px;
    font-size: 13px;
}

.online-login-form #loginBtn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
    padding: 13px 16px;
    background: #244b3d;
    color: #fff;
    font-size: 13px;
}

.online-login-form #loginBtn:hover {
    background: #19392e;
}

.online-login-form .message {
    margin: 0;
}

.online-demo-note {
    margin-top: 13px;
    font-size: 10px;
}

.online-welcome {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.online-welcome h1 {
    margin: 7px 0 4px;
    font-size: clamp(24px, 3vw, 34px);
}

.online-welcome > div > p {
    color: var(--text);
    font-size: 13px;
}

.course-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 190px;
    padding: clamp(24px, 5vw, 48px);
    overflow: hidden;
    border-radius: 14px;
    color: #fff;
    background: radial-gradient(ellipse at 86% 12%, #d2b57955 0, transparent 38%), linear-gradient(120deg, #17382f, #285448);
}

.course-banner::after {
    position: absolute;
    right: -42px;
    bottom: -132px;
    width: 290px;
    height: 290px;
    border: 1px solid #ffffff20;
    border-radius: 50%;
    box-shadow: 0 0 0 24px #ffffff08, 0 0 0 48px #ffffff08;
    content: "";
    pointer-events: none;
}

.course-banner-copy {
    position: relative;
    z-index: 1;
}

.course-banner .online-eyebrow {
    color: #e4c990;
}

.course-banner h2 {
    margin: 8px 0 5px;
    font-size: clamp(25px, 4vw, 38px);
    line-height: 1.15;
}

.course-banner-copy p {
    color: #d7e3dd;
    font-size: 13px;
}

.course-switcher {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.course-switcher-item {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 11px 15px;
    border: 1px solid #ffffff50;
    border-radius: 999px;
    background: #ffffff12;
    color: #fff;
    font-size: 12px;
}

.episodes-section {
    margin-top: 46px;
}

.episodes-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 19px;
}

.episodes-heading h2 {
    margin-top: 5px;
    font-size: 24px;
}

.episodes-heading > p {
    color: var(--text);
    font-size: 12px;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.episode-card {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e7e8e4;
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    text-align: left;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.episode-card:not(:disabled):hover {
    transform: translateY(-3px);
    border-color: #cbb98e;
    box-shadow: 0 12px 25px #24372d12;
}

.episode-card.is-current {
    border-color: #947035;
    box-shadow: 0 0 0 2px #94703520;
}

.episode-card:disabled {
    cursor: not-allowed;
}

.episode-thumbnail {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    place-items: center;
    background: #193d33;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.episode-card:not(:disabled):hover .episode-thumbnail img {
    transform: scale(1.04);
}

.episode-thumbnail.thumbnail-fallback {
    background: radial-gradient(circle at 75% 25%, #c9ab6a55, transparent 28%), linear-gradient(135deg, #244c40, #142f29);
}

.episode-thumbnail.thumbnail-fallback::before,
.episode-thumbnail.thumbnail-fallback::after {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 1px solid #ffffff26;
    border-radius: 50%;
    content: "";
}

.episode-thumbnail.thumbnail-fallback::after {
    width: 105px;
    height: 105px;
}

.episode-play-mark {
    position: absolute;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid #ffffffa0;
    border-radius: 50%;
    background: #10251e99;
    color: #fff;
    font-size: 13px;
}

.episode-card.is-locked .episode-thumbnail img {
    filter: brightness(.55) grayscale(.4);
}

.episode-card.is-locked .episode-play-mark {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.episode-card-details {
    display: grid;
    gap: 6px;
    padding: 15px 16px 16px;
}

.episode-number {
    color: #947035;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.episode-card-details strong {
    min-height: 40px;
    font-size: 14px;
    line-height: 1.45;
}

.episode-status {
    color: #6b756e;
    font-size: 10px;
}

.episode-card.is-completed .episode-status {
    color: #26714f;
}

.episode-card.is-locked .episode-status {
    color: #89908b;
}

.online-video-content {
    max-width: 900px;
    margin: 28px auto 0;
    padding: clamp(17px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 32px #17233d0b;
}

.online-video-content .video-heading {
    margin-bottom: 16px;
}

.online-video-content .video-heading p {
    color: #947035;
}

.online-video-content .lesson-navigation button {
    background: #244b3d;
    color: #fff;
}

.online-video-content .lesson-navigation button:disabled {
    background: #aab4ae;
}

@media (max-width: 800px) {
    .online-login-card {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 600px;
    }

    .episode-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 560px) {
    .online-classes-header {
        min-height: 72px;
        padding: 8px 16px;
    }

    .online-classes-header .online-classes-logo {
        width: 165px;
        height: 48px;
    }

    .online-header-actions {
        gap: 10px;
    }

    .online-home-link {
        font-size: 11px;
    }

    .online-header-actions .logout-btn {
        padding: 9px 10px;
        font-size: 11px;
    }

    .online-page {
        margin-top: 24px;
        margin-bottom: 44px;
    }

    .online-login-card {
        margin: 14px auto 38px;
        padding: 24px 20px;
    }

    .online-login-form {
        padding: 20px 16px;
    }

    .online-welcome {
        margin-bottom: 18px;
    }

    .course-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 17px;
        min-height: 0;
        padding: 25px 21px;
    }

    .course-banner::after {
        right: -100px;
    }

    .episodes-section {
        margin-top: 32px;
    }

    .episodes-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .episodes-heading h2 {
        font-size: 21px;
    }

    .episode-grid {
        gap: 11px;
    }

    .episode-card-details {
        gap: 5px;
        padding: 12px 11px;
    }

    .episode-card-details strong {
        min-height: 54px;
        font-size: 12px;
    }

    .episode-play-mark {
        width: 36px;
        height: 36px;
    }
}

body.online-classes-page {
    --primary: #3157d5;
    --primary-dark: #2444b3;
    --navy: #17233d;
    --text: #59667d;
    --muted: #929bad;
    --line: #e5eaf2;
    --bg: #f5f7fc;
    --white: #ffffff;
    --green: #1d9b65;
    --orange: #d99128;
    --red: #d95562;
}

body.form-page,
body.admin-login-page {
    background: linear-gradient(135deg, #faf7f0, #f0e5cf);
}

body.dashboard-page {
    background: linear-gradient(135deg, #faf7f0, #f3ead9);
}

body:not(.online-classes-page) .section-visual {
    background: linear-gradient(145deg, #f8f3e8, #eaddc2);
}

body:not(.online-classes-page) .section-visual:before,
body:not(.online-classes-page) .section-visual:after {
    border-color: #d2b579;
}

body:not(.online-classes-page) .form-section-title > span,
body:not(.online-classes-page) .course-icon,
body:not(.online-classes-page) .contact-icon,
body:not(.online-classes-page) .login-emblem,
body:not(.online-classes-page) .student-avatar,
body:not(.online-classes-page) .blue-icon,
body:not(.online-classes-page) .dash-link.selected,
body:not(.online-classes-page) .dash-link:hover {
    background: #f2e8d4;
    color: var(--primary);
}

body:not(.online-classes-page) .check-label input,
body:not(.online-classes-page) .consent input {
    accent-color: var(--primary);
}

body:not(.online-classes-page) .progress-track {
    background: #e9dfcd;
}

body:not(.online-classes-page) .detail-modal .eyebrow,
body:not(.online-classes-page) .eyebrow-blue {
    color: var(--primary);
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    direction: ltr;
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.language-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.language-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.language-switcher select {
    min-width: 92px;
    height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: var(--navy);
    font: inherit;
    cursor: pointer;
}

.online-classes-page .language-switcher {
    color: var(--text);
}

.online-classes-page .language-switcher select {
    border-color: var(--line);
    background: var(--white);
    color: var(--navy);
}

html.arabic-language body {
    font-family: Amiri, "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .dash-sidebar {
    right: 0;
    left: auto;
    border-right: 0;
    border-left: 1px solid var(--line);
}

html[dir="rtl"] .dash-main {
    margin-right: 245px;
    margin-left: 0;
}

html[dir="rtl"] .dash-link {
    text-align: right;
}

html[dir="rtl"] .application-table th,
html[dir="rtl"] .table-action {
    text-align: right;
}

html[dir="rtl"] .modal-close {
    right: auto;
    left: 18px;
}

html[dir="rtl"] .detail-content,
html[dir="rtl"] .student-credentials > div {
    direction: rtl;
}

html[dir="rtl"] .student-credentials code {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .online-classes-header {
    direction: rtl;
}

html[dir="rtl"] .online-header-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .episode-card-details {
    text-align: right;
}

@media (max-width: 700px) {
    .form-page .site-header {
        height: auto;
        min-height: 72px;
    }

    .form-page .site-header .nav-wrap {
        height: auto;
        min-height: 72px;
        margin: 0 auto;
        flex-wrap: wrap;
        row-gap: 6px;
        padding: 8px 0;
    }

    .form-page .site-header .language-switcher {
        margin: 0;
    }

    .site-header .main-nav .language-switcher {
        justify-content: space-between;
        margin-top: 8px;
        padding: 10px 5px;
    }

    .language-switcher select {
        min-width: 105px;
    }

    html[dir="rtl"] .dash-main {
        margin-right: 0;
    }

    html[dir="rtl"] .dash-sidebar {
        transform: translateX(100%);
        border-left: 0;
        box-shadow: none;
    }

    html[dir="rtl"] .dash-sidebar.open {
        transform: translateX(0);
        box-shadow: -10px 0 30px #17233d20;
    }

    html[dir="rtl"] .dash-top-left {
        flex-direction: row-reverse;
    }
}
