    :root {
      color-scheme: light dark;
      --bg: #f7f7f2;
      --surface: #ffffff;
      --surface-soft: #eef3ef;
      --ink: #17211d;
      --muted: #52615a;
      --line: #d8dfda;
      --brand: #123d32;
      --brand-deep: #0c2c24;
      --brand-soft: #dcebe4;
      --gold: #c7963e;
      --gold-soft: #f6ead2;
      --white: #ffffff;
      --danger: #9e2f2f;
      --shadow: 0 18px 50px rgba(24, 51, 42, .10);
      --radius-sm: 10px;
      --radius-md: 18px;
      --radius-lg: 28px;
    }

    @media (prefers-color-scheme: dark) {
      :root {
        --bg: #0e1714;
        --surface: #17231f;
        --surface-soft: #1d2d27;
        --ink: #f2f6f3;
        --muted: #b8c6bf;
        --line: #32483f;
        --brand: #8bc8aa;
        --brand-deep: #b8e3cf;
        --brand-soft: #1f3b30;
        --gold: #e1b867;
        --gold-soft: #3b311f;
        --white: #08110e;
        --danger: #ffaaa4;
        --shadow: 0 18px 50px rgba(0, 0, 0, .28);
      }
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      min-width: 0;
      padding-top: 73px;
      background: var(--bg);
      color: var(--ink);
      font-family: "Manrope", sans-serif;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
    }
    button, input, select, textarea { font: inherit; }
    img { display: block; max-width: 100%; }
    a { color: inherit; }
    .shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
    .topbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 30;
      background: color-mix(in srgb, var(--bg) 93%, transparent);
      border-bottom: 1px solid var(--line);
      backdrop-filter: blur(12px);
    }
    [data-page] { scroll-margin-top: 85px; }
    .topbar-inner {
      min-height: 72px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
    }
    .brand {
      display: inline-flex;
      align-items: center;
      gap: 11px;
      color: var(--brand-deep);
      text-decoration: none;
      font-family: "Libre Baskerville", serif;
      font-size: .94rem;
      font-weight: 700;
      line-height: 1.2;
      white-space: nowrap;
    }
    .brand-logo {
      width: 48px;
      height: 48px;
      object-fit: cover;
      border-radius: 50%;
      border: 2px solid var(--gold);
      background: #fff;
    }
    nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
    .topbar-inner #logout-btn { order: 3; margin-left: auto; flex-shrink: 0; }
    .nav-link {
      text-decoration: none;
      color: var(--muted);
      font-size: .87rem;
      font-weight: 700;
      padding: 9px 12px;
      border-radius: 9px;
    }
    .nav-link:hover, .nav-link[aria-current="page"] { color: var(--brand-deep); background: var(--brand-soft); }
    .nav-link.action { background: var(--brand-deep); color: var(--white); margin-left: 4px; }
    .nav-link.action:hover, .nav-link.action[aria-current="page"] { background: var(--gold); color: #17211d; }
    .lang-switcher {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      background: var(--surface-soft);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 3px;
      flex-shrink: 0;
    }
    .lang-switcher button {
      border: 0;
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: .74rem;
      font-weight: 700;
      padding: 6px 11px;
      border-radius: 999px;
      cursor: pointer;
      line-height: 1.2;
    }
    .lang-switcher button:hover { color: var(--brand-deep); }
    .lang-switcher button.active { background: var(--brand-deep); color: var(--white); }
    [dir="rtl"] body { font-family: "Noto Naskh Arabic", "Manrope", sans-serif; }
    [dir="rtl"] .hero-actions .btn svg { transform: scaleX(-1); }
    [dir="rtl"] .topbar-inner, [dir="rtl"] nav { letter-spacing: 0; }

    main { min-height: calc(100vh - 150px); }
    .page { display: none; animation: pageIn .28s ease both; }
    .page.active { display: block; }
    @keyframes pageIn { from { opacity: .3; } to { opacity: 1; } }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .page { animation: none; } }

    .hero {
      display: grid;
      grid-template-columns: minmax(0, .82fr) minmax(460px, 1.18fr);
      gap: 46px;
      align-items: center;
      padding: 62px 0 58px;
    }
    .hero-copy { max-width: 620px; }
    .demo-badge {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      background: var(--gold-soft);
      color: var(--brand-deep);
      border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
      border-radius: 999px;
      padding: 8px 13px;
      margin: 0 0 18px;
      font-size: .82rem;
      font-weight: 800;
    }
    .demo-badge svg { width: 17px; height: 17px; color: var(--gold); flex: 0 0 auto; }
    .pricing-demo { margin: 0 0 24px; }
    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--brand-deep);
      font-weight: 700;
      font-size: .84rem;
      letter-spacing: .03em;
      margin-bottom: 18px;
    }
    .eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold); }
    h1, h2, h3 { font-family: "Libre Baskerville", serif; line-height: 1.18; margin-top: 0; }
    h1 { font-size: clamp(2.5rem, 6vw, 4.9rem); letter-spacing: -.045em; margin-bottom: 22px; }
    h2 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.035em; margin-bottom: 16px; }
    h3 { font-size: 1.2rem; margin-bottom: 10px; }
    .lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; margin: 0 0 30px; }
    .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
    .hero-link { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; padding: 12px 6px; white-space: nowrap; }
    .hero-link:hover { color: var(--ink); }
    .btn {
      border: 1px solid transparent;
      border-radius: 11px;
      padding: 13px 18px;
      text-decoration: none;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      min-height: 48px;
    }
    .btn-primary { background: var(--brand-deep); color: var(--white); }
    .btn-primary:hover { background: var(--gold); color: #17211d; }
    .btn-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
    .btn-secondary:hover { border-color: var(--brand); color: var(--brand-deep); }
    .hero-visual { position: relative; margin: 0; min-width: 0; }
    .hero-visual::before {
      content: "";
      position: absolute;
      inset: -14px 22px 14px -14px;
      border: 1px solid var(--gold);
      border-radius: 34px 12px 34px 12px;
      z-index: -1;
    }
    .hero-photo {
      width: 100%;
      height: auto;
      aspect-ratio: 2048 / 1143;
      object-fit: contain;
      border-radius: 28px 8px 28px 8px;
      box-shadow: var(--shadow);
    }
    .trust-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      border-block: 1px solid var(--line);
      background: var(--surface);
    }
    .trust-item { padding: 26px 28px; display: flex; gap: 14px; align-items: flex-start; }
    .trust-item + .trust-item { border-left: 1px solid var(--line); }
    .trust-icon { width: 38px; height: 38px; flex: 0 0 38px; color: var(--gold); }
    .trust-item strong { display: block; color: var(--ink); margin-bottom: 2px; }
    .trust-item span { color: var(--muted); font-size: .88rem; }

    .section { padding: 78px 0; }
    .section.tint { background: var(--surface-soft); }
    .section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
    .section-head p { color: var(--muted); max-width: 560px; margin: 0; }
    .teaser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 24px; }
    .teaser-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform .15s ease, border-color .15s ease; }
    .teaser-card:hover { transform: translateY(-3px); border-color: var(--gold); }
    .teaser-icon { font-size: 2rem; line-height: 1; }
    .teaser-card strong { font-size: .95rem; text-align: center; }
    .teaser-cta { text-align: center; }
    .course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .course-card {
      background: var(--surface);
      border-top: 3px solid var(--brand);
      padding: 26px;
      min-height: 192px;
      box-shadow: 0 8px 24px rgba(24, 51, 42, .05);
    }
    .course-card:nth-child(2n) { border-top-color: var(--gold); }
    .course-number { color: var(--gold); font-weight: 800; font-size: .78rem; margin-bottom: 20px; }
    .course-card p { color: var(--muted); font-size: .9rem; margin: 0; }

    .price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .price-card { background: var(--surface); border: 1px solid var(--line); padding: 34px; border-radius: var(--radius-md); position: relative; }
    .price-card.featured { background: var(--brand-deep); color: var(--white); border-color: transparent; }
    .plan-label { color: var(--gold); font-weight: 800; margin-bottom: 8px; }
    .price { display: flex; align-items: end; gap: 8px; margin-bottom: 22px; }
    .price strong { font-family: "Libre Baskerville", serif; font-size: 3rem; line-height: 1; }
    .price span { color: var(--muted); }
    .featured .price span, .featured .plan-note { color: color-mix(in srgb, var(--white) 70%, transparent); }
    .plan-list { list-style: none; padding: 0; margin: 0 0 28px; }
    .plan-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
    .featured .plan-list li { border-color: color-mix(in srgb, var(--white) 20%, transparent); }
    .plan-list li::before { content: "✓"; color: var(--gold); font-weight: 900; }
    .plan-note { color: var(--muted); font-size: .8rem; margin-top: 14px; }
    .featured .btn { background: var(--gold); color: #17211d; }
    .pay-methods { margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 30px; }
    .pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
    .pay-badge { display: flex; align-items: center; gap: 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 700; font-size: .95rem; }
    .pay-letter { width: 38px; height: 38px; border-radius: 50%; background: var(--pc, var(--brand-deep)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; flex: none; }
    .pay-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; padding: 16px 18px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-sm); }
    .pay-strip-label { font-weight: 800; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin-inline-end: 6px; }
    .pay-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding-top: 6px; padding-bottom: 6px; padding-inline-start: 6px; padding-inline-end: 12px; font-size: .82rem; font-weight: 700; }
    .pay-chip i { width: 24px; height: 24px; border-radius: 50%; background: var(--pc, var(--brand-deep)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: .75rem; }

    .live-portal { background: var(--brand-deep); color: var(--white); border-radius: var(--radius-md); padding: 44px 36px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
    .live-portal::before { content: ""; position: absolute; inset-inline-end: -70px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,55,.22), transparent 70%); pointer-events: none; }
    .live-portal .eyebrow { color: var(--gold); }
    .live-portal h2 { color: var(--white); }
    .live-portal .section-head p { color: color-mix(in srgb, var(--white) 78%, transparent); }
    .live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; position: relative; }
    .live-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-sm); padding: 26px; display: grid; gap: 10px; align-content: start; }
    .live-card .live-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(212,175,55,.16); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
    .live-card h3 { margin: 0; color: var(--white); font-size: 1.15rem; }
    .live-card p { margin: 0; color: color-mix(in srgb, var(--white) 72%, transparent); font-size: .92rem; }
    .live-card .btn { justify-self: start; margin-top: 8px; }
    .live-card .btn-whatsapp { background: #25d366; color: #0b3d20; }
    .live-card .btn-whatsapp:hover { background: #1fb857; color: #0b3d20; }
    @media (max-width: 680px) {
      .live-portal { padding: 30px 22px; }
      .live-grid { grid-template-columns: 1fr; }
    }

    .page-intro { padding: 70px 0 42px; border-bottom: 1px solid var(--line); }
    .page-intro p { color: var(--muted); max-width: 68ch; font-size: 1.05rem; }
    .page-purpose { display: inline-block; margin-top: 12px; padding: 7px 16px; background: rgba(199,150,62,.12); border: 1.5px solid var(--gold); border-radius: 999px; font-size: .88rem; color: var(--ink); font-weight: 600; }
    .about-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
    .about-more-card { display: flex; flex-direction: column; gap: 6px; padding: 22px 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform .15s ease, border-color .15s ease; }
    .about-more-card:hover { transform: translateY(-3px); border-color: var(--gold); }
    .about-more-icon { font-size: 1.8rem; line-height: 1; }
    .about-more-card strong { font-size: 1.05rem; }
    .about-more-card span:last-child { color: var(--muted); font-size: .92rem; }
    .dash-hijri { display: inline-block; margin-top: 12px; padding: 8px 18px; background: rgba(199,150,62,.12); border: 1.5px solid var(--gold); border-radius: 999px; color: var(--gold); font-weight: 700; font-size: .95rem; }
    .about-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; align-items: start; }
    .statement { font-family: "Libre Baskerville", serif; font-size: 1.55rem; line-height: 1.5; color: var(--brand-deep); margin: 0; }
    .detail-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
    .detail-row { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
    .detail-row svg { color: var(--gold); width: 28px; height: 28px; margin-top: 3px; }
    .detail-row p { margin: 4px 0 0; color: var(--muted); }
    .about-teaching { padding-top: 62px; }
    .about-info-grid { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 24px; margin-top: 34px; }
    .about-panel { background: var(--surface); border: 1px solid var(--line); padding: 30px; }
    .about-panel.schedule { border-top: 3px solid var(--gold); }
    .about-panel.benefits { border-top: 3px solid var(--brand); }
    .about-panel h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); margin-bottom: 12px; }
    .about-panel p { margin: 0; color: var(--muted); }
    .benefit-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
    .benefit-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); }
    .benefit-list li::before { content: "✓"; color: var(--gold); font-weight: 900; }
    .cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

    .portfolio-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
    .portfolio-item { background: var(--surface); display: grid; grid-template-columns: 78px 1fr auto; gap: 20px; align-items: center; padding: 24px; }
    .portfolio-code { font-family: "Libre Baskerville", serif; color: var(--gold); font-size: 1.25rem; }
    .portfolio-item p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
    .level-tag { color: var(--brand-deep); background: var(--brand-soft); padding: 7px 10px; border-radius: 8px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
    .founder-profile {
      display: grid;
      grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
      gap: 52px;
      align-items: start;
    }
    .founder-portrait {
      margin: 0 0 28px;
      padding: 8px;
      background: var(--surface);
      border: 1px solid var(--gold);
      box-shadow: var(--shadow);
    }
    .founder-portrait img {
      width: 100%;
      height: clamp(360px, 42vw, 520px);
      object-fit: cover;
      object-position: center 38%;
    }
    .founder-intro { border-top: 3px solid var(--gold); padding-top: 24px; }
    .founder-intro h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
    .founder-location { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; color: var(--muted); font-size: .92rem; }
    .founder-location svg { width: 21px; height: 21px; flex: 0 0 auto; color: var(--gold); margin-top: 2px; }
    .founder-story { font-size: 1.02rem; }
    .founder-story > p { color: var(--muted); margin: 0 0 20px; }
    .founder-promise { margin: 28px 0 0; padding: 25px 28px; background: var(--brand-deep); color: var(--white); border-radius: 4px 20px 4px 20px; }
    .founder-promise strong { display: block; margin-bottom: 8px; color: var(--gold); font-size: .82rem; letter-spacing: .02em; }
    .founder-promise p { margin: 0; font-family: "Libre Baskerville", serif; font-size: 1.16rem; line-height: 1.55; }

    .certificate-empty {
      border: 1px solid var(--line);
      background: var(--surface);
      padding: 44px;
      display: grid;
      grid-template-columns: 70px 1fr auto;
      gap: 24px;
      align-items: center;
      border-radius: var(--radius-md);
    }
    .certificate-mark { width: 70px; height: 70px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); border-radius: 50%; }
    .certificate-mark svg { width: 35px; height: 35px; }
    .certificate-empty p { color: var(--muted); margin: 6px 0 0; }

    .contact-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 40px; align-items: start; }
    .contact-card { background: var(--brand-deep); color: var(--white); padding: 34px; border-radius: 22px 6px 22px 6px; }
    .contact-card p { color: color-mix(in srgb, var(--white) 72%, transparent); }
    .contact-links { display: grid; gap: 8px; margin: 14px 0 26px; }
    .contact-number, .contact-email { display: inline-block; width: fit-content; font-weight: 800; color: var(--gold); text-decoration: none; overflow-wrap: anywhere; }
    .contact-number { font-size: 1.15rem; }
    .contact-email { font-size: .92rem; }
    .contact-number:hover, .contact-email:hover { text-decoration: underline; text-underline-offset: 3px; }
    .contact-points { list-style: none; margin: 0; padding: 0; }
    .contact-points li { padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--white) 18%, transparent); }
    .form-card { background: var(--surface); border: 1px solid var(--line); padding: 34px; border-radius: var(--radius-md); }
    .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .field { display: grid; gap: 7px; }
    .field.full { grid-column: 1 / -1; }
    .field .opt { color: var(--muted); font-weight: 400; font-size: .82em; }
    label { font-size: .82rem; font-weight: 800; }
    input, select, textarea {
      width: 100%;
      border: 1px solid var(--line);
      background: var(--bg);
      color: var(--ink);
      border-radius: 9px;
      padding: 12px 13px;
      outline: none;
    }
    input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
    textarea { min-height: 108px; resize: vertical; }
    .form-actions { margin-top: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
    .form-note { font-size: .77rem; color: var(--muted); margin: 0; }
    .error { color: var(--danger); font-size: .8rem; margin: 10px 0 0; min-height: 1.2em; }
    .account-nav { display: inline-flex; align-items: center; gap: 4px; }
    .nav-button { border: 0; background: transparent; cursor: pointer; }
    .auth-wrap { width: min(620px, 100%); margin-inline: auto; }
    .auth-card, .dashboard-card, .admin-card, .profile-card {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 34px;
      box-shadow: 0 10px 34px rgba(24, 51, 42, .06);
    }
    /* My Profile */
    .profile-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
    .profile-avatar {
      width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
      border: 3px solid var(--gold); background: var(--surface-soft);
      display: flex; align-items: center; justify-content: center;
      font-family: "Libre Baskerville", serif; font-size: 2.6rem; font-weight: 700;
      color: var(--brand-deep); overflow: hidden;
    }
    .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .avatar-upload-btn { cursor: pointer; }
    .profile-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
    @media (max-width: 640px) { .profile-grid-2 { grid-template-columns: 1fr; } }
    .mini-avatar {
      width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
      border: 2px solid var(--gold-soft); background: var(--brand-deep); color: #fff;
      display: inline-flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: .85rem; font-family: "Libre Baskerville", serif;
      overflow: hidden; vertical-align: middle;
    }
    .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .name-cell { display: flex; align-items: center; gap: 10px; }
    .auth-card h2, .dashboard-card h2, .admin-card h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
    .auth-card > p, .dashboard-card > p, .admin-card > p { color: var(--muted); }
    .auth-switch { margin: 22px 0 0; color: var(--muted); font-size: .88rem; }
    .auth-switch a { color: var(--brand-deep); font-weight: 800; text-underline-offset: 3px; }
    .status-panel { padding: 22px; background: var(--surface-soft); border-radius: var(--radius-sm); margin: 24px 0; }
    .status-panel.pending { border-left: 4px solid var(--gold); }
    .status-panel.rejected { border-left: 4px solid var(--danger); }
    .status-panel.approved { border-left: 4px solid var(--brand); }
    .status-panel h3 { margin-bottom: 7px; }
    .status-panel p { color: var(--muted); margin: 0 0 16px; }
    .profile-grid, .stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .profile-item, .stat-box { background: var(--surface-soft); padding: 18px; border-radius: var(--radius-sm); }
    .profile-item span, .stat-box span { display: block; color: var(--muted); font-size: .75rem; font-weight: 800; margin-bottom: 5px; }
    .profile-item strong { overflow-wrap: anywhere; }
    .stat-box strong { font-family: "Libre Baskerville", serif; font-size: 1.9rem; }
    .lesson-area { margin-top: 34px; }
    .lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .lesson-card { background: var(--surface-soft); padding: 24px; border-top: 3px solid var(--brand); }
    .lesson-card:nth-child(2n) { border-top-color: var(--gold); }
    .lesson-label { color: var(--gold); font-size: .76rem; font-weight: 800; margin-bottom: 12px; }
    .lesson-list { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
    .lesson-list li { margin: 8px 0; }
    .course-book {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      margin-top: 24px;
      border: 4px double var(--gold);
      background: var(--surface);
      box-shadow: 0 10px 25px rgba(21, 56, 45, .09);
    }
    .course-book::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      opacity: .055;
      background:
        repeating-conic-gradient(from 45deg at 12px 12px, var(--gold) 0 10deg, transparent 10deg 35deg, var(--gold) 35deg 45deg),
        repeating-conic-gradient(from 225deg at 36px 36px, var(--gold) 0 10deg, transparent 10deg 35deg, var(--gold) 35deg 45deg);
      background-size: 48px 48px;
    }
    .book-band {
      position: relative;
      overflow: hidden;
      display: grid;
      grid-template-columns: 42px 1fr;
      gap: 13px;
      align-items: center;
      padding: 17px 18px;
      background: #0e3b2f;
      color: #fff;
      border-bottom: 2px solid var(--gold);
    }
    .book-band::after {
      content: "";
      position: absolute;
      right: -26px;
      top: 50%;
      width: 110px;
      height: 78px;
      transform: translateY(-50%);
      border: 1px solid rgba(225, 184, 103, .28);
      border-radius: 55px 55px 0 0;
      box-shadow: inset 0 0 0 8px rgba(225, 184, 103, .05);
    }
    .book-icon {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border: 1px solid var(--gold);
      border-radius: 50% 50% 8px 8px;
      background: rgba(255, 255, 255, .06);
      font-size: 1.35rem;
      line-height: 1;
    }
    .book-band h4 { position: relative; z-index: 1; margin: 0; font-family: "Libre Baskerville", serif; font-size: 1rem; line-height: 1.35; }
    .book-body { padding: 17px 18px 18px; }
    .book-caption { margin: 0 0 14px; color: var(--muted); font-size: .78rem; }
    .book-actions { display: flex; gap: 9px; flex-wrap: wrap; }
    .book-actions .btn { min-height: 40px; padding: 9px 13px; font-size: .78rem; }
    .sample-note { color: var(--muted); font-size: .78rem; margin-top: 20px; }
    body.book-modal-open { overflow: hidden; }
    .book-modal {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: flex;
      background: rgba(4, 15, 11, .86);
      padding: 12px;
    }
    .book-modal-panel {
      width: 100%;
      height: calc(100dvh - 24px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: var(--surface);
      border: 4px double var(--gold);
      box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
    }
    .book-modal-header {
      position: relative;
      overflow: hidden;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 15px 18px;
      background: #0e3b2f;
      color: #fff;
      border-bottom: 2px solid var(--gold);
    }
    .book-modal-header::after {
      content: "";
      position: absolute;
      right: 72px;
      bottom: -32px;
      width: 110px;
      height: 72px;
      border: 1px solid rgba(225, 184, 103, .32);
      border-radius: 55px 55px 0 0;
    }
    .book-modal-heading { min-width: 0; display: flex; align-items: center; gap: 12px; }
    .book-modal-heading span { color: var(--gold); font-size: 1.35rem; line-height: 1; }
    .book-modal-heading h2 { margin: 0; font-size: clamp(1rem, 2.4vw, 1.45rem); letter-spacing: -.01em; overflow-wrap: anywhere; }
    .book-modal-close {
      position: relative;
      z-index: 1;
      flex: 0 0 auto;
      width: 42px;
      height: 42px;
      border: 1px solid rgba(255, 255, 255, .45);
      border-radius: 50%;
      background: transparent;
      color: #fff;
      cursor: pointer;
      font-size: 1.25rem;
      line-height: 1;
    }
    .book-modal-close:hover { background: var(--gold); color: #17211d; border-color: var(--gold); }
    .book-toolbar {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      padding: 10px 14px;
      background: var(--surface-soft);
      border-bottom: 1px solid var(--line);
    }
    .book-tool {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 7px 11px;
      background: var(--surface);
      color: var(--ink);
      font-weight: 800;
      font-size: .76rem;
      cursor: pointer;
    }
    .book-tool:hover, .book-tool[aria-pressed="true"] { border-color: var(--gold); color: var(--brand-deep); background: var(--gold-soft); }
    .book-tool svg { width: 17px; height: 17px; }
    .book-zoom-value { min-width: 54px; text-align: center; color: var(--muted); font-size: .76rem; font-weight: 800; }
    .book-draw-toggle[aria-pressed="true"] { background: var(--brand-deep); color: var(--white); border-color: var(--brand-deep); }
    .book-annotation-tools { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-left: 8px; border-left: 1px solid var(--line); }
    .book-ink {
      width: 36px;
      height: 36px;
      display: inline-grid;
      place-items: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0;
      background: var(--surface);
      cursor: pointer;
    }
    .book-ink::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-color); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .16); }
    .book-ink:hover, .book-ink[aria-pressed="true"] { border-color: var(--gold); outline: 2px solid var(--gold); outline-offset: 1px; }
    .book-size { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 0; background: var(--surface); cursor: pointer; }
    .book-size::before { content: ""; width: var(--dot, 6px); height: var(--dot, 6px); border-radius: 50%; background: var(--brand-deep); }
    .book-size:hover, .book-size[aria-pressed="true"] { border-color: var(--gold); outline: 2px solid var(--gold); outline-offset: 1px; }
    .book-tool-fullscreen { margin-left: auto; background: var(--brand-deep); color: var(--white); border-color: var(--brand-deep); }
    .book-viewer-region { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #fff; }
    .book-viewer-shell { width: 100%; height: 100%; overflow: auto; background: #fff; }
    .book-viewer { display: block; width: 100%; height: 100%; min-height: 100%; border: 0; background: #fff; transform: scale(var(--book-zoom, 1)); transform-origin: top left; }
    .book-annotation-canvas {
      position: absolute;
      inset: 0;
      z-index: 3;
      display: block;
      width: 100%;
      height: 100%;
      pointer-events: none;
      touch-action: none;
    }
    .book-annotation-canvas.is-active { pointer-events: auto; cursor: crosshair; }
    .book-modal-panel.teaching-fullscreen { position: fixed; inset: 0; z-index: 110; height: 100dvh; border-width: 0; }
    .book-fallback { flex: 0 0 auto; margin: 0; padding: 10px 16px; background: var(--surface-soft); color: var(--muted); text-align: center; font-size: .78rem; border-top: 1px solid var(--line); }
    .book-fallback a { color: var(--brand-deep); font-weight: 800; text-underline-offset: 3px; }
    .live-class-area { margin-top: 34px; }
    .live-class-area .section-head { margin-bottom: 22px; }
    .live-class-area .section-head h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
    .live-class-grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: stretch; }
    .live-class-card { overflow: hidden; background: var(--surface-soft); border-top: 3px solid var(--brand); }
    .live-class-card.backup { border-top-color: var(--gold); padding-bottom: 22px; }
    .live-class-card.backup .backup-form { max-width: 560px; }
    .live-class-card-head { display: grid; grid-template-columns: 44px 1fr; gap: 13px; align-items: start; padding: 20px 22px; }
    .classroom-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
    .classroom-body > * { min-width: 0; }
    .student-chat-panel { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); }
    .student-chat-head { padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
    .student-chat-head strong { display: block; font-family: "Libre Baskerville", serif; font-size: .96rem; }
    .student-chat-head span { display: block; margin-top: 2px; color: var(--muted); font-size: .7rem; }
    .student-chat-messages { flex: 1 1 0; min-height: 220px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
    .chat-empty { margin: auto; max-width: 24ch; color: var(--muted); text-align: center; font-size: .78rem; }
    .chat-message { align-self: flex-start; max-width: 88%; }
    .chat-message.mine { align-self: flex-end; }
    .chat-message-meta { margin: 0 4px 3px; color: var(--muted); font-size: .64rem; font-weight: 800; }
    .chat-message.mine .chat-message-meta { text-align: right; }
    .chat-message-bubble { padding: 9px 11px; border-radius: 4px 12px 12px 12px; background: var(--surface-soft); color: var(--ink); font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
    .chat-message.mine .chat-message-bubble { border-radius: 12px 4px 12px 12px; background: var(--brand-deep); color: var(--white); }
    .student-chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 11px; border-top: 1px solid var(--line); background: var(--surface-soft); }
    .student-chat-form input { min-width: 0; padding: 9px 10px; background: var(--surface); font-size: .78rem; }
    .student-chat-form .btn { min-height: 40px; padding: 8px 12px; font-size: .75rem; }
    .student-chat-form input:disabled, .student-chat-form button:disabled { opacity: .55; cursor: not-allowed; }
    .student-chat-feedback { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--muted); font-size: .68rem; }
    .student-chat-feedback:not(:empty) { margin-top: -2px; }
    .live-class-card-head svg { width: 30px; height: 30px; color: var(--gold); margin-top: 2px; }
    .live-class-card-head h3 { margin: 0 0 5px; }
    .live-class-card-head p { margin: 0; color: var(--muted); font-size: .84rem; }
    .live-video-stage { position: relative; height: clamp(440px, 66vh, 780px); display: block; overflow: hidden; background: #07110e; color: #fff; }
    .live-video-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
    .live-video-placeholder { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(470px, 92%); max-width: 470px; padding: 34px 28px; text-align: center; }
    .live-video-placeholder svg { width: 54px; height: 54px; color: var(--gold); margin-bottom: 15px; }
    .live-video-placeholder h3 { margin-bottom: 8px; color: #fff; }
    .live-video-placeholder p { margin: 0 0 20px; color: #c8d6d0; font-size: .85rem; }
    .live-class-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 16px; background: #0e3b2f; border-top: 1px solid rgba(255,255,255,.16); }
    .live-class-controls .btn { min-height: 40px; padding: 8px 13px; font-size: .78rem; }
    .live-class-controls .btn:disabled { opacity: .48; cursor: not-allowed; }
    .live-chat-button { border-color: var(--gold); background: transparent; color: #fff; }
    .live-chat-button:hover:not(:disabled) { background: var(--gold); color: #17211d; }
    .live-class-status { margin: 0; color: #dbe8e2; font-size: .75rem; flex: 1 1 220px; }
    .backup-form { display: grid; gap: 11px; padding: 0 22px; }
    .backup-form label { color: var(--ink); }
    .backup-form .btn { width: 100%; }
    .backup-help { margin: 0; color: var(--muted); font-size: .78rem; }
    .provider-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 22px 14px; }
    .provider-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: var(--surface); color: var(--muted); font-size: .73rem; font-weight: 800; }
    .provider-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
    .provider-chip:last-child .provider-dot { background: var(--gold); }
    .live-privacy-note { margin: 12px 22px 0; color: var(--muted); font-size: .72rem; }
    .teaching-area { margin-top: 46px; padding-top: 38px; border-top: 1px solid var(--line); }
    .teaching-area .section-head { margin-bottom: 22px; }
    .teaching-area .section-head h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
    .whiteboard-card { overflow: hidden; border: 4px double var(--gold); background: var(--surface); box-shadow: 0 10px 25px rgba(21, 56, 45, .09); }
    .whiteboard-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 12px 14px; background: #0e3b2f; color: #fff; border-bottom: 2px solid var(--gold); }
    .tool-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
    .tool-label { margin-right: 2px; color: #dbe8e2; font-size: .74rem; font-weight: 800; }
    .color-tool, .board-tool, .size-tool {
      min-width: 40px;
      min-height: 40px;
      display: inline-grid;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, .42);
      border-radius: 8px;
      background: rgba(255, 255, 255, .06);
      color: #fff;
      cursor: pointer;
      font-size: .76rem;
      font-weight: 800;
    }
    .color-tool { width: 40px; padding: 0; }
    .color-tool::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--pen-color); border: 2px solid #fff; }
    .size-tool { width: 40px; padding: 0; }
    .size-tool::before { content: ""; width: var(--dot, 6px); height: var(--dot, 6px); border-radius: 50%; background: #fff; }
    .color-tool[aria-pressed="true"], .board-tool[aria-pressed="true"], .board-tool:hover, .color-tool:hover, .size-tool[aria-pressed="true"], .size-tool:hover { outline: 2px solid var(--gold); outline-offset: 1px; background: rgba(255, 255, 255, .15); }
    .board-tool { display: inline-flex; gap: 7px; padding: 7px 11px; }
    .board-tool svg { width: 17px; height: 17px; }
    .board-expand { margin-left: auto; }
    .whiteboard-canvas-wrap { height: min(58vh, 560px); min-height: 350px; background: #fff; }
    .whiteboard-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; background: #fff; }
    .whiteboard-card:fullscreen, .whiteboard-card.board-fullscreen { width: 100vw; height: 100dvh; display: flex; flex-direction: column; background: #fff; }
    .whiteboard-card:fullscreen .whiteboard-canvas-wrap, .whiteboard-card.board-fullscreen .whiteboard-canvas-wrap { flex: 1 1 auto; height: auto; min-height: 0; }
    .whiteboard-note { margin: 10px 14px 13px; color: var(--muted); font-size: .76rem; }
    .success-box { background: var(--brand-soft); border: 1px solid var(--brand); padding: 24px; border-radius: var(--radius-sm); }
    .success-box p { color: var(--muted); }
    .hidden { display: none !important; }
    .loading-state { padding: 30px; text-align: center; color: var(--muted); }
    .admin-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 26px; }
    .admin-head h2 { margin-bottom: 0; }
    .table-wrap { margin-top: 24px; border: 1px solid var(--line); overflow: hidden; }
    .student-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
    .student-table th, .student-table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
    .student-table th { background: var(--surface-soft); color: var(--muted); font-size: .72rem; }
    .student-table tr:last-child td { border-bottom: 0; }
    .status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--surface-soft); font-weight: 800; font-size: .7rem; text-transform: capitalize; }
    .teacher-select,.course-select{max-width:170px}
    .analysis-sub { margin: 26px 0 12px; font-size: 1.15rem; }
    .analysis-sub2 { margin: 20px 0 8px; font-size: 1rem; }
    .analysis-list { margin-bottom: 8px; }
    .analysis-note { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
        .teacher-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #e3e8e4}
        .teacher-meta{color:#5b6b60;font-size:.88rem}
        .status-pill.approved { background: var(--brand-soft); color: var(--brand-deep); }
    .status-pill.pending { background: var(--gold-soft); color: var(--ink); }
    .status-pill.rejected { color: var(--danger); }
    .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
    .btn-small { min-height: 34px; padding: 7px 10px; border-radius: 7px; font-size: .72rem; }
    .btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
    .empty-state { padding: 28px; text-align: center; color: var(--muted); }

    .cta-band { background: var(--gold-soft); border-block: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); }
    .cta-inner { padding: 42px 0; display: flex; justify-content: space-between; gap: 30px; align-items: center; }
    .cta-inner h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); margin-bottom: 8px; }
    .cta-inner p { color: var(--muted); margin: 0; }
    footer { border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--muted); font-size: .8rem; }
    .footer-inner { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
    .footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; }
    .footer-brand img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; border: 1px solid var(--gold); background: #fff; }
    .footer-brand span { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; }
    .footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
    .footer-links a { text-underline-offset: 3px; }

    @media (max-width: 900px) {
      .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 52px; }
      .hero-visual { max-width: 760px; }
      .course-grid { grid-template-columns: repeat(2, 1fr); }
      .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .about-grid, .about-info-grid, .contact-layout, .founder-profile { grid-template-columns: 1fr; gap: 36px; }
      .founder-portrait img { height: min(74vw, 540px); }
    }
    @media (max-width: 680px) {
      .shell { width: min(100% - 28px, 1180px); }
      .topbar-inner { padding: 10px 0; align-items: center; flex-direction: column; gap: 8px; }
      .brand-logo { width: 42px; height: 42px; }
      nav { width: 100%; justify-content: center; gap: 2px; }
      .nav-link { font-size: .72rem; padding: 7px 8px; }
      .nav-link.action { margin-left: 0; }
      .hero { padding: 42px 0 52px; }
      h1 { font-size: 2.65rem; }
      .trust-row { grid-template-columns: 1fr; }
      .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
      .section { padding: 58px 0; }
      .section-head { display: block; }
      .course-grid, .price-grid, .benefit-list { grid-template-columns: 1fr; }
      .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .pay-methods { padding: 22px; }
      .course-card { min-height: 0; }
      .about-teaching { padding-top: 46px; }
      .about-panel { padding: 24px; }
      .cta-actions { width: 100%; }
      .cta-actions .btn { width: 100%; }
      .page-intro { padding-top: 52px; }
      .portfolio-item { grid-template-columns: 54px 1fr; }
      .level-tag { grid-column: 2; justify-self: start; }
      .certificate-empty { grid-template-columns: 56px 1fr; padding: 26px; }
      .certificate-mark { width: 56px; height: 56px; }
      .certificate-empty .btn { grid-column: 1 / -1; width: 100%; }
      .form-grid { grid-template-columns: 1fr; }
      .field.full { grid-column: auto; }
      .contact-card, .form-card, .price-card { padding: 26px; }
      .cta-inner { align-items: flex-start; flex-direction: column; }
      .cta-inner .btn { width: 100%; }
      .footer-inner { align-items: flex-start; flex-direction: column; }
      .account-nav { width: 100%; justify-content: center; }
      .auth-card, .dashboard-card, .admin-card { padding: 24px; }
      .profile-grid, .stats-grid, .lesson-grid { grid-template-columns: 1fr; }
      .lesson-card { padding: 20px; }
      .book-actions { display: grid; grid-template-columns: 1fr; }
      .book-actions .btn { width: 100%; }
      .book-modal { padding: 0; }
      .book-modal-panel { height: 100dvh; border-width: 0; }
      .book-modal-header { padding: 12px 14px; }
      .book-modal-heading { gap: 9px; }
      .book-modal-close { width: 40px; height: 40px; }
      .book-toolbar { padding: 8px; gap: 6px; align-items: stretch; }
      .book-tool { min-height: 40px; padding: 7px 9px; }
      .book-annotation-tools { order: 2; width: 100%; padding: 7px 0 0; border-left: 0; border-top: 1px solid var(--line); }
      .book-ink { width: 40px; height: 40px; }
      .book-tool-fullscreen { margin-left: 0; }
      .book-fallback { padding: 9px 12px; }
      .live-class-grid { grid-template-columns: 1fr; }
      .classroom-body { grid-template-columns: 1fr; }
      .live-video-stage { height: 76dvh; min-height: 500px; }
      .student-chat-panel { border-left: 0; border-top: 1px solid var(--line); }
      .student-chat-messages { min-height: 230px; max-height: 300px; }
      .live-class-card-head { padding: 18px; }
      .backup-form { padding: 0 18px; }
      .provider-row { padding-inline: 18px; }
      .live-privacy-note { margin-inline: 18px; }
      .teaching-area { margin-top: 38px; padding-top: 30px; }
      .whiteboard-toolbar { padding: 10px; gap: 8px; }
      .tool-group { width: 100%; }
      .board-expand { margin-left: 0; }
      .whiteboard-canvas-wrap { height: 56vh; min-height: 360px; }
      .whiteboard-note { margin-inline: 10px; }
      .admin-head { align-items: flex-start; flex-direction: column; }
      .table-wrap { border: 0; overflow: visible; }
      .student-table, .student-table tbody, .student-table tr, .student-table td { display: block; width: 100%; }
      .student-table thead { display: none; }
      .student-table tr { background: var(--surface-soft); margin-bottom: 14px; padding: 14px; }
      .student-table td { border: 0; padding: 6px 0; display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
      .student-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 800; }
    }

    /* ---- Fluid responsive: every screen size ---- */
    html, body { overflow-x: clip; }
    @media (min-width: 901px) and (max-width: 1100px) {
      .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .hero { gap: 36px; }
    }

    /* ---- App-style hamburger slide menu (mobile) ---- */
    .menu-toggle { display: none; }
    .nav-drawer { display: contents; }
    .drawer-head, .drawer-backdrop, .drawer-lang { display: none; }
    .menu-toggle {
      width: 44px;
      height: 44px;
      border: 1px solid var(--line);
      background: var(--surface-soft);
      border-radius: 12px;
      cursor: pointer;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      flex-shrink: 0;
    }
    .menu-toggle span {
      display: block;
      width: 20px;
      height: 2px;
      background: var(--brand-deep);
      border-radius: 2px;
      transition: transform .3s ease, opacity .2s ease;
    }
    body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
    body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* ---- Admin notification center (header bell) ---- */
    .header-actions { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
    .notif-bell {
      position: relative;
      width: 44px;
      height: 44px;
      border: 1px solid var(--line);
      background: var(--surface-soft);
      border-radius: 12px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--brand-deep);
      flex-shrink: 0;
    }
    .notif-bell:hover { background: var(--brand-soft); }
    .notif-bell svg { width: 22px; height: 22px; }
    .notif-badge {
      position: absolute;
      top: -7px;
      inset-inline-end: -7px;
      min-width: 21px;
      height: 21px;
      padding: 0 6px;
      background: #d13438;
      color: #fff;
      border-radius: 11px;
      font-size: 11px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      box-shadow: 0 2px 6px rgba(0,0,0,.25);
    }
    .notif-panel {
      position: absolute;
      top: calc(100% + 8px);
      inset-inline-end: 12px;
      width: min(400px, calc(100vw - 24px));
      max-height: min(70vh, 540px);
      overflow-y: auto;
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: 14px;
      box-shadow: 0 18px 50px rgba(0,0,0,.20);
      z-index: 95;
    }
    .notif-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      position: sticky;
      top: 0;
      background: var(--bg);
      z-index: 2;
    }
    .notif-head h3 { margin: 0; font-size: 1rem; }
    .notif-head-actions { display: inline-flex; align-items: center; gap: 6px; }
    .notif-link-btn {
      background: none;
      border: none;
      color: var(--brand-deep);
      cursor: pointer;
      font-size: .82rem;
      text-decoration: underline;
      padding: 6px 4px;
    }
    .notif-close {
      width: 32px;
      height: 32px;
      border: 1px solid var(--line);
      background: var(--surface-soft);
      color: var(--brand-deep);
      border-radius: 9px;
      font-size: 1.15rem;
      line-height: 1;
      cursor: pointer;
    }
    .notif-section { padding: 8px 14px 2px; }
    .notif-section-title {
      font-size: .74rem;
      text-transform: uppercase;
      letter-spacing: .07em;
      opacity: .6;
      margin: 6px 0 8px;
      font-weight: 700;
    }
    .notif-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      margin-bottom: 8px;
      background: var(--surface-soft);
    }
    .notif-item.unread { border-color: var(--brand-deep); border-width: 1.5px; }
    .notif-item.notif-greeting { border-color: #c9a227; border-width: 1.5px; background: linear-gradient(135deg, #fffdf4, #fdf6e0); }
    .notif-item-title { font-weight: 700; font-size: .92rem; margin-bottom: 2px; }
    .notif-item-sub { font-size: .82rem; opacity: .78; }
    .notif-item-time { font-size: .74rem; opacity: .6; margin-top: 5px; }
    .notif-item-actions { display: flex; gap: 8px; margin-top: 9px; }
    .notif-empty { padding: 26px 14px; text-align: center; opacity: .65; font-size: .9rem; }

    /* ---- Professional desktop header (bell at far right, one-row nav) ---- */
    @media (min-width: 901px) {
      .topbar { box-shadow: 0 1px 0 rgba(12,44,36,.04), 0 12px 32px rgba(12,44,36,.08); }
      .topbar-inner { min-height: 70px; gap: 16px; flex-wrap: nowrap; }
      .brand { order: 1; font-size: 1rem; letter-spacing: .01em; }
      .brand-logo { width: 50px; height: 50px; box-shadow: 0 3px 10px rgba(12,44,36,.18); }
      .topbar-inner nav { order: 2; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; justify-content: center; gap: 2px; }
      .nav-link { font-size: .83rem; padding: 8px 9px; white-space: nowrap; border-radius: 999px; transition: background .18s ease, color .18s ease; }
      .nav-link.action { margin-left: 6px; padding: 8px 15px; box-shadow: 0 4px 12px rgba(12,44,36,.22); }
      .topbar-inner > .lang-switcher { order: 3; box-shadow: 0 2px 8px rgba(12,44,36,.06); }
      .header-actions { order: 4; }
      .notif-bell {
        width: 42px; height: 42px;
        border-radius: 50%;
        background: #ffffff;
        border: 1px solid var(--line);
        box-shadow: 0 3px 10px rgba(12,44,36,.12);
        transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
      }
      .notif-bell:hover { background: var(--brand-soft); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(12,44,36,.16); }
      .notif-bell svg { width: 21px; height: 21px; }
      .notif-badge { top: -4px; inset-inline-end: -4px; border: 2px solid #ffffff; box-shadow: 0 2px 6px rgba(0,0,0,.22); }
    }
    @media (min-width: 901px) and (max-width: 1180px) {
      .brand { font-size: .92rem; }
      .brand-logo { width: 44px; height: 44px; }
      .nav-link { font-size: .79rem; padding: 7px 7px; }
      .nav-link.action { padding: 7px 12px; }
    }
    @media (max-width: 900px) {
      .menu-toggle { display: inline-flex; }
      .topbar-inner { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
      .topbar-inner > .lang-switcher { display: none; }
      .nav-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        height: 100vh;
        height: 100dvh;
        inset-inline-end: 0;
        width: min(330px, 88vw);
        background: var(--bg);
        z-index: 80;
        padding: 16px 18px 22px;
        gap: 10px;
        overflow-y: auto;
        box-shadow: -18px 0 50px rgba(0,0,0,.18);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform .32s cubic-bezier(.32,.72,.28,1), visibility 0s .32s;
      }
      [dir="rtl"] .nav-drawer { transform: translateX(-105%); box-shadow: 18px 0 50px rgba(0,0,0,.18); }
      body.menu-open .nav-drawer { transform: translateX(0); visibility: visible; transition: transform .32s cubic-bezier(.32,.72,.28,1); }
      .drawer-head { display: flex; align-items: center; justify-content: flex-end; }
      .drawer-close {
        width: 40px;
        height: 40px;
        border: 1px solid var(--line);
        background: var(--surface-soft);
        color: var(--brand-deep);
        border-radius: 12px;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
      }
      .nav-drawer nav { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
      .nav-drawer nav a[data-nav="home"] { order: 1; }
      .nav-drawer nav a[data-nav="admission"] { order: 2; }
      .nav-drawer nav a[data-nav="tools"] { order: 3; }
      .nav-drawer nav a[data-nav="about"] { order: 4; }
      .nav-drawer nav a[data-nav="contact"] { order: 5; }
      .nav-drawer nav .account-nav { order: 6; }
      .nav-drawer .nav-link { font-size: 1rem; padding: 13px 16px; width: 100%; text-align: start; }
      .nav-drawer .account-nav { display: flex; flex-direction: column; width: 100%; gap: 4px; }
      .drawer-lang { display: inline-flex; align-self: center; margin-top: auto; }
      .drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 20, .45);
        z-index: 70;
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility 0s .3s;
      }
      body.menu-open .drawer-backdrop { opacity: 1; visibility: visible; transition: opacity .3s ease; }
      body.menu-open { overflow: hidden; }
      body.menu-open .topbar { z-index: 90; }
    }
    /* ---- Portal header on phones: brand + Logout on row 1, nav links on row 2 ---- */
    @media (max-width: 680px) {
      body { padding-top: 104px; }
      .topbar-inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 10px 0 12px; }
      .topbar-inner .brand { order: 1; }
      .topbar-inner #logout-btn { order: 2; margin-left: auto; }
      .topbar-inner nav { order: 3; flex: 1 1 100%; width: 100%; justify-content: center; flex-wrap: nowrap; gap: 3px; }
      .topbar-inner nav .nav-link { white-space: nowrap; font-size: .72rem; padding: 7px 8px; }
    }
    /* Course cards: always stack vertically on phones */
    @media (max-width: 680px) {
      .course-grid { grid-template-columns: 1fr; }
    }

    /* ---- AI Assistant floating chat ---- */
    .ai-fab {
      position: fixed;
      bottom: 22px;
      inset-inline-end: 22px;
      width: 58px;
      height: 58px;
      border-radius: 50%;
      border: 2px solid var(--gold);
      background: var(--brand-deep);
      color: #fff;
      font-size: 26px;
      line-height: 1;
      cursor: pointer;
      z-index: 1200;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(0,0,0,.28);
      transition: transform .18s ease, background .18s ease;
    }
    .ai-fab:hover { transform: scale(1.08); background: var(--gold); color: #17211d; }
    .ai-fab .ai-fab-close { display: none; font-size: 22px; }
    .ai-fab.open .ai-fab-icon { display: none; }
    .ai-fab.open .ai-fab-close { display: inline; }
    .ai-panel {
      position: fixed;
      bottom: 92px;
      inset-inline-end: 22px;
      width: 350px;
      max-width: calc(100vw - 32px);
      height: 480px;
      max-height: calc(100dvh - 130px);
      background: var(--surface, #fff);
      border: 1px solid var(--line);
      border-radius: 18px;
      box-shadow: 0 18px 48px rgba(0,0,0,.3);
      z-index: 1200;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      opacity: 0;
      transform: translateY(16px) scale(.97);
      transform-origin: bottom right;
      pointer-events: none;
      transition: opacity .22s ease, transform .22s ease;
    }
    [dir="rtl"] .ai-panel { transform-origin: bottom left; }
    .ai-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
    .ai-panel-head {
      background: var(--brand-deep);
      color: #fff;
      padding: 13px 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }
    .ai-panel-head .ai-avatar {
      width: 36px; height: 36px; border-radius: 50%;
      background: var(--gold); color: #17211d;
      display: flex; align-items: center; justify-content: center;
      font-size: 19px; flex-shrink: 0;
    }
    .ai-panel-head strong { font-size: .95rem; display: block; }
    .ai-panel-head small { font-size: .72rem; opacity: .75; display: block; }
    .ai-messages {
      flex: 1;
      overflow-y: auto;
      padding: 14px 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: var(--surface-soft);
    }
    .ai-msg {
      max-width: 88%;
      padding: 10px 13px;
      border-radius: 14px;
      font-size: .86rem;
      line-height: 1.55;
      white-space: pre-wrap;
      word-wrap: break-word;
    }
    .ai-msg.bot {
      align-self: flex-start;
      background: var(--surface, #fff);
      border: 1px solid var(--line);
      color: var(--ink);
      border-start-start-radius: 4px;
    }
    .ai-msg.user {
      align-self: flex-end;
      background: var(--brand-deep);
      color: #fff;
      border-start-end-radius: 4px;
    }
    .ai-msg a { color: var(--gold); font-weight: 700; }
    .ai-msg.user a { color: #ffe1a8; }
    .ai-typing { font-style: italic; opacity: .65; }
    .ai-form {
      display: flex;
      gap: 8px;
      padding: 10px 12px;
      border-top: 1px solid var(--line);
      background: var(--surface, #fff);
      flex-shrink: 0;
    }
    .ai-form input {
      flex: 1;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 10px 14px;
      font: inherit;
      font-size: .86rem;
      background: var(--surface-soft);
      color: var(--ink);
      min-width: 0;
    }
    .ai-form input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
    .ai-form button {
      border: 0;
      border-radius: 999px;
      background: var(--brand-deep);
      color: #fff;
      font: inherit;
      font-weight: 800;
      font-size: .86rem;
      padding: 10px 18px;
      cursor: pointer;
      flex-shrink: 0;
    }
    .ai-form button:hover { background: var(--gold); color: #17211d; }
    .ai-quick {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 0 12px 10px;
      background: var(--surface-soft);
      flex-shrink: 0;
    }
    .ai-quick button {
      border: 1px solid var(--gold);
      background: transparent;
      color: var(--brand-deep);
      border-radius: 999px;
      font-size: .72rem;
      font-weight: 700;
      padding: 6px 12px;
      cursor: pointer;
      font-family: inherit;
    }
    .ai-quick button:hover { background: var(--gold-soft); }
    @media (max-width: 480px) {
      .ai-panel { bottom: 88px; inset-inline-end: 12px; width: calc(100vw - 24px); }
      .ai-fab { bottom: 16px; inset-inline-end: 16px; }
    }

    /* ============ Animations (added 2026-09-26) ============ */
    @keyframes iqraFadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes iqraFadeLeft { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: translateX(0); } }
    @keyframes iqraFadeRight { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: translateX(0); } }
    @keyframes iqraFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
    @keyframes iqraPulseRing { 0% { box-shadow: 0 0 0 0 rgba(199, 150, 62, .45); } 70% { box-shadow: 0 0 0 14px rgba(199, 150, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(199, 150, 62, 0); } }
    @keyframes iqraShine { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(240%) skewX(-18deg); } }
    @keyframes iqraPopIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

    /* Scroll reveal — JS adds .reveal then .visible */
    .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.22, .8, .3, 1); transition-delay: var(--reveal-delay, 0s); will-change: opacity, transform; }
    .reveal.visible { opacity: 1; transform: none; }

    /* Hero entrance on page load */
    .hero-copy { animation: iqraFadeLeft .8s cubic-bezier(.22, .8, .3, 1) both; }
    .hero-visual { animation: iqraFadeRight .8s .15s cubic-bezier(.22, .8, .3, 1) both; }
    .hero-photo { animation: iqraFloat 6s ease-in-out 1s infinite; }

    /* Buttons: lift on hover */
    .btn { transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease; }
    .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(24, 51, 42, .18); }
    .btn:active { transform: translateY(0); }

    /* Cards: lift on hover */
    .course-card, .price-card, .live-card, .about-panel { transition: transform .28s ease, box-shadow .28s ease; }
    .course-card:hover, .live-card:hover, .about-panel:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
    .price-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow); }

    /* Featured price card: animated shine sweep */
    .price-card.featured { overflow: hidden; }
    .price-card.featured::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: iqraShine 3.8s ease-in-out infinite; pointer-events: none; }

    /* Nav links: sliding underline */
    .nav-link { position: relative; }
    .nav-link::after { content: ""; position: absolute; inset-inline-start: 0; bottom: -3px; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform .28s ease; border-radius: 2px; }
    .nav-link:hover::after { transform: scaleX(1); }

    /* AI assistant button: gentle attention pulse */
    .ai-fab { animation: iqraPulseRing 2.6s ease-out infinite; transition: transform .22s ease; }
    .ai-fab:hover { transform: scale(1.08); animation: none; }
    .ai-panel.open { animation: iqraPopIn .25s ease both; }

    /* Payment chips: subtle pop on hover */
    .pay-chip { transition: transform .2s ease, box-shadow .2s ease; }
    .pay-chip:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 18px rgba(24, 51, 42, .14); }

    /* Trust items + stat boxes: soft zoom on hover */
    .trust-item, .stat-box { transition: transform .25s ease; }
    .trust-item:hover, .stat-box:hover { transform: scale(1.04); }

    /* Respect users who prefer reduced motion */
    @media (prefers-reduced-motion: reduce) {
      .reveal { opacity: 1; transform: none; transition: none; }
      .hero-copy, .hero-visual, .hero-photo, .ai-fab, .price-card.featured::after { animation: none !important; }
      .btn:hover, .course-card:hover, .price-card:hover, .live-card:hover, .about-panel:hover, .pay-chip:hover, .trust-item:hover, .stat-box:hover { transform: none; }
      .nav-link::after { transition: none; }
    }

    /* ============ Study progress chart + new layouts (added 2026-09-26) ============ */
    .contact-single { display: flex; justify-content: center; }
    .contact-single .contact-card { max-width: 560px; width: 100%; }
    .admission-layout { display: flex; justify-content: center; }
    .admission-layout .form-card { max-width: 720px; width: 100%; }
    .study-progress { margin-top: 8px; }
    .study-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; margin-top: 18px; }
    .study-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; }
    .study-card h3 { margin: 0 0 14px; font-size: 1.02rem; }
    .study-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
    .study-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
    .study-bar { width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--gold), var(--brand)); min-height: 6px; transition: height .6s cubic-bezier(.22, .8, .3, 1); animation: iqraBarGrow .7s cubic-bezier(.22, .8, .3, 1) both; }
    .study-bar-wrap span { font-size: .68rem; color: var(--muted); }
    @keyframes iqraBarGrow { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); } }
    .study-total { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
    .study-stats { display: flex; flex-direction: column; gap: 12px; }
    .study-stat { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--surface-soft); border-radius: var(--radius-sm); }
    .study-stat span { font-size: .82rem; color: var(--muted); }
    .study-stat strong { font-size: 1.25rem; color: var(--brand-deep); }
    .rank-card { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--brand-soft), var(--surface)); }
    .rank-badge { font-size: 2.6rem; font-weight: 800; color: var(--gold); background: var(--brand-deep); width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; box-shadow: var(--shadow); }
    .rank-card p { margin: 4px 0; font-size: .85rem; color: var(--muted); }
    .rank-card p strong { color: var(--ink); }
    @media (max-width: 900px) { .study-grid { grid-template-columns: 1fr; } }
    @media (prefers-reduced-motion: reduce) { .study-bar { animation: none; transition: none; } }

    /* ============ Admin study tracking forms (added 2026-09-26) ============ */
    .admin-study-forms { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
    .study-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
    .study-form-grid .form-card h3 { margin: 0 0 14px; font-size: 1.05rem; }
    .ok-msg { color: #167044; font-size: .85rem; font-weight: 600; margin: 10px 0 0; }
    .study-bar.empty { background: var(--line); opacity: .5; }
    .study-empty { grid-column: 1 / -1; text-align: center; padding: 34px 22px; }
    .study-empty p { color: var(--muted); }
    .study-empty a { color: var(--brand-deep); font-weight: 700; }
    @media (max-width: 900px) { .study-form-grid { grid-template-columns: 1fr; } }
      /* ---------- Islamic Tools ---------- */
    .tools-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
    .tools-tabs button {
      flex: 1 1 140px; min-height: 52px; padding: 12px 16px;
      border: 2px solid var(--line); border-radius: var(--radius-sm);
      background: var(--surface); color: var(--ink);
      font: 600 1rem/1.3 Manrope, sans-serif; cursor: pointer;
      transition: background .15s, border-color .15s, color .15s;
    }
    .tools-tabs button:hover { border-color: var(--gold); }
    .tools-tabs button.active { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--white); }
    .tool-panel { display: none; }
    .tool-panel.active { display: block; }
    .tool-card {
      background: var(--surface); border: 1px solid var(--line);
      border-radius: var(--radius-md); padding: 30px;
      box-shadow: var(--shadow); max-width: 720px; margin: 0 auto;
    }
    .tool-card h2 { margin: 0 0 10px; font-family: "Libre Baskerville", serif; color: var(--brand-deep); font-size: 1.6rem; }
    .tool-card > p { color: var(--muted); margin: 0 0 20px; font-size: 1rem; line-height: 1.6; }
    .tool-steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
    .tool-step {
      flex: 1 1 120px; text-align: center; padding: 10px 8px;
      background: var(--surface-soft); border-radius: var(--radius-sm);
      font-size: .85rem; color: var(--muted); font-weight: 600;
    }
    .tool-step b { display: block; font-size: 1.3rem; color: var(--gold); margin-bottom: 2px; }
    .tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
    .tool-actions .btn { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
    .tool-input-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
    .tool-input-row input, .tool-input-row select {
      flex: 1 1 160px; min-height: 52px; padding: 12px 14px;
      border: 2px solid var(--line); border-radius: var(--radius-sm);
      font: 500 1rem Manrope, sans-serif; background: var(--surface); color: var(--ink);
    }
    .tool-input-row input:focus, .tool-input-row select:focus { border-color: var(--gold); outline: none; }
    .tool-status { min-height: 28px; margin: 10px 0; color: var(--muted); font-size: .95rem; }
    .tool-status.error { color: var(--danger); font-weight: 600; }
    .prayer-list { list-style: none; margin: 18px 0 0; padding: 0; }
    .prayer-list li {
      display: flex; justify-content: space-between; align-items: center;
      padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 1.05rem;
    }
    .prayer-list li:last-child { border-bottom: none; }
    .prayer-list li.next { background: var(--gold-soft); border-radius: var(--radius-sm); font-weight: 700; }
    .prayer-list .p-time { font-weight: 700; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
    .prayer-place { font-size: .9rem; color: var(--muted); margin-top: 6px; }
    .qibla-wrap { text-align: center; }
    .qibla-dial {
      width: 240px; height: 240px; margin: 10px auto; position: relative;
      border: 3px solid var(--brand-deep); border-radius: 50%;
      background: radial-gradient(circle, var(--surface) 55%, var(--surface-soft) 100%);
    }
    .qibla-dial .q-n { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-weight: 800; color: var(--brand-deep); }
    .qibla-dial .q-s { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-weight: 800; color: var(--muted); }
    .qibla-dial .q-e { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); }
    .qibla-dial .q-w { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); }
    .qibla-needle {
      position: absolute; left: 50%; top: 50%; width: 6px; height: 100px;
      background: linear-gradient(to top, var(--gold) 50%, var(--danger) 50%);
      border-radius: 3px; transform-origin: 50% 100%;
      transform: translate(-50%, -100%) rotate(0deg);
      transition: transform .3s ease;
    }
    .qibla-needle::after {
      content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
      border: 9px solid transparent; border-bottom: 14px solid var(--gold);
    }
    .qibla-deg { font-size: 1.4rem; font-weight: 800; color: var(--brand-deep); margin: 8px 0 2px; }
    .hijri-today {
      text-align: center; padding: 22px; background: var(--brand-deep); color: var(--white);
      border-radius: var(--radius-md); margin-bottom: 20px;
    }
    .hijri-today .ht-date { font-family: "Libre Baskerville", serif; font-size: 1.7rem; margin: 4px 0; }
    .hijri-today .ht-sub { opacity: .85; font-size: .95rem; }
    .hijri-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
    .hijri-grid .hg-dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 6px 0; }
    .hijri-grid .hg-day {
      aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
      border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; background: var(--surface);
    }
    .hijri-grid .hg-day.today { background: var(--gold); border-color: var(--gold); color: #17211d; font-weight: 800; }
    .hijri-grid .hg-day.empty { border: none; background: none; }
    .hijri-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    .hijri-nav button { min-width: 48px; min-height: 48px; border: 2px solid var(--line); background: var(--surface); border-radius: 10px; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
    .hijri-adjust { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-size: .85rem; opacity: .9; }
    .hijri-adjust button { width: 40px; height: 40px; border: 2px solid var(--gold); background: transparent; color: var(--gold); border-radius: 50%; font-size: 1.2rem; line-height: 1; cursor: pointer; }
    .hijri-nav h3 { margin: 0; font-size: 1.15rem; color: var(--brand-deep); }
    .zakat-field { margin-bottom: 14px; }
    .zakat-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
    .zakat-field input {
      width: 100%; min-height: 52px; padding: 12px 14px;
      border: 2px solid var(--line); border-radius: var(--radius-sm);
      font: 500 1rem Manrope, sans-serif; background: var(--surface); color: var(--ink);
    }
    .zakat-field input:focus { border-color: var(--gold); outline: none; }
    .zakat-note { font-size: .85rem; color: var(--muted); background: var(--surface-soft); padding: 10px 14px; border-radius: var(--radius-sm); margin: 12px 0; }
    .zakat-result { margin-top: 18px; padding: 20px; background: var(--brand-soft); border-radius: var(--radius-md); display: none; }
    .zakat-result.show { display: block; }
    .zakat-result .zr-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
    .zakat-result .zr-row:last-child { border: none; }
    .zakat-result .zr-total { font-size: 1.3rem; font-weight: 800; color: var(--brand-deep); }
    .quran-select-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
    .quran-select-row select { flex: 1 1 200px; min-height: 52px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); font: 600 1rem Manrope, sans-serif; background: var(--surface); color: var(--ink); }
    .ayah-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; background: var(--surface); }
    .ayah-card .ayah-ar { font-size: 1.5rem; line-height: 2.2; text-align: right; direction: rtl; margin-bottom: 10px; font-family: "Amiri", "Scheherazade New", serif; }
    .ayah-card .ayah-ur { color: var(--muted); line-height: 1.8; margin-bottom: 10px; }
    .ayah-card .ayah-foot { display: flex; justify-content: space-between; align-items: center; }
    .ayah-num { font-size: .8rem; color: var(--muted); font-weight: 700; }
    .ayah-play { min-width: 48px; min-height: 48px; border-radius: 50%; border: 2px solid var(--gold); background: var(--gold-soft); font-size: 1.1rem; cursor: pointer; color: var(--brand-deep); }
    .ayah-play.playing { background: var(--gold); color: #17211d; }
    @media (max-width: 640px) {
      .tool-card { padding: 20px 16px; }
      .tools-tabs button { flex: 1 1 45%; font-size: .92rem; }
      .qibla-dial { width: 210px; height: 210px; }
      .qibla-needle { height: 88px; }
    }


/* Portal pages nav (26 Nov 2026): the owner console now has 8 nav links — on
   phones let the nav row scroll sideways instead of squeezing every link
   onto one line. The 2-row mobile header (104px) is unchanged. */
@media (max-width: 680px) {
  .topbar-inner nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .topbar-inner nav::-webkit-scrollbar { display: none; }
  .topbar-inner nav .nav-link { flex-shrink: 0; }
}

