    :root {
        --primary: #0A3669;
        --gold: #D4AF37;
        --gold-light: #faf3dc;
        --bg: #f4f7fb;
        --white: #fff;
        --text: #1a2b3c;
        --muted: #5a6b7d;
        --success: #1b8a5a;
        --danger: #c0392b;
        --sidebar-w: 280px;
        --utility-bar-h: 0px;
        --header-stack-h: 76px;
        --topbar-h: 76px;
        --topbar-h-guest: 118px;
        --radius: 16px;
        --shadow: 0 8px 28px rgba(10,54,105,0.08);
    }
    * { box-sizing: border-box; }
    body {
        font-family: 'Cairo', sans-serif;
        margin: 0;
        background: var(--bg);
        color: var(--text);
        min-height: 100vh;
    }

    /* ── وضع الزائر: عرض عالمي كامل العرض ── */
    body.guest-mode { --sidebar-w: 0px; --topbar-h: var(--topbar-h-guest, 118px); }
    body.guest-mode .sidebar { transform: translateX(100%); opacity: 0; pointer-events: none; }
    body.guest-mode .topbar { right: 0; background: #ffffff; backdrop-filter: none; -webkit-backdrop-filter: none; }
    body.guest-mode .main-wrap { margin-right: 0; padding: 0; }
    body.guest-mode .mega-nav { display: flex !important; }
    body.member-mode .mega-nav, body.admin-mode .mega-nav { display: flex !important; }
    body.member-mode .member-nav, body.admin-mode .member-nav { display: flex !important; }
    body.guest-mode .member-nav { display: none !important; }

    body.admin-mode .sidebar { background: linear-gradient(180deg, #061f3d 0%, var(--primary) 55%, #0d4a8a 100%); }
    body.admin-mode .role-badge { background: linear-gradient(135deg, var(--gold), #b8962e); color: var(--primary); }
    body.sidebar-open.guest-mode { --sidebar-w: 280px; }
    body.sidebar-open.guest-mode .sidebar { transform: none; opacity: 1; pointer-events: auto; }
    body.sidebar-open .sidebar { transform: none; opacity: 1; pointer-events: auto; }

    .mega-nav {
        display: none;
        align-items: center;
        gap: 2px;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    body.guest-mode .mega-nav {
        flex: 1 1 auto;
        margin-inline-start: 0;
        justify-content: center;
    }
    .mega-item { position: relative; }
    .mega-trigger, .mega-flat-link {
        display: inline-flex; align-items: center; gap: 6px;
        border: none; background: transparent; cursor: pointer;
        font-family: inherit; font-weight: 700; font-size: 0.82rem;
        color: var(--primary); padding: 10px 12px; border-radius: 10px;
        transition: background 0.2s, color 0.2s; white-space: nowrap;
    }
    .mega-trigger:hover, .mega-flat-link:hover { background: var(--gold-light); }
    .mega-chevron { font-size: 0.55rem; opacity: 0.6; transition: transform 0.2s; }
    .mega-item.open .mega-chevron { transform: rotate(180deg); }
    .mega-dropdown {
        display: none; position: absolute; top: calc(100% + 8px); right: 0;
        min-width: 280px; background: var(--white); border-radius: 14px;
        box-shadow: 0 20px 50px rgba(10,54,105,0.15); border: 1px solid rgba(10,54,105,0.08);
        z-index: 300; overflow: hidden;
    }
    .mega-item.open .mega-dropdown { display: block; animation: megaDrop 0.2s ease; }
    @keyframes megaDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
    .mega-dropdown-head {
        display: flex; gap: 12px; align-items: flex-start; padding: 16px;
        border-bottom: 3px solid var(--primary); background: linear-gradient(135deg, #f8fafc, #eef4fa);
    }
    .mega-dropdown-head i { font-size: 1.4rem; margin-top: 2px; }
    .mega-dropdown-head strong { display: block; color: var(--primary); font-size: 0.95rem; }
    .mega-dropdown-head small { color: var(--muted); font-size: 0.75rem; line-height: 1.4; }
    .mega-links { padding: 8px; }
    .mega-link {
        display: flex; align-items: center; gap: 10px; width: 100%;
        border: none; background: none; font-family: inherit; text-align: right;
        padding: 10px 12px; border-radius: 9px; cursor: pointer;
        color: var(--text); font-size: 0.86rem; font-weight: 600; transition: background 0.15s;
    }
    .mega-link:hover { background: var(--gold-light); color: var(--primary); }
    .mega-link i { width: 22px; color: var(--primary); text-align: center; }

    .member-nav {
        display: none; align-items: center; gap: 4px; flex: 1;
        justify-content: center; min-width: 0; overflow-x: auto;
    }
    .member-link {
        display: inline-flex; align-items: center; gap: 6px;
        border: none; background: transparent; cursor: pointer;
        font-family: inherit; font-weight: 600; font-size: 0.82rem;
        color: var(--muted); padding: 8px 14px; border-radius: 10px;
        white-space: nowrap; transition: all 0.2s;
    }
    .member-link i { font-size: 0.9rem; }
    .member-link:hover, .member-link.active { background: var(--gold-light); color: var(--primary); }
    .member-link.active { font-weight: 800; }

.logged-site-bar {
    position: sticky; top: calc(var(--header-stack-h, 118px));
    z-index: 40; margin: 0; padding: 10px 16px;
    background: linear-gradient(135deg, rgba(10,54,105,0.96), rgba(26,90,158,0.94));
    color: #fff; box-shadow: 0 4px 20px rgba(10,54,105,0.15);
}
.logged-site-bar-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.logged-site-greet { font-size: 0.88rem; font-weight: 600; }
.logged-site-greet i { color: var(--gold); margin-left: 6px; }
.logged-site-actions { display: flex; gap: 8px; flex-wrap: wrap; }
body.logged-site-home .main-wrap { padding: 0; }
body.logged-site-home.premium-ui .main-inner,
body.logged-site-home.member-mode .main-inner,
body.logged-site-home.admin-mode .main-inner { padding: 0; }
.user-bar-home-label { margin-inline-start: 4px; }
@media (max-width: 768px) {
    .user-bar-home-label { display: none; }
    .logged-site-bar { padding: 8px 12px; }
    .logged-site-greet { font-size: 0.78rem; }
}
    .public-nav {
        display: none;
        align-items: center;
        gap: 8px;
        flex: 1;
        justify-content: center;
    }
    .public-nav a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.88rem;
        padding: 8px 14px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s;
    }
    .public-nav a:hover { background: var(--gold-light); }

    .topbar {
        position: fixed; top: var(--utility-bar-h, 0px); right: var(--sidebar-w); left: 0;
        height: var(--topbar-h); background: var(--white);
        box-shadow: 0 1px 0 rgba(10,54,105,0.08);
        display: flex; align-items: center; gap: 12px;
        padding: 0 20px; z-index: 250; transition: right 0.35s ease, height 0.25s ease;
    }
    /* هيكل الهيدر الجديد — shell بدل flex مسطح */
    .topbar.topbar-premium {
        display: block;
        height: auto;
        min-height: 64px;
        padding: 0;
        overflow: visible;
    }
    .topbar.topbar-premium .topbar-shell {
        width: 100%;
        box-sizing: border-box;
        padding: 0 20px;
    }
    .topbar-start { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
    .topbar-end { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
    body.member-mode .topbar-end,
    body.admin-mode .topbar-end { margin-inline-start: auto; }
    .topbar-menu-btn {
        display: none; width: 40px; height: 40px; border: none; border-radius: 10px;
        background: var(--gold-light); color: var(--primary); cursor: pointer; font-size: 1rem;
    }
    body.member-mode .topbar-menu-btn, body.admin-mode .topbar-menu-btn { display: flex; align-items: center; justify-content: center; }
    body.guest-mode .topbar-menu-btn { display: flex; align-items: center; justify-content: center; }
    .topbar-icon-btn {
        width: 38px; height: 38px; border: none; border-radius: 10px;
        background: transparent; color: var(--primary); cursor: pointer;
        font-size: 1rem; transition: background 0.2s; position: relative;
    }
    .topbar-icon-btn:hover { background: var(--gold-light); }
    .notif-wrap { position: relative; }
    .notif-dot {
        position: absolute; top: 6px; left: 6px; width: 8px; height: 8px;
        border-radius: 50%; background: var(--danger); display: none;
        border: 2px solid white;
    }
    .notif-dot.visible { display: block; }
    .notif-panel {
        display: none; position: absolute; top: calc(100% + 10px); left: 0;
        width: 300px; background: white; border-radius: 14px;
        box-shadow: 0 16px 40px rgba(10,54,105,0.14); border: 1px solid rgba(10,54,105,0.08);
        z-index: 400; overflow: hidden;
    }
  .notif-wrap.open .notif-panel { display: block; }
    .notif-head { padding: 14px 16px; font-weight: 800; color: var(--primary); border-bottom: 1px solid #eee; font-size: 0.9rem; }
    .notif-item {
        display: flex; align-items: center; gap: 10px; width: 100%;
        border: none; background: none; font-family: inherit; text-align: right;
        padding: 12px 16px; cursor: pointer; font-size: 0.85rem; transition: background 0.15s;
    }
    .notif-item:hover { background: #f5f8fb; }
    .notif-item i { color: var(--primary); width: 20px; }
    .notif-item em { margin-inline-start: auto; font-style: normal; font-size: 0.65rem;
        background: var(--gold); color: var(--primary); padding: 2px 6px; border-radius: 4px; font-weight: 800; }
    .search-overlay {
        display: none; position: fixed; inset: 0; background: rgba(10,54,105,0.45);
        backdrop-filter: blur(6px); z-index: 500; align-items: flex-start; justify-content: center;
        padding: 80px 20px 20px;
    }
    .search-overlay.show { display: flex; }
    .search-panel {
        width: min(640px, 100%); background: white; border-radius: 16px;
        box-shadow: 0 24px 60px rgba(0,0,0,0.2); overflow: hidden;
    }
    .search-panel-head {
        display: flex; align-items: center; gap: 12px; padding: 16px 18px;
        border-bottom: 1px solid #eee;
    }
    .search-panel-head i { color: var(--muted); }
    .search-panel-head input {
        flex: 1; border: none; font-family: inherit; font-size: 1rem;
        outline: none; background: transparent;
    }
    .search-close { border: none; background: #f0f4f8; width: 36px; height: 36px;
        border-radius: 8px; cursor: pointer; color: var(--muted); }
    .search-results { max-height: 360px; overflow-y: auto; padding: 8px; }
    .search-hit {
        display: flex; flex-direction: column; align-items: flex-start; width: 100%;
        border: none; background: none; font-family: inherit; text-align: right;
        padding: 12px 14px; border-radius: 10px; cursor: pointer; transition: background 0.15s;
    }
    .search-hit:hover { background: var(--gold-light); }
    .search-hit-title { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
    .search-hit-group { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
    .search-hint, .search-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 0.9rem; }
    .topbar-brand-text-wrap { display: flex; flex-direction: column; gap: 1px; }
    .topbar-brand-name { font-weight: 800; color: var(--primary); font-size: 1.05rem; line-height: 1.1; }
    .topbar-brand {
        display: none;
        font-weight: 800;
        color: var(--primary);
        font-size: 1.25rem;
    }
    body.guest-mode .topbar-brand { display: block; }
    body.guest-mode .topbar-brand span { color: var(--gold); }
    .breadcrumb { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
    .breadcrumb span { color: var(--gold); margin: 0 5px; }
    .user-bar { display: flex; align-items: center; gap: 12px; }
    .role-badge {
        font-size: 0.72rem; padding: 5px 12px; border-radius: 20px;
        background: var(--primary); color: white; font-weight: 700;
    }
    .avatar {
        width: 38px; height: 38px; border-radius: 50%;
        background: linear-gradient(135deg, var(--gold), var(--primary));
        color: white; display: flex; align-items: center; justify-content: center;
        font-weight: 700; font-size: 0.9rem;
    }

    .btn {
        border: none; padding: 10px 20px; border-radius: 10px;
        cursor: pointer; font-family: inherit; font-size: 0.9rem;
        font-weight: 600; transition: all 0.25s;
    }
    .btn-primary { background: var(--primary); color: white; }
    .btn-primary:hover { background: var(--gold); color: var(--primary); }
    .btn-gold { background: var(--gold); color: var(--primary); }
    .btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }
    .btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
    .btn-ghost { background: rgba(255,255,255,0.15); color: white; border: 2px solid rgba(255,255,255,0.4); }
    .btn-ghost:hover { background: white; color: var(--primary); }
    .btn-sm { padding: 6px 14px; font-size: 0.8rem; }

    .sidebar {
        width: var(--sidebar-w); height: calc(100vh - var(--utility-bar-h, 0px));
        background: var(--primary); color: white;
        position: fixed; right: 0; top: var(--utility-bar-h, 0px);
        display: flex; flex-direction: column;
        z-index: 200; transition: transform 0.35s ease, opacity 0.35s;
        overflow: hidden;
    }
    .logo-box {
        text-align: center; padding: 16px 12px 14px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        background: rgba(255,255,255,0.04);
    }
    .brand-logo { display: block; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15)); }
    .brand-logo--official { filter: none; background: transparent; }
    .sidebar-logo { height: 72px; max-width: 100%; }
    .sidebar-logo.brand-logo--official { height: 98px; max-width: 92%; }
    .topbar-logo { height: 44px; }
    .topbar-logo.brand-logo--official { height: 54px; width: auto; max-width: 160px; }
    .logo-bg-panel {
        position: relative; overflow: hidden;
        border-radius: var(--radius);
    }
    .logo-bg-panel::before {
        content: ''; position: absolute; inset: 0;
        background-image: var(--accmaa-logo, none);
        background-size: 280px; background-position: center;
        background-repeat: no-repeat; opacity: 0.06;
    }
    .modal-logo { height: 56px; margin: 0 auto 16px; display: block; }
    .modal-logo.brand-logo--official { height: 92px; margin-bottom: 20px; }
    .about-logo {
        height: 120px; background: white; padding: 16px;
        border-radius: 16px; margin-bottom: 16px;
    }
    .about-logo.brand-logo--official { height: 150px; padding: 20px 24px; }
    .logo-box small { opacity: 0.85; font-size: 0.68rem; display: block; margin-top: 8px; color: var(--gold-light); }
    .topbar-brand-link {
        display: none; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
    }
    body.guest-mode .topbar-brand-link { display: flex; }
    body.guest-mode .topbar-brand-text { display: none; }
    .topbar-tagline { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
    .icons-dock {
        padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .icon-btn {
        aspect-ratio: 1; border: none; border-radius: 12px;
        background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9);
        cursor: pointer; display: flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 4px;
        font-size: 0.6rem; font-family: inherit; transition: all 0.22s;
        position: relative; padding: 6px 4px 4px;
    }
    .icon-btn .icon-bg-visual {
        width: 36px; height: 36px; border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        position: relative; overflow: hidden; flex-shrink: 0;
    }
    .icon-btn .icon-btn-label { line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .icon-btn i { font-size: 1.05rem; position: relative; z-index: 1; }
    .icon-btn:hover .icon-bg-visual, .icon-btn.active .icon-bg-visual { transform: scale(1.06); }
    .icon-btn:hover, .icon-btn.active {
        background: rgba(212,175,55,0.18); color: #fff; font-weight: 700;
    }
    .icon-btn.active .icon-bg-visual { box-shadow: 0 0 0 2px var(--gold); }
    .icon-btn.locked { opacity: 0.45; }
    .sections-panel { flex: 1; overflow-y: auto; padding: 10px 12px; }
    .sections-panel h4 { color: var(--gold); font-size: 0.75rem; margin: 0 0 8px; }
    .section-link {
        display: flex; align-items: center; gap: 10px; width: 100%;
        color: rgba(255,255,255,0.88); padding: 9px 11px; border-radius: 9px;
        margin-bottom: 4px; cursor: pointer; border: none; background: none;
        font-family: inherit; font-size: 0.84rem; text-align: right; transition: all 0.2s;
    }
    .section-link .section-icon-wrap {
        width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        position: relative; overflow: hidden;
    }
    .section-link .section-icon-wrap i { width: auto; font-size: 0.85rem; position: relative; z-index: 1; }
    .section-link .section-link-label { flex: 1; text-align: right; }
    .section-link:hover, .section-link.active { background: rgba(212,175,55,0.22); }
    .subsections { margin-right: 16px; border-right: 2px solid rgba(212,175,55,0.35); padding-right: 6px; margin-bottom: 6px; }
    .subsection-link {
        display: block; width: 100%; padding: 5px 9px; font-size: 0.78rem;
        color: rgba(255,255,255,0.6); border: none; background: none;
        font-family: inherit; text-align: right; cursor: pointer; border-radius: 5px;
    }
    .subsection-link:hover, .subsection-link.active { color: var(--gold); background: rgba(255,255,255,0.06); }

    .main-wrap {
        margin-right: var(--sidebar-w);
        margin-top: var(--header-stack-h, var(--topbar-h));
        min-height: calc(100vh - var(--header-stack-h, var(--topbar-h)));
        transition: margin 0.35s ease;
    }
    .main-inner { padding: 28px; }
    body.guest-mode .main-inner { padding: 0; }

    /* ═══ هيرو فاخر — محاسبة عصرية ═══ */
    .hero-guest {
        position: relative; overflow: hidden;
        background: linear-gradient(160deg, #fafcfe 0%, #e8f2fa 40%, #dce8f5 100%);
        padding: 56px 36px 80px;
        min-height: clamp(540px, 80vh, 700px);
        display: flex; align-items: center;
    }
    .hero-mesh {
        position: absolute; inset: -30%;
        background:
            radial-gradient(ellipse 50% 40% at 75% 15%, rgba(212,175,55,0.22) 0%, transparent 55%),
            radial-gradient(ellipse 45% 50% at 15% 75%, rgba(10,54,105,0.12) 0%, transparent 50%);
        animation: heroMeshShift 18s ease-in-out infinite alternate;
        z-index: 0;
    }
    .hero-mesh-2 {
        inset: -10%;
        background: conic-gradient(from 200deg at 60% 40%, transparent, rgba(255,255,255,0.4), transparent);
        opacity: 0.5;
        animation-duration: 24s;
    }
    @keyframes heroMeshShift {
        from { transform: translate(0, 0) rotate(0deg); }
        to { transform: translate(-2%, 1%) rotate(2deg); }
    }
    .hero-float-nums {
        position: absolute; inset: 0; z-index: 1;
        pointer-events: none; overflow: hidden;
    }
    .hero-float-nums span {
        position: absolute;
        font-weight: 800; font-size: 0.75rem;
        color: rgba(10,54,105,0.08);
        letter-spacing: 0.15em;
        animation: heroNumDrift 14s ease-in-out infinite;
    }
    .hero-float-nums span:nth-child(1) { top: 12%; left: 18%; animation-delay: 0s; }
    .hero-float-nums span:nth-child(2) { top: 22%; right: 20%; animation-delay: -3s; color: rgba(212,175,55,0.15); }
    .hero-float-nums span:nth-child(3) { bottom: 28%; left: 25%; animation-delay: -6s; }
    .hero-float-nums span:nth-child(4) { bottom: 18%; right: 28%; animation-delay: -9s; }
    .hero-float-nums span:nth-child(5) { top: 48%; left: 45%; animation-delay: -12s; font-size: 1rem; }
    @keyframes heroNumDrift {
        0%, 100% { transform: translateY(0); opacity: 0.6; }
        50% { transform: translateY(-12px); opacity: 1; }
    }
    .hero-scene {
        position: absolute; inset: 0;
        z-index: 0; pointer-events: none; overflow: hidden;
    }
    .hero-art-bg {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: cover;
        object-position: center center;
        opacity: 0.92;
        animation: heroArtPan 28s ease-in-out infinite alternate;
        z-index: 1;
    }
    @keyframes heroArtPan {
        from { transform: scale(1.02); }
        to { transform: scale(1.06) translateX(-1%); }
    }
    .hero-orbs { position: absolute; inset: 0; }
    .hero-orb {
        position: absolute; border-radius: 50%;
        filter: blur(50px); animation: heroOrbFloat 12s ease-in-out infinite;
    }
    .hero-orb-1 {
        width: 280px; height: 280px; top: 10%; right: 15%;
        background: rgba(212,175,55,0.28);
    }
    .hero-orb-2 {
        width: 220px; height: 220px; bottom: 15%; left: 8%;
        background: rgba(10,54,105,0.14);
        animation-delay: -5s;
    }
    .hero-orb-3 {
        width: 160px; height: 160px; top: 45%; left: 42%;
        background: rgba(212,175,55,0.15);
        animation-delay: -9s;
    }
    @keyframes heroOrbFloat {
        0%, 100% { transform: translate(0, 0) scale(1); }
        50% { transform: translate(12px, -16px) scale(1.08); }
    }
    .hero-float-deco {
        position: absolute; inset: 0; z-index: 2;
    }
    .hero-chip {
        position: absolute;
        width: 48px; height: 48px;
        display: flex; align-items: center; justify-content: center;
        background: rgba(255,255,255,0.92);
        border: 2px solid rgba(10,54,105,0.1);
        border-radius: 14px;
        color: var(--gold);
        font-size: 1.1rem;
        box-shadow: 0 8px 24px rgba(10,54,105,0.1);
        animation: heroChipFloat 7s ease-in-out infinite;
    }
    .hero-chip:nth-child(1) { top: 18%; left: 8%; animation-delay: 0s; }
    .hero-chip:nth-child(2) { top: 28%; right: 12%; animation-delay: -1.2s; color: var(--primary); }
    .hero-chip:nth-child(3) { bottom: 32%; left: 14%; animation-delay: -2.4s; }
    .hero-chip:nth-child(4) { bottom: 22%; right: 18%; animation-delay: -3.6s; }
    .hero-chip:nth-child(5) { top: 52%; right: 6%; animation-delay: -4.8s; color: var(--primary); }
    @keyframes heroChipFloat {
        0%, 100% { transform: translateY(0) rotate(0deg); }
        50% { transform: translateY(-8px) rotate(3deg); }
    }
    /* مركز الهيرو — هوية الشعار بدون صورة اللوجو */
    .hero-hub {
        position: absolute;
        left: 50%; top: 48%;
        transform: translate(-50%, -50%);
        z-index: 3;
        width: min(420px, 52vw);
        height: min(320px, 42vh);
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
    }
    .hero-orbit-line {
        position: absolute;
        border: 1px solid rgba(10,54,105,0.12);
        border-radius: 50%;
        animation: heroOrbitSpin 30s linear infinite;
    }
    .hero-orbit-line-1 { width: 100%; height: 72%; top: 14%; left: 0; }
    .hero-orbit-line-2 {
        width: 78%; height: 58%; top: 21%; left: 11%;
        border-color: rgba(212,175,55,0.25);
        animation-direction: reverse;
        animation-duration: 22s;
    }
    @keyframes heroOrbitSpin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    .hero-hub-core {
        position: relative;
        width: 200px; height: 160px;
        display: flex; align-items: center; justify-content: center;
        gap: 8px;
        animation: heroLogoFloat 14s ease-in-out infinite;
    }
    .hero-hub-icon {
        font-size: 4.5rem;
        filter: drop-shadow(0 12px 28px rgba(10,54,105,0.15));
    }
    .hero-hub-calc { color: #D4AF37; margin-top: 20px; margin-right: -12px; }
    .hero-hub-chart { color: #0A3669; font-size: 5rem; margin-bottom: 8px; }
    .hero-hub-tag {
        margin-top: 20px;
        padding: 8px 18px;
        border-radius: 30px;
        background: rgba(255,255,255,0.85);
        border: 1px solid rgba(10,54,105,0.1);
        color: var(--primary);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        box-shadow: 0 8px 24px rgba(10,54,105,0.08);
    }
    @keyframes heroLogoFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
    .hero-shine {
        position: absolute; inset: 0; z-index: 4;
        background: linear-gradient(110deg,
            transparent 35%,
            rgba(255,255,255,0.35) 48%,
            transparent 58%);
        background-size: 220% 100%;
        animation: heroShineSweep 10s ease-in-out infinite;
        mix-blend-mode: overlay;
    }
    @keyframes heroShineSweep {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
    .hero-veil {
        position: absolute; inset: 0; z-index: 4;
        background: linear-gradient(100deg,
            rgba(255,255,255,0.94) 0%,
            rgba(255,255,255,0.78) 20%,
            rgba(255,255,255,0.22) 36%,
            rgba(255,255,255,0.02) 50%,
            transparent 58%);
        pointer-events: none;
    }
    html[dir="ltr"] .hero-veil {
        background: linear-gradient(260deg,
            rgba(255,255,255,0.94) 0%,
            rgba(255,255,255,0.78) 20%,
            rgba(255,255,255,0.22) 36%,
            rgba(255,255,255,0.02) 50%,
            transparent 58%);
    }

    /* ═══ عالم المنصة — عرض شامل مبدع ═══ */
    .platform-universe {
        position: relative;
        padding: 56px 40px 64px;
        background: linear-gradient(180deg, #fff 0%, #f4f8fc 100%);
        overflow: hidden;
    }
    .platform-universe::before {
        content: '';
        position: absolute;
        inset: -20% 10% auto;
        height: 60%;
        background: radial-gradient(ellipse at center, rgba(212,175,55,0.12) 0%, transparent 70%);
        pointer-events: none;
    }
    .universe-head {
        text-align: center;
        max-width: 720px;
        margin: 0 auto 40px;
        position: relative;
        z-index: 1;
    }
    .universe-head h2 {
        margin: 0 0 12px;
        font-size: clamp(1.5rem, 3vw, 2rem);
        color: var(--primary);
        font-weight: 800;
    }
    .universe-head p { margin: 0; color: var(--muted); line-height: 1.8; font-size: 1.02rem; }
    .universe-scope {
        display: inline-block;
        margin-top: 16px;
        padding: 8px 20px;
        border-radius: 30px;
        background: var(--primary);
        color: var(--gold);
        font-size: 0.82rem;
        font-weight: 700;
        border: 1px solid var(--gold);
    }
    .universe-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
        max-width: 1200px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }
    .universe-pill {
        background: var(--white);
        border-radius: 14px;
        padding: 18px 14px;
        text-align: center;
        box-shadow: var(--shadow);
        border: 1px solid rgba(10,54,105,0.06);
        transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
        cursor: default;
    }
    .universe-pill:hover {
        transform: translateY(-4px);
        border-color: var(--gold);
        box-shadow: 0 16px 36px rgba(10,54,105,0.12);
    }
    .universe-pill i {
        font-size: 1.5rem;
        color: var(--gold);
        margin-bottom: 10px;
        display: block;
    }
    .universe-pill strong {
        display: block;
        font-size: 0.88rem;
        color: var(--primary);
        margin-bottom: 4px;
    }
    .universe-pill span {
        font-size: 0.72rem;
        color: var(--muted);
        line-height: 1.4;
    }
    .hero-content {
        position: relative; z-index: 5; max-width: 520px;
        margin-inline-start: auto; margin-inline-end: 0;
        color: var(--primary);
        padding: 20px 24px;
        background: rgba(255,255,255,0.72);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        border: 1px solid rgba(255,255,255,0.9);
        box-shadow: 0 16px 48px rgba(10,54,105,0.08);
    }
    .hero-badge {
        display: inline-block; background: var(--primary); color: var(--gold);
        border: 1px solid var(--gold);
        padding: 6px 16px; border-radius: 30px; font-size: 0.8rem;
        font-weight: 700; margin-bottom: 20px;
    }
    .hero-guest h1 {
        font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 16px;
        line-height: 1.25; font-weight: 800; color: var(--primary);
        text-shadow: 0 2px 12px rgba(255,255,255,0.9);
    }
    .hero-guest h1 em { color: var(--gold); font-style: normal; font-size: 0.72em; display: block; margin-top: 8px; font-weight: 700; }
    .hero-guest p {
        font-size: 1.05rem; line-height: 1.8; margin: 0 0 28px;
        color: #2a4058; max-width: 520px;
    }
    .hero-guest .btn-ghost {
        background: var(--primary); color: white;
        border: 2px solid var(--primary);
    }
    .hero-guest .btn-ghost:hover { background: var(--gold); color: var(--primary); border-color: var(--gold); }

    .lang-switch {
        display: flex; align-items: center; gap: 4px;
        background: var(--bg); padding: 4px; border-radius: 12px;
        border: 1px solid #dde4ec;
    }
    .lang-btn {
        border: none; background: transparent; padding: 6px 12px;
        border-radius: 8px; cursor: pointer; font-family: inherit;
        font-size: 0.8rem; font-weight: 700; color: var(--muted);
        transition: all 0.2s;
    }
    .lang-btn.active { background: var(--primary); color: white; }
    .lang-btn:hover:not(.active) { background: var(--gold-light); color: var(--primary); }
    .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
    .hero-stats {
        display: grid; grid-template-columns: repeat(4, 1fr);
        gap: 0; margin-top: -48px; position: relative; z-index: 6;
        padding: 0 40px 48px; max-width: 1100px; margin-left: auto; margin-right: auto;
    }

    /* ═══ امتيازات المنصة ═══ */
    .platform-powers {
        padding: 56px 40px 64px;
        background: linear-gradient(180deg, #fff 0%, #f6f9fc 100%);
        position: relative; z-index: 5;
    }
    .powers-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
    .powers-eyebrow {
        display: inline-block; padding: 6px 16px; border-radius: 30px;
        background: var(--primary); color: var(--gold);
        font-size: 0.78rem; font-weight: 700; margin-bottom: 14px;
    }
    .powers-head h2 { margin: 0 0 12px; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--primary); }
    .powers-head p { margin: 0; color: var(--muted); line-height: 1.8; }
    .powers-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px; max-width: 1180px; margin: 0 auto;
    }
    .guide-grid {
        display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px; max-width: 1180px; margin: 0 auto 8px;
    }
    .guide-card {
        background: var(--white); padding: 26px 22px; border-radius: var(--radius);
        box-shadow: var(--shadow); border: 1px solid rgba(10,54,105,0.08);
        transition: transform 0.25s, box-shadow 0.25s;
    }
    .guide-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 22px 48px rgba(10,54,105,0.12);
    }
    .guide-step {
        display: flex; align-items: center; gap: 12px; font-size: 1rem;
        font-weight: 700; margin-bottom: 10px; color: var(--primary);
    }
    .guide-step span {
        width: 36px; height: 36px; display: grid; place-items: center;
        border-radius: 12px; background: var(--gold); color: var(--primary);
        font-weight: 800;
    }
    .guide-card p {
        margin: 0; color: var(--muted); line-height: 1.8;
    }
    .power-card {
        position: relative;
        background: var(--white);
        border-radius: 18px;
        padding: 24px 18px;
        text-align: center;
        border: 1px solid rgba(10,54,105,0.08);
        box-shadow: 0 10px 32px rgba(10,54,105,0.06);
        cursor: pointer;
        transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    }
    .power-card:hover {
        transform: translateY(-6px);
        border-color: var(--gold);
        box-shadow: 0 20px 40px rgba(10,54,105,0.12);
    }
    .power-card .power-icon, .power-card > .has-icon-bg {
        width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px;
        display: flex; align-items: center; justify-content: center;
        position: relative; overflow: hidden;
    }
    .power-card .power-icon i, .power-card > .has-icon-bg i {
        font-size: 1.25rem; color: #fff;
    }
    .power-card h4 { margin: 0 0 8px; color: var(--primary); font-size: 0.95rem; }
    .power-card p { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.55; }
    .power-new, .gift-new-ribbon, .icon-new-badge, .nav-new {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        color: white; font-size: 0.62rem; font-weight: 800;
        padding: 3px 8px; border-radius: 6px;
    }
    .power-new { position: absolute; top: 10px; left: 10px; }
    .gift-new-ribbon { position: absolute; top: 10px; left: 10px; z-index: 2; }
    .icon-new-badge {
        position: absolute; top: 2px; left: 2px;
        border-radius: 8px; padding: 2px 6px; line-height: 1.2;
    }
    .icon-btn { position: relative; }
    .nav-new { vertical-align: super; margin-inline-start: 2px; }
    .gift-inline-new {
        background: #e74c3c; color: white; font-size: 0.65rem;
        padding: 2px 6px; border-radius: 4px; margin-inline-start: 4px;
    }
    .gift-card-new { border: 2px solid var(--gold); }
    .gift-category-block { margin-bottom: 36px; }
    .gift-cat-title {
        margin: 0 0 8px; color: var(--primary); font-size: 1.15rem;
        display: flex; align-items: center; gap: 10px;
    }
    .gift-cat-desc { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; }
    .gift-grid-tools .gift-card { background: linear-gradient(180deg, #fffef8 0%, #fff 100%); }
    .tool-tag { background: var(--primary) !important; color: var(--gold) !important; }
    .gift-hero-premium {
        background: linear-gradient(135deg, var(--primary) 0%, #1a5a9e 55%, #0d4a8a 100%);
    }
    .gift-disclaimer {
        margin-top: 24px; font-size: 0.85rem; color: var(--muted);
        border-right: 4px solid var(--gold);
    }
    .gift-explore-cta { margin-top: 20px; }
    .gift-explore-cta h3 { margin: 0 0 12px; font-size: 1rem; color: var(--primary); }
    .gift-explore-btns { display: flex; flex-wrap: wrap; gap: 10px; }
    .tax-calc-panel {
        background: var(--white); border-radius: var(--radius);
        padding: 28px 32px; box-shadow: var(--shadow);
        border: 1px solid #e8eef4; margin-bottom: 24px;
    }
    .tax-calc-header {
        display: flex; align-items: center; gap: 16px;
        padding-bottom: 20px; margin-bottom: 20px;
        border-bottom: 2px solid var(--gold-light);
    }
    .tax-flag-badge { font-size: 2.5rem; line-height: 1; }
    .tax-calc-header strong { display: block; color: var(--primary); font-size: 1.1rem; }
    .tax-calc-header small { color: var(--muted); }
    .tax-calc-form {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px; margin-bottom: 24px;
    }
    .tax-results {
        background: linear-gradient(135deg, var(--gold-light) 0%, #fff 100%);
        border-radius: 14px; padding: 20px 22px;
        border: 1px solid rgba(212,175,55,0.35);
    }
    .tax-result-row {
        display: flex; justify-content: space-between; align-items: center;
        padding: 10px 0; border-bottom: 1px dashed rgba(10,54,105,0.1);
        font-size: 0.95rem;
    }
    .tax-result-row:last-of-type { border-bottom: none; }
    .tax-result-row.highlight strong { color: var(--primary); font-size: 1.15rem; }
    .tax-result-row.warn strong { color: #c0392b; }
    .tax-result-note { margin: 14px 0 0; font-size: 0.8rem; color: var(--muted); }
    .stat-box {
        background: var(--white); border-radius: var(--radius);
        padding: 24px 20px; text-align: center; box-shadow: var(--shadow);
        margin: 0 8px; border-top: 4px solid var(--gold);
    }
    .stat-box strong {
        display: block; font-size: 2rem; color: var(--primary);
        font-weight: 800; line-height: 1;
    }
    .stat-box span { font-size: 0.85rem; color: var(--muted); margin-top: 6px; display: block; }

    .section-block { padding: 48px 40px; max-width: 1280px; margin: 0 auto; }
    .section-head {
        display: flex; justify-content: space-between; align-items: flex-end;
        margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
    }
    .section-head h2 {
        margin: 0; font-size: 1.65rem; color: var(--primary); font-weight: 800;
    }
    .section-head p { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }

    .explore-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 22px;
    }
    .explore-card {
        background: var(--white); border-radius: var(--radius);
        padding: 28px 24px; box-shadow: var(--shadow);
        cursor: pointer; transition: all 0.3s;
        border: 1px solid transparent;
        position: relative; overflow: hidden;
        font-family: inherit; text-align: right; width: 100%;
    }
    button.explore-card { appearance: none; -webkit-appearance: none; }
    .explore-card::before {
        content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px;
        background: linear-gradient(90deg, var(--gold), var(--primary));
    }
    .explore-card:hover {
        transform: translateY(-8px);
        border-color: var(--gold-light);
        box-shadow: 0 20px 50px rgba(10,54,105,0.12);
    }
    .explore-card .icon-wrap {
        width: 56px; height: 56px; border-radius: 14px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.4rem; margin-bottom: 16px; position: relative; overflow: hidden;
    }
    .explore-card .icon-wrap:not(.has-icon-bg) {
        background: linear-gradient(135deg, var(--primary), #1a5a9e);
        color: white;
    }
    .explore-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
    .explore-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
    .explore-card .meta {
        margin-top: 14px; font-size: 0.78rem; color: var(--gold);
        font-weight: 700;
    }

    .courses-row {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
    }
    .course-card {
        background: var(--white); border-radius: var(--radius);
        overflow: hidden; box-shadow: var(--shadow); transition: transform 0.25s;
    }
    .course-card:hover { transform: scale(1.02); }
    .course-thumb {
        height: 140px;
        background: linear-gradient(135deg, var(--primary), #2d6ba8);
        display: flex; align-items: center; justify-content: center;
        color: var(--gold); font-size: 2.5rem;
    }
    .course-body { padding: 20px; }
    .course-body h4 { margin: 0 0 8px; color: var(--primary); }
    .course-body p { margin: 0; font-size: 0.85rem; color: var(--muted); }
    .course-tag {
        display: inline-block; margin-top: 10px; padding: 4px 10px;
        background: var(--gold-light); color: var(--primary);
        border-radius: 6px; font-size: 0.75rem; font-weight: 700;
    }

    .features-row {
        display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
    }
    .feature-item {
        text-align: center; padding: 24px 16px;
        background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    }
    .feature-item i {
        font-size: 2rem; color: var(--gold); margin-bottom: 12px;
    }
    .feature-item h4 { margin: 0 0 6px; color: var(--primary); }
    .feature-item p { margin: 0; font-size: 0.85rem; color: var(--muted); }

    .cta-strip {
        margin: 0 40px 48px; padding: 40px 48px;
        background: linear-gradient(135deg, var(--primary), #0d4a8a);
        border-radius: 20px; color: #faf3dc; text-align: center;
        box-shadow: var(--shadow);
    }
    .cta-strip h3 { margin: 0 0 10px; font-size: 1.5rem; color: #D4AF37; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
    .cta-strip p { margin: 0 0 20px; color: #faf3dc; opacity: 1; }

    .site-footer {
        background: #061f3d; color: rgba(255,255,255,0.75);
        padding: 32px 40px; text-align: center; font-size: 0.85rem;
    }
    .site-footer-global { margin-top: 40px; padding: 36px 28px 20px; text-align: start; }
    .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto 20px; }
    .footer-brand strong { color: var(--gold); font-size: 1.1rem; }
    .footer-brand p { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.6; opacity: 0.85; }
    .footer-links { display: flex; flex-direction: column; gap: 8px; }
    .footer-links button, .footer-verify-link {
        background: none; border: none; color: rgba(255,255,255,0.8); font-family: inherit;
        cursor: pointer; text-align: start; padding: 4px 0; font-size: 0.85rem;
    }
    .footer-links button:hover, .footer-verify-link:hover { color: var(--gold); }
    .footer-contact a { color: var(--gold); text-decoration: none; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .footer-bottom { text-align: center; font-size: 0.78rem; opacity: 0.6; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
    .cert-verify-panel { max-width: 480px; }
    .cert-verify-ok { background: #e8f5e9; border-radius: 12px; padding: 20px; text-align: center; color: #2e7d32; }
    .cert-verify-ok i { font-size: 2rem; margin-bottom: 8px; }
    .notif-empty { padding: 16px; color: var(--muted); font-size: 0.85rem; text-align: center; }

    /* ═══ داشبورد الإدارة الرئيسية ═══ */
    .dash-admin { padding: 28px; }
    .command-header {
        background: linear-gradient(135deg, #061f3d, var(--primary));
        border-radius: 20px; padding: 32px 36px; color: white;
        margin-bottom: 28px; display: flex; justify-content: space-between;
        align-items: center; flex-wrap: wrap; gap: 20px;
        box-shadow: 0 16px 48px rgba(10,54,105,0.25);
    }
    .command-header h1 { margin: 0 0 6px; font-size: 1.75rem; }
    .command-header p { margin: 0; opacity: 0.85; font-size: 0.95rem; }
    .command-crown {
        width: 64px; height: 64px; border-radius: 16px;
        background: rgba(212,175,55,0.2); border: 2px solid var(--gold);
        display: flex; align-items: center; justify-content: center;
        font-size: 1.8rem; color: var(--gold);
    }

    .kpi-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 18px; margin-bottom: 28px;
    }
    .kpi-card {
        background: var(--white); border-radius: var(--radius);
        padding: 22px; box-shadow: var(--shadow);
        display: flex; gap: 16px; align-items: flex-start;
    }
    .kpi-icon {
        width: 48px; height: 48px; border-radius: 12px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.2rem; flex-shrink: 0;
    }
    .kpi-icon.blue { background: #e3edf7; color: var(--primary); }
    .kpi-icon.gold { background: var(--gold-light); color: #8a7020; }
    .kpi-icon.green { background: #e8f5ef; color: var(--success); }
    .kpi-icon.red { background: #fdecea; color: var(--danger); }
    .kpi-card strong { display: block; font-size: 1.65rem; color: var(--primary); line-height: 1; }
    .kpi-card span.label { font-size: 0.82rem; color: var(--muted); }
    .kpi-card span.trend { font-size: 0.75rem; color: var(--success); margin-top: 4px; display: block; }

    .dash-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px; margin-bottom: 22px;
    }
    @media (max-width: 1000px) { .dash-grid-2 { grid-template-columns: 1fr; } }

    .panel {
        background: var(--white); border-radius: var(--radius);
        padding: 24px; box-shadow: var(--shadow);
    }
    .panel h3 {
        margin: 0 0 18px; color: var(--primary); font-size: 1.1rem;
        display: flex; align-items: center; gap: 10px;
    }

    .perm-tree-item {
        display: flex; align-items: center; justify-content: space-between;
        padding: 12px 14px; border-radius: 10px; margin-bottom: 8px;
        background: var(--bg); border-right: 4px solid var(--gold);
    }
    .perm-tree-item .path { font-size: 0.88rem; font-weight: 600; }
    .perm-tree-item .path small { display: block; color: var(--muted); font-weight: 400; font-size: 0.78rem; }
    .perm-chip {
        font-size: 0.72rem; padding: 4px 10px; border-radius: 20px;
        font-weight: 700; white-space: nowrap;
    }
    .chip-guest { background: #e8f5e9; color: var(--success); }
    .chip-student { background: #e3f2fd; color: #1565c0; }
    .chip-instructor { background: #fff3e0; color: #e65100; }
    .chip-admin { background: #fce4ec; color: #880e4f; }
    .chip-super { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--primary); }

    .quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .quick-btn {
        padding: 14px; border-radius: 12px; border: 2px solid #e8eef4;
        background: var(--white); cursor: pointer; text-align: right;
        font-family: inherit; transition: all 0.2s;
    }
    .quick-btn:hover { border-color: var(--gold); background: var(--gold-light); }
    .quick-btn i { color: var(--primary); margin-left: 8px; }
    .quick-btn strong { display: block; color: var(--primary); font-size: 0.9rem; }
    .quick-btn small { color: var(--muted); font-size: 0.75rem; }

    .activity-item {
        display: flex; gap: 12px; padding: 12px 0;
        border-bottom: 1px solid #f0f0f0; font-size: 0.85rem;
    }
    .activity-item:last-child { border: none; }
    .activity-dot {
        width: 8px; height: 8px; border-radius: 50%;
        background: var(--gold); margin-top: 6px; flex-shrink: 0;
    }

    /* داشبورد عضو (طالب / مدرب) */
    .dash-member { padding: 28px; }
    .welcome-card {
        background: linear-gradient(135deg, var(--primary), #1a5a9e);
        color: white; border-radius: 20px; padding: 32px;
        margin-bottom: 24px;
    }
    .welcome-card h1 { margin: 0 0 8px; font-size: 1.6rem; }
    .module-grid-sm {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
    }
    .mod-sm {
        background: var(--white); border-radius: 14px; padding: 20px;
        box-shadow: var(--shadow); cursor: pointer; transition: transform 0.2s;
        text-align: center;
    }
    .mod-sm:hover { transform: translateY(-4px); }
    .mod-sm i { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }

    .page-title { color: var(--primary); font-size: 1.6rem; margin: 0 0 8px; }
    .page-desc { color: var(--muted); margin: 0 0 24px; }
    .content-panel {
        background: var(--white); border-radius: var(--radius);
        padding: 28px; box-shadow: var(--shadow);
    }
    .access-denied { text-align: center; padding: 60px 24px; }
    .access-denied i { font-size: 4rem; color: var(--gold); margin-bottom: 16px; }
    .gov-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
    .gov-table th, .gov-table td { padding: 11px; text-align: right; border-bottom: 1px solid #eee; }
    .gov-table th { background: var(--primary); color: white; }
    .perm-yes { color: var(--success); font-weight: 700; }
    .perm-no { color: #ccc; }

    .modal-overlay {
        display: none; position: fixed; inset: 0;
        background: rgba(6,31,61,0.7); z-index: 500;
        align-items: center; justify-content: center; backdrop-filter: blur(4px);
    }
    .modal-overlay.show { display: flex; }
    .modal-box {
        background: var(--white); border-radius: 20px; padding: 36px;
        width: 90%; max-width: 440px; box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    }
    .modal-box h2 { color: var(--primary); margin: 0 0 20px; text-align: center; }
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; margin-bottom: 6px; font-weight: 600; }
    .form-group input {
        width: 100%; padding: 12px; border: 2px solid #e8eef4;
        border-radius: 10px; font-family: inherit;
    }
    .form-group input:focus { border-color: var(--gold); outline: none; }
    .alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.88rem; }
    .alert-error { background: #fdecea; color: var(--danger); }
    .alert-success { background: #e8f5e9; color: #2e7d32; }
    .alert-info { background: #e3f2fd; color: var(--primary); }
    .hidden { display: none !important; }
    .modal-auth { max-width: 480px; }
    .auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
    .auth-tab {
        flex: 1; padding: 10px 12px; border: 2px solid #e8eef4; border-radius: 10px;
        background: var(--bg); font-family: inherit; font-weight: 600; cursor: pointer; color: var(--muted);
    }
    .auth-tab.active { border-color: var(--gold); background: #fffbf0; color: var(--primary); }
    .auth-switch, .auth-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; text-align: center; line-height: 1.6; }
    .auth-switch a { color: var(--gold-dark, #b8860b); font-weight: 700; }
    .demo-hint {
        margin-top: 14px; padding: 12px; background: var(--bg);
        border-radius: 10px; font-size: 0.78rem; color: var(--muted); line-height: 1.7;
    }

    body.guest-mode.guest-in-app { --sidebar-w: 280px; }
    body.guest-mode.guest-in-app .sidebar { transform: none; opacity: 1; pointer-events: auto; }
    body.guest-mode.guest-in-app .main-wrap { margin-right: 280px; padding: 0; }
    body.guest-mode.guest-in-app .main-inner { padding: 28px; }

    .doctor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
    .doctor-card {
        background: var(--white); border-radius: var(--radius); padding: 24px;
        box-shadow: var(--shadow); border: 2px solid transparent; transition: all 0.25s;
    }
    .doctor-card.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.35); }
    .doctor-avatar {
        width: 72px; height: 72px; border-radius: 50%;
        background: linear-gradient(135deg, var(--primary), #2d6ba8);
        color: var(--gold); display: flex; align-items: center; justify-content: center;
        font-size: 1.6rem; font-weight: 800; margin-bottom: 14px;
    }
    .doctor-card h3 { margin: 0 0 6px; color: var(--primary); }
    .doctor-card .spec { color: var(--gold); font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; }
    .doctor-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
    .course-list-item {
        display: flex; justify-content: space-between; align-items: center;
        padding: 16px 18px; background: var(--bg); border-radius: 12px; margin-bottom: 10px;
        flex-wrap: wrap; gap: 10px;
    }
    .badge-type {
        font-size: 0.72rem; padding: 4px 10px; border-radius: 20px; font-weight: 700;
    }
    .badge-online { background: #e3f2fd; color: #1565c0; }
    .badge-offline { background: #fff3e0; color: #e65100; }
    .tabs-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
    .tab-btn {
        padding: 10px 20px; border-radius: 10px; border: 2px solid #e8eef4;
        background: var(--white); cursor: pointer; font-family: inherit; font-weight: 600;
    }
    .tab-btn.active { border-color: var(--gold); background: var(--gold-light); color: var(--primary); }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    @media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
    .toast {
        position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
        background: var(--primary); color: white; padding: 12px 24px; border-radius: 10px;
        z-index: 600; font-size: 0.9rem; box-shadow: var(--shadow);
    }

    .file-protocol-banner {
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 700;
        background: linear-gradient(135deg, #7c2d12, #b45309);
        color: #fff; padding: 12px 16px; box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
    }
    .file-protocol-inner {
        max-width: 960px; margin: 0 auto; display: flex; align-items: center;
        justify-content: space-between; gap: 12px; flex-wrap: wrap;
    }
    .file-protocol-inner p { margin: 0; font-size: 0.88rem; line-height: 1.6; }
    .file-protocol-inner a { color: #fde68a; font-weight: 700; }
    .file-protocol-inner code {
        background: rgba(0,0,0,0.25); padding: 2px 6px; border-radius: 4px; font-size: 0.82rem;
    }

    .gift-hero {
        background: linear-gradient(135deg, #1a0a3d 0%, var(--primary) 50%, #2d6ba8 100%);
        color: white; border-radius: 20px; padding: 36px 32px; margin-bottom: 28px;
        position: relative; overflow: hidden; text-align: center;
    }
    .gift-hero::before {
        content: '🎁'; position: absolute; font-size: 8rem; opacity: 0.08;
        top: -20px; left: 20px;
    }
    .gift-ribbon {
        display: inline-block; background: var(--gold); color: var(--primary);
        font-weight: 800; font-size: 0.8rem; padding: 6px 18px; border-radius: 30px;
        margin-bottom: 14px;
    }
    .gift-grid {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
    }
    .gift-card {
        position: relative;
        background: var(--white); border-radius: 16px; padding: 22px 18px;
        box-shadow: var(--shadow); text-align: center; cursor: pointer;
        transition: all 0.28s; border: 2px solid transparent;
        display: block; width: 100%; font-family: inherit;
        appearance: none; -webkit-appearance: none; color: inherit;
    }
    button.gift-card { margin: 0; }
    .gift-card:hover {
        transform: translateY(-6px) scale(1.02);
        border-color: var(--gold);
        box-shadow: 0 16px 40px rgba(212,175,55,0.2);
    }
    .gift-card .g-icon {
        width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px;
        color: #fff; display: flex; align-items: center; justify-content: center;
        font-size: 1.35rem; position: relative; overflow: hidden;
    }
    .gift-card .g-icon i { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,0.35); }
    .gift-card h4 { margin: 0 0 6px; color: var(--primary); font-size: 1rem; }
    .gift-card p { margin: 0; font-size: 0.8rem; color: var(--muted); }
    .gift-card .free-tag {
        margin-top: 10px; font-size: 0.72rem; color: var(--success); font-weight: 700;
    }

    .about-hero {
        display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center;
        margin-bottom: 28px;
    }
    @media (max-width: 768px) { .about-hero { grid-template-columns: 1fr; } }
    .about-visual {
        background: linear-gradient(145deg, var(--primary), #1a5a9e);
        border-radius: 20px; padding: 40px; color: white; text-align: center;
    }
    .about-visual .big { font-size: 3rem; font-weight: 800; color: var(--gold); }

    .coa-wrap {
        background: var(--white); border-radius: var(--radius); padding: 28px;
        box-shadow: var(--shadow); overflow-x: auto;
    }
    .coa-root {
        text-align: center; padding: 16px 24px; background: var(--primary);
        color: white; border-radius: 12px; font-weight: 800; margin-bottom: 24px;
        display: inline-block; min-width: 200px;
    }
    .coa-level { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 20px; position: relative; }
    .coa-level::before {
        content: ''; position: absolute; top: -12px; left: 15%; right: 15%;
        height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
    }
    .coa-level:first-of-type::before { display: none; }
    .coa-node {
        background: var(--bg); border: 2px solid #e8eef4; border-radius: 12px;
        padding: 12px 16px; min-width: 130px; text-align: center; transition: all 0.2s;
        cursor: default;
    }
    .coa-node:hover { border-color: var(--gold); background: var(--gold-light); }
    .coa-node strong { display: block; color: var(--primary); font-size: 0.9rem; }
    .coa-node code { font-size: 0.75rem; color: var(--gold); font-weight: 700; background: none; }
    .coa-node span { font-size: 0.72rem; color: var(--muted); display: block; margin-top: 4px; }
    .coa-node.assets { border-top: 3px solid #1565c0; }
    .coa-node.liab { border-top: 3px solid #c0392b; }
    .coa-node.equity { border-top: 3px solid #6a1b9a; }
    .coa-node.rev { border-top: 3px solid var(--success); }
    .coa-node.exp { border-top: 3px solid #e65100; }
    .coa-children {
        display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
        margin-top: 12px; padding-top: 12px; border-top: 1px dashed #ddd;
    }
    .coa-child {
        background: white; padding: 8px 12px; border-radius: 8px; font-size: 0.78rem;
        border: 1px solid #e8eef4;
    }
    .coa-child b { color: var(--primary); }
    .coa-legend {
        display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
        margin-top: 24px; font-size: 0.8rem;
    }
    .coa-legend span { padding: 6px 12px; border-radius: 8px; background: var(--bg); }

    .coa-edu {
        background: linear-gradient(135deg, var(--gold-light) 0%, #fff 100%);
        border-right: 5px solid var(--gold); border-radius: 12px;
        padding: 20px 22px; margin-bottom: 22px;
    }
    .coa-edu h3 { margin: 0 0 10px; color: var(--primary); font-size: 1.05rem; }
    .coa-edu p { margin: 0; line-height: 1.75; color: var(--text); }
    .coa-example {
        background: var(--bg); border-radius: 10px; padding: 14px 18px;
        margin: 14px 0; font-size: 0.9rem;
    }
    .coa-example strong { color: var(--primary); }
    .coa-nav-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 20px; }
    .coa-nav-card {
        background: var(--white); border: 2px solid #e8eef4; border-radius: 12px;
        padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s;
    }
    .coa-nav-card:hover { border-color: var(--gold); background: var(--gold-light); }
    .coa-nav-card i { font-size: 1.4rem; color: var(--gold); display: block; margin-bottom: 8px; }
    .coa-lesson {
        background: var(--white); border-radius: var(--radius);
        padding: 28px 32px; box-shadow: var(--shadow);
        margin-bottom: 22px; line-height: 1.85; font-size: 0.95rem;
    }
    .coa-lesson h3 { color: var(--primary); margin: 22px 0 10px; font-size: 1.05rem; }
    .coa-lesson h3:first-child { margin-top: 0; }
    .coa-doctor {
        display: flex; gap: 16px; align-items: flex-start;
        background: linear-gradient(135deg, var(--primary), #1a5a9e);
        color: white; padding: 20px 22px; border-radius: 14px; margin-bottom: 22px;
    }
    .coa-doctor i { font-size: 2rem; color: var(--gold); margin-top: 4px; }
    .coa-glossary {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
        margin-top: 16px;
    }
    .coa-glossary span {
        background: var(--bg); padding: 10px 12px; border-radius: 8px; font-size: 0.82rem;
    }
    .coa-glossary b { color: var(--primary); }
    .coa-essence {
        display: flex; align-items: center; gap: 12px;
        background: linear-gradient(135deg, var(--gold-light), #fff);
        border: 1px solid rgba(212,175,55,0.35);
        border-radius: 12px; padding: 14px 18px; margin-bottom: 20px;
        font-weight: 700; color: var(--primary); font-size: 0.95rem;
    }
    .coa-essence i { color: var(--gold); font-size: 1.3rem; }
    .coa-nature {
        display: flex; align-items: flex-start; gap: 14px;
        background: var(--bg); border-radius: 12px; padding: 16px 18px;
        margin: 20px 0; border-right: 4px solid var(--primary);
    }
    .coa-nature-side {
        flex-shrink: 0; background: var(--primary); color: var(--gold);
        font-weight: 800; padding: 8px 14px; border-radius: 8px; font-size: 0.85rem;
    }
    .coa-nature p { margin: 0; line-height: 1.7; font-size: 0.9rem; }
    .coa-dict-title { color: var(--primary); margin: 28px 0 14px; font-size: 1.05rem; }
    .coa-dict-title i { color: var(--gold); margin-left: 8px; }
    .coa-dict-grid {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px; margin-bottom: 8px;
    }
    .coa-dict-card {
        background: var(--bg); border-radius: 12px; padding: 14px 16px;
        border: 1px solid #e8eef4; transition: border-color 0.2s, box-shadow 0.2s;
    }
    .coa-dict-card:hover { border-color: var(--gold); box-shadow: 0 6px 20px rgba(10,54,105,0.06); }
    .coa-dict-card strong { display: block; color: var(--primary); margin-bottom: 6px; font-size: 0.9rem; }
    .coa-dict-card p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.65; }
    .coa-tips {
        background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
        border-radius: 14px; padding: 20px 22px; margin-top: 22px;
        border: 1px solid rgba(10,54,105,0.08);
    }
    .coa-tips h3 { margin: 0 0 12px; color: var(--primary); font-size: 1rem; }
    .coa-tips h3 i { color: var(--gold); margin-left: 8px; }
    .coa-tips ul { margin: 0; padding-right: 22px; line-height: 1.85; font-size: 0.9rem; }
    .coa-tips li { margin-bottom: 8px; }
    .coa-branch-nav-label {
        margin: 28px 0 10px; font-weight: 700; color: var(--primary); font-size: 0.92rem;
    }
    .coa-tree-icon { font-size: 1.6rem; color: var(--gold); display: block; margin-bottom: 10px; }
    .coa-tree-visual { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
    .coa-tree-branch {
        background: var(--white); border-radius: 14px; padding: 20px 18px;
        min-width: 150px; text-align: center; cursor: pointer;
        border: 2px solid #e8eef4; transition: all 0.25s;
    }
    .coa-tree-branch:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow); }
    .coa-tree-branch strong { display: block; color: var(--primary); margin-bottom: 6px; }
    .coa-tree-branch small { color: var(--muted); font-size: 0.78rem; }

    .tpl-preview-wrap {
        background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
        border-radius: 16px; padding: 20px; margin: 20px 0;
        border: 1px solid #dde4ec;
    }
    .tpl-doc {
        background: #fff; border-radius: 12px; padding: 28px 32px;
        box-shadow: 0 4px 24px rgba(10,54,105,0.08);
        border-top: 5px solid var(--gold); max-width: 720px; margin: 0 auto;
        font-size: 0.88rem; line-height: 1.6;
    }
    .tpl-doc-header {
        display: flex; justify-content: space-between; align-items: flex-start;
        border-bottom: 2px solid var(--primary); padding-bottom: 16px; margin-bottom: 18px;
        gap: 16px; flex-wrap: wrap;
    }
    .tpl-doc-header img { height: 52px; }
    .tpl-doc-title { text-align: left; }
    .tpl-doc-title h2 { margin: 0; color: var(--primary); font-size: 1.25rem; }
    .tpl-doc-title .meta { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
    .tpl-doc-badge {
        display: inline-block; background: var(--gold-light); color: var(--primary);
        font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 20px;
        margin-bottom: 12px;
    }
    .tpl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
    .tpl-field {
        background: #f8fafc; border: 1px dashed #c5d0de; border-radius: 8px;
        padding: 10px 12px; min-height: 40px;
    }
    .tpl-field label { font-size: 0.72rem; color: var(--muted); display: block; margin-bottom: 4px; }
    .tpl-currency-bar {
        background: linear-gradient(90deg, var(--primary), #1a5a9e);
        color: white; padding: 10px 16px; border-radius: 8px;
        margin-bottom: 16px; font-size: 0.85rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    .tpl-currency-bar input { border: none; background: rgba(255,255,255,0.2); color: white;
        padding: 6px 12px; border-radius: 6px; font-family: inherit; min-width: 140px; }
    .tpl-currency-bar input::placeholder { color: rgba(255,255,255,0.7); }
    .tpl-doc table { width: 100%; border-collapse: collapse; margin: 14px 0; }
    .tpl-doc th { background: var(--primary); color: white; padding: 10px; font-size: 0.78rem; }
    .tpl-doc td { border: 1px solid #e8eef4; padding: 10px; }
    .tpl-doc tfoot td { background: var(--gold-light); font-weight: 700; }
    .tpl-sign-row {
        display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
        margin-top: 28px; padding-top: 16px; border-top: 1px solid #eee;
    }
    .tpl-sign { text-align: center; font-size: 0.78rem; color: var(--muted); }
    .tpl-sign .line { border-top: 1px solid #333; margin-top: 36px; padding-top: 6px; color: var(--text); }
    .tpl-note { font-size: 0.78rem; color: var(--muted); margin-top: 14px; padding: 10px; background: #f8fafc; border-radius: 8px; }

    @media (max-width: 900px) {
        .hero-stats { grid-template-columns: repeat(2, 1fr); padding: 0 20px 32px; }
        .section-block { padding: 32px 20px; }
        .hero-guest {
            padding: 24px 12px 40px;
            min-height: auto;
            flex-direction: column;
            align-items: stretch;
        }
        .hero-hub {
            position: relative;
            left: auto; top: auto;
            transform: none;
            width: 100%;
            min-height: 180px;
            margin-bottom: 4px;
        }
        .hero-hub-core { width: 160px; height: 120px; }
        .hero-hub-calc { font-size: 3rem; }
        .hero-hub-chart { font-size: 3.5rem; }
        .hero-chip { width: 40px; height: 40px; font-size: 0.9rem; }
        .hero-float-deco { opacity: 0.7; }
        .hero-veil {
            background: linear-gradient(180deg,
                rgba(255,255,255,0.1) 0%,
                rgba(255,255,255,0.5) 45%,
                rgba(255,255,255,0.95) 85%);
        }
        .hero-content {
            margin: 0 auto; max-width: 100%;
            z-index: 6;
        }
        body.member-mode, body.admin-mode { --sidebar-w: 100%; }
        body.member-mode .sidebar, body.admin-mode .sidebar {
            transform: none; opacity: 1; pointer-events: auto;
            position: relative; height: auto;
        }
        body.member-mode .main-wrap, body.admin-mode .main-wrap { margin-right: 0; }
        /* ضيف: القائمة من زر القائمة الجانبية — لا صف mega-nav في الهيدر */
        body.guest-mode .mega-nav { display: none !important; }
        body.guest-mode .topbar-menu-btn { display: flex !important; }
        .breadcrumb { display: none; }
        .topbar-brand-text-wrap .topbar-tagline { display: none; }
    }

    /* ═══ PRO DASHBOARD & PILLARS ═══ */
    .pillar-hub { background: linear-gradient(180deg, #fff 0%, #f4f8fc 100%); }
    .pillar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
    .pillar-card {
        background: white; border-radius: var(--radius); padding: 24px;
        border: 2px solid transparent; cursor: pointer; transition: all 0.28s;
        box-shadow: var(--shadow); position: relative; overflow: hidden;
        font-family: inherit; text-align: right; width: 100%;
    }
    button.pillar-card { appearance: none; -webkit-appearance: none; }
    .pillar-card::before {
        content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px;
        background: var(--pillar-color, var(--primary));
    }
    .pillar-card:hover { transform: translateY(-4px); border-color: var(--pillar-color, var(--gold)); box-shadow: 0 16px 40px rgba(10,54,105,0.12); }
    .pillar-icon {
        width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
        font-size: 1.35rem; margin-bottom: 14px; position: relative; overflow: hidden;
    }
    .pillar-icon:not(.has-icon-bg) {
        background: color-mix(in srgb, var(--pillar-color, var(--primary)) 12%, white);
        color: var(--pillar-color, var(--primary));
    }
    .pillar-card h3 { margin: 0 0 8px; color: var(--primary); font-size: 1.1rem; }
    .pillar-card p { margin: 0 0 14px; color: var(--muted); font-size: 0.84rem; line-height: 1.5; }
    .pillar-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
    .pillar-tags span { font-size: 0.68rem; padding: 4px 8px; border-radius: 6px; background: #f0f4f8; color: var(--muted); font-weight: 600; }
    .pillar-cta { font-size: 0.8rem; font-weight: 700; color: var(--pillar-color, var(--gold)); }

    .dash-pro { padding: 0; }
    .dash-eyebrow, .powers-eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
        text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 6px; }
    .welcome-pro {
        background: linear-gradient(135deg, var(--primary) 0%, #0d4a8a 55%, #1a5f9e 100%);
        color: white; border-radius: var(--radius); padding: 28px 32px; margin-bottom: 24px;
        box-shadow: 0 12px 40px rgba(10,54,105,0.2); position: relative; overflow: hidden;
    }
    .welcome-pro::after {
        content: ''; position: absolute; top: -40%; left: -20%; width: 50%; height: 200%;
        background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 70%);
    }
    .welcome-pro h1 { margin: 8px 0 6px; font-size: 1.65rem; position: relative; }
    .welcome-pro p { margin: 0; opacity: 0.9; position: relative; }
    .welcome-pro-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; }
    .dash-date { font-size: 0.82rem; opacity: 0.85; }
    .progress-ring {
        width: 56px; height: 56px; border-radius: 50%;
        background: conic-gradient(var(--gold) calc(var(--pct) * 1%), rgba(255,255,255,0.2) 0);
        display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .progress-ring span {
        width: 42px; height: 42px; border-radius: 50%; background: rgba(10,54,105,0.85);
        display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800;
    }
    .kpi-grid-pro { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .kpi-live { transition: transform 0.2s; }
    .kpi-live:hover { transform: translateY(-2px); }
    .kpi-icon.purple { background: linear-gradient(135deg, #7c3aed, #5b21b6); color: white; }
    .trend { font-size: 0.72rem; color: var(--muted); display: block; margin-top: 2px; }
    .trend.up { color: var(--success); }
    .panel-continue .continue-card {
        background: linear-gradient(135deg, #f8fafc, #eef4fa); border-radius: 12px; padding: 18px;
        border: 1px solid rgba(10,54,105,0.08);
    }
    .continue-card h4 { margin: 0 0 12px; color: var(--primary); font-size: 1rem; }
    .progress-bar-wrap { height: 8px; background: #e0e8f0; border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
    .progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 99px; transition: width 0.5s ease; }
    .continue-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: var(--muted); }
    .booking-row {
        display: flex; align-items: center; gap: 12px; padding: 12px 0;
        border-bottom: 1px solid #f0f4f8;
    }
    .booking-row:last-child { border-bottom: none; }
    .booking-row i { width: 36px; height: 36px; border-radius: 10px; background: var(--gold-light);
        color: var(--primary); display: flex; align-items: center; justify-content: center; }
    .booking-row strong { display: block; font-size: 0.88rem; color: var(--text); }
    .booking-row small { color: var(--muted); font-size: 0.78rem; }
    .member-stats-row {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0;
    }
    .member-stat {
        background: white; border-radius: 12px; padding: 18px; text-align: center;
        box-shadow: var(--shadow); border: 1px solid rgba(10,54,105,0.06);
    }
    .member-stat i { color: var(--gold); font-size: 1.2rem; margin-bottom: 8px; }
    .member-stat strong { display: block; font-size: 1.4rem; color: var(--primary); }
    .member-stat span { font-size: 0.75rem; color: var(--muted); }
    .panel-recommend { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid rgba(212,175,55,0.3); }
    .dash-section-title { color: var(--primary); margin: 28px 0 16px; font-size: 1.15rem; }
    .mod-sm-pro { transition: transform 0.2s, box-shadow 0.2s; }
    .mod-sm-pro:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(10,54,105,0.1); }
    .course-progress-row {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 12px 0; border-bottom: 1px solid #f0f4f8;
    }
    .course-progress-row:last-of-type { border-bottom: none; }
    .course-progress-row strong { display: block; color: var(--primary); }
    .course-progress-row small { color: var(--muted); font-size: 0.78rem; }
    .mini-chart {
        display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
        height: 140px; padding: 16px 8px 0; margin-top: 12px;
    }
    .chart-bar {
        flex: 1; background: linear-gradient(180deg, var(--gold), var(--primary));
        border-radius: 6px 6px 0 0; min-height: 20px; position: relative;
        display: flex; align-items: flex-start; justify-content: center; padding-top: 6px;
    }
    .chart-bar span { font-size: 0.62rem; color: white; font-weight: 700; }
    .chart-caption { font-size: 0.78rem; color: var(--muted); margin: 10px 0 0; text-align: center; }
    .panel-chart { min-height: 220px; }

    .hub-landing { max-width: 900px; }
    .hub-pillar-badge {
        display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
        border-radius: 20px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px;
    }
    .hub-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 20px 0; }
    .hub-topics-title { margin: 16px 0 8px; font-size: 0.95rem; color: var(--primary); }
    .hub-topic-card {
        display: flex; flex-direction: row; align-items: flex-start; gap: 12px;
        padding: 14px 16px; border: 2px solid #e8eef4; border-radius: 14px; background: white;
        cursor: pointer; font-family: inherit; text-align: right; transition: all 0.2s;
        width: 100%; user-select: none; -webkit-tap-highlight-color: transparent;
    }
    .hub-topic-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
    .hub-topic-body { flex: 1; min-width: 0; }
    .hub-topic-card h4 { margin: 0 0 6px; font-size: 0.92rem; color: var(--text); line-height: 1.35; }
    .hub-topic-go { display: block; font-size: 0.72rem; color: var(--gold); font-weight: 700; margin-top: 6px; }
    .hub-topic-card:hover, .hub-topic-card.active { border-color: var(--gold); background: var(--gold-light); transform: translateY(-2px); }
    .hub-topic-card { position: relative; z-index: 3; pointer-events: auto; }
    .hub-topics { position: relative; z-index: 2; }
    .hub-topic-card .icon-bg-layer { pointer-events: none; }
    .hub-section-detail { scroll-margin-top: 88px; margin-top: 8px; }
    .hub-section-detail.is-reveal { animation: hubReveal 0.45s ease; }
    @keyframes hubReveal { from { opacity: 0.5; transform: translateY(10px); } to { opacity: 1; transform: none; } }
    .hub-tool-panel { margin-top: 16px; }
    .hub-tool-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
    .hub-tool-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 12px; }
    .hub-tool-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--primary); min-width: 140px; flex: 1; }
    .hub-report-table { margin-top: 12px; }
    .hub-tool-note { font-size: 0.78rem; color: var(--muted); margin-top: 10px; }
    .hub-course-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .hub-course-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
    .hub-info-panel { margin-top: 8px; }

    /* ─── Free / Paid badges ─── */
    .accmaa-tier-badge {
        display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
        font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em; vertical-align: middle;
    }
    .accmaa-tier-free { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
    .accmaa-tier-paid { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
    .accmaa-tier-premium { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
    .hub-topic-badge { margin-top: 2px; }
    .hub-page-badge { margin-bottom: 8px; }

    @media (max-width: 768px) {
        .hub-topics { grid-template-columns: 1fr; }
        .hub-tool-form label { min-width: 100%; }
        .course-list-item { flex-direction: column; align-items: stretch; }
        .course-actions { justify-content: flex-start; }
    }

    @media (max-width: 1100px) {
        .mega-trigger span, .mega-flat-link { font-size: 0.75rem; padding: 8px 8px; }
        .member-stats-row { grid-template-columns: repeat(2, 1fr); }
        .kpi-grid-3 { grid-template-columns: 1fr; }
    }
    @media (max-width: 768px) {
        .pillar-grid { grid-template-columns: 1fr; }
        .member-nav .member-link span { display: none; }
        .topbar-end .breadcrumb { display: none; }
    }

    /* ── Cart, checkout, learning paths, player, certs, CMS ── */
    .cart-btn { position: relative; }
    .cart-badge {
        position: absolute; top: 2px; left: 2px; min-width: 16px; height: 16px;
        padding: 0 4px; border-radius: 10px; background: var(--gold); color: var(--primary);
        font-size: 0.62rem; font-weight: 800; line-height: 16px; text-align: center;
        display: none;
    }
    .cart-badge.visible { display: inline-block; }
    .course-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
    .cart-row, .checkout-line {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 14px 0; border-bottom: 1px solid #eef2f6;
    }
    .cart-row:last-of-type { border-bottom: none; }
    .cart-price { font-weight: 700; color: var(--primary); white-space: nowrap; }
    .cart-total {
        display: flex; justify-content: space-between; align-items: center;
        margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--gold-light);
        font-size: 1.05rem;
    }
    .checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .pay-option {
        display: flex; align-items: center; gap: 10px; padding: 12px; margin: 8px 0;
        border: 2px solid #e8eef4; border-radius: 10px; cursor: pointer;
    }
    .pay-option:has(input:checked) { border-color: var(--gold); background: var(--gold-light); }
    .empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
    .empty-state i { font-size: 2.5rem; color: var(--gold); margin-bottom: 12px; display: block; }
    .paths-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
    .path-card {
        border: 2px solid #e8eef4; border-radius: 14px; padding: 20px; background: white;
        cursor: pointer; transition: all 0.2s; border-top: 4px solid var(--path-color, var(--primary));
    }
    .path-card:hover { border-color: var(--gold); box-shadow: 0 8px 24px rgba(10,54,105,0.08); transform: translateY(-2px); }
    .path-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
    .path-card-head i { font-size: 1.5rem; color: var(--path-color, var(--primary)); }
    .path-pct { font-weight: 800; color: var(--primary); font-size: 0.85rem; }
    .path-meta { display: flex; gap: 14px; font-size: 0.8rem; color: var(--muted); margin: 10px 0; }
    .path-step {
        display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
        padding: 14px 0; border-bottom: 1px solid #f0f4f8;
    }
    .path-step.done .path-step-num { background: var(--gold); color: white; }
    .path-step-num {
        width: 32px; height: 32px; border-radius: 50%; background: #e8eef4;
        display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
    }
    .path-overall { display: flex; justify-content: space-between; align-items: center; }
    .progress-bar-wrap { height: 8px; background: #e8eef4; border-radius: 8px; overflow: hidden; }
    .progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 8px; transition: width 0.3s; }
    .player-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
    .video-stage {
        background: #0a1628; border-radius: 14px; min-height: 280px;
        display: flex; align-items: center; justify-content: center; color: white;
    }
    .video-placeholder, .video-active { text-align: center; padding: 32px; width: 100%; }
    .video-placeholder i, .video-sim i { font-size: 3rem; color: var(--gold); margin-bottom: 12px; }
    .video-with-embed { padding: 0; text-align: initial; }
    .video-embed-wrap {
        position: relative; width: 100%; padding-bottom: 56.25%; height: 0; background: #000;
        border-radius: 14px 14px 0 0; overflow: hidden;
    }
    .video-embed-wrap iframe, .video-embed-wrap video {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
    }
    .video-lesson-meta { padding: 16px 20px; text-align: right; }
    .lesson-item.playing { background: var(--gold-light); border-right: 3px solid var(--gold); }
    .pay-sandbox-hint { font-size: 0.82rem; color: #6b7280; margin-top: 12px; }
    .lesson-sidebar { background: white; border: 2px solid #e8eef4; border-radius: 14px; padding: 16px; }
    .lesson-item {
        display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: right;
        padding: 12px; border: none; background: transparent; border-radius: 10px;
        cursor: pointer; font-family: inherit; margin-bottom: 4px;
    }
    .lesson-item:hover { background: var(--gold-light); }
    .lesson-item.done .lesson-num { background: var(--gold); color: white; }
    .lesson-num {
        width: 28px; height: 28px; border-radius: 50%; background: #e8eef4;
        display: flex; align-items: center; justify-content: center; font-size: 0.78rem; flex-shrink: 0;
    }
    .lesson-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
    .lesson-preview-card {
        padding: 12px; border: 1px solid #e8eef4; border-radius: 10px; font-size: 0.85rem;
    }
    .lesson-preview-card i { color: var(--gold); margin-left: 6px; }
    .hub-course-panel { margin-top: 16px; }
    .enrolled-list { display: flex; flex-direction: column; gap: 12px; }
    .enrolled-card {
        display: flex; justify-content: space-between; align-items: center; gap: 16px;
        padding: 16px; border: 2px solid #e8eef4; border-radius: 12px;
    }
    .certs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
    .cert-card {
        border: 2px solid var(--gold); border-radius: 14px; padding: 20px; background: linear-gradient(135deg, #fffef8, white);
    }
    .cert-card-head { display: flex; justify-content: space-between; color: var(--primary); font-weight: 800; margin-bottom: 10px; }
    .cert-grade-chip {
        display: inline-block; background: var(--gold-light); color: #92400e;
        padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; margin: 6px 0;
    }
    .cert-courses-count { font-size: 0.85rem; color: var(--muted); }
    .cert-card-head i { color: var(--gold); font-size: 1.4rem; }
    .cert-verify code { background: #f0f4f8; padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; }
    .module-toggle-grid { display: flex; flex-direction: column; gap: 10px; }
    .module-toggle-row {
        display: flex; justify-content: space-between; align-items: center;
        padding: 12px 16px; border: 2px solid #e8eef4; border-radius: 10px;
    }
    .cms-preview-panel { margin-top: 20px; }
    .cms-preview-box {
        padding: 24px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), #0d4a8a); color: white;
    }
    .cms-preview-badge { font-size: 1.4rem; font-weight: 800; display: block; margin-bottom: 8px; }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    @media (max-width: 900px) {
        .checkout-grid, .player-layout { grid-template-columns: 1fr; }
        .form-row { grid-template-columns: 1fr; }
    }

    /* ── Module chrome & portal navigation ── */
    .module-chrome {
        background: linear-gradient(135deg, var(--primary) 0%, #0d4a8a 100%);
        color: white; border-radius: 16px; padding: 20px 24px 0; margin-bottom: 20px;
        box-shadow: 0 8px 32px rgba(10,54,105,0.15);
    }
    .module-chrome-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
    .module-chrome-icon {
        width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,0.15);
        display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--gold);
    }
    .module-chrome-text { flex: 1; min-width: 200px; }
    .module-chrome-text h2 { margin: 4px 0 6px; font-size: 1.35rem; }
    .module-chrome-text p { margin: 0; opacity: 0.88; font-size: 0.9rem; }
    .module-chrome-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }
    .module-chrome-stat {
        text-align: center; background: rgba(255,255,255,0.12); padding: 10px 18px; border-radius: 12px;
    }
    .module-chrome-stat strong { display: block; font-size: 1.5rem; color: var(--gold); }
    .module-chrome-stat span { font-size: 0.75rem; opacity: 0.85; }
    .module-tabs {
        display: flex; gap: 6px; overflow-x: auto; padding-bottom: 0;
        scrollbar-width: thin;
    }
    .module-tab {
        display: flex; align-items: center; gap: 8px; padding: 10px 14px;
        border: none; border-radius: 10px 10px 0 0; background: rgba(255,255,255,0.08);
        color: rgba(255,255,255,0.85); font-family: inherit; font-size: 0.82rem;
        cursor: pointer; white-space: nowrap; transition: all 0.2s;
    }
    .module-tab i { font-size: 0.85rem; }
    .module-tab:hover { background: rgba(255,255,255,0.18); color: white; }
    .module-tab.active { background: white; color: var(--primary); font-weight: 700; }
    .module-tab.locked { opacity: 0.65; }
    .tab-lock { font-size: 0.65rem; margin-right: 4px; }
    .module-grid-portal {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
    }
    .module-grid-compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .portal-mod-card {
        display: flex; flex-direction: column; align-items: flex-start; text-align: right;
        padding: 18px; border: 2px solid #e8eef4; border-radius: 14px; background: white;
        cursor: pointer; font-family: inherit; transition: all 0.2s;
    }
    .portal-mod-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(10,54,105,0.1); }
    .portal-mod-icon {
        width: 44px; height: 44px; border-radius: 12px; background: var(--gold-light);
        display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 10px;
    }
    .portal-mod-card h4 { margin: 0 0 6px; color: var(--primary); font-size: 0.95rem; }
    .portal-mod-card p { margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.5; flex: 1; }
    .portal-mod-meta { font-size: 0.72rem; color: var(--gold); margin-top: 10px; font-weight: 700; }
    .portal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
    .portal-actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
    .page-desc-inline { color: var(--muted); margin: -8px 0 16px; font-size: 0.92rem; }
    .resource-list { display: flex; flex-direction: column; gap: 12px; }
    .resource-card {
        display: flex; align-items: center; gap: 14px; padding: 16px;
        border: 2px solid #e8eef4; border-radius: 12px; background: white;
    }
    .resource-icon {
        width: 44px; height: 44px; border-radius: 10px; background: var(--gold-light);
        display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0;
    }
    .resource-body { flex: 1; min-width: 0; }
    .resource-body strong { display: block; color: var(--primary); margin-bottom: 4px; }
    .resource-body p { margin: 0 0 4px; font-size: 0.85rem; color: var(--muted); }
    .resource-body small { font-size: 0.78rem; color: #888; }
    .blog-list { display: flex; flex-direction: column; gap: 10px; }
    .blog-card {
        display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
        padding: 16px; border: 2px solid #e8eef4; border-radius: 12px; cursor: pointer;
        transition: all 0.2s; background: white;
    }
    .blog-card:hover { border-color: var(--gold); background: var(--gold-light); }
    .blog-card-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; }
    .blog-cat { font-size: 0.72rem; color: var(--gold); font-weight: 700; }
    .blog-card h3 { margin: 4px 0; font-size: 1rem; color: var(--primary); }
    .blog-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }
    .blog-arrow { color: var(--muted); }
    .guide-card-link, .universe-pill-link { cursor: pointer; transition: all 0.2s; }
    .guide-card-link:hover { border-color: var(--gold); transform: translateY(-2px); }
    .universe-pill-link:hover { background: var(--gold-light); border-color: var(--gold); }
    .breadcrumb-home {
        background: none; border: none; color: inherit; font-family: inherit;
        font-size: inherit; cursor: pointer; padding: 0; font-weight: 600;
    }
    .breadcrumb-home:hover { color: var(--gold); }
    .panel-form { max-width: 560px; }
    .coa-nav-card, .coa-tree-branch { cursor: pointer; transition: all 0.2s; }
    .coa-nav-card:hover, .coa-tree-branch:hover { border-color: var(--gold); background: var(--gold-light); }
    .gift-card-link { cursor: pointer; }
    .gov-nav-grid {
        display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px; margin-top: 24px;
    }
    .gov-nav-grid .nav-card {
        display: flex; flex-direction: column; align-items: center; gap: 10px;
        padding: 20px; border: 2px solid #e8eef4; border-radius: 12px; background: white;
        cursor: pointer; font-family: inherit; transition: all 0.2s;
    }
    .gov-nav-grid .nav-card i { font-size: 2rem; color: var(--primary); }
    .gov-nav-grid .nav-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(10,54,105,0.08); }

    /* ─── قوالب بخلفية مائية Accmaa ─── */
    .gifts-template-page .tpl-page-panel { position: relative; padding: 24px; }
    .tpl-doc-shell {
        position: relative; overflow: hidden; border-radius: 12px;
        background: linear-gradient(145deg, #ffffff 0%, #f4f8fc 100%);
    }
    .tpl-watermark {
        position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
        font-size: clamp(3rem, 12vw, 6rem); font-weight: 800; color: rgba(10, 54, 105, 0.07);
        transform: rotate(-28deg); pointer-events: none; user-select: none; z-index: 0;
        letter-spacing: 0.08em;
    }
    .tpl-doc-shell .tpl-doc { position: relative; z-index: 1; margin: 0; box-shadow: none; border-radius: 0; }
    .tpl-page-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
    .tpl-controls {
        display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 16px;
        border-bottom: 1px dashed #dde4ec;
    }
    .tpl-control-input {
        padding: 10px 12px; border-radius: 10px; border: 2px solid #e8eef4;
        font-family: inherit; min-width: 180px;
    }
    .tpl-control-wide { flex: 1; min-width: 240px; }

    /* ─── Icon thematic backgrounds (SVG img layer) ─── */
    .has-icon-bg {
        position: relative;
        overflow: hidden;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .has-icon-bg .icon-bg-layer {
        position: absolute; inset: 0; width: 100%; height: 100%;
        object-fit: cover; border-radius: inherit; z-index: 0; pointer-events: none;
        display: block;
    }
    .has-icon-bg::after {
        content: '';
        position: absolute; inset: 0;
        background: linear-gradient(145deg, rgba(0,0,0,0.08), rgba(0,0,0,0.02));
        border-radius: inherit; pointer-events: none; z-index: 1;
    }
    .has-icon-bg > i, .has-icon-bg .icon-bg-visual > i {
        position: relative; z-index: 2;
        color: #fff;
        text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }

    /* Card / menu thematic backgrounds */
    .has-card-bg {
        position: relative;
        overflow: hidden;
        isolation: isolate;
    }
    .has-card-bg::before {
        content: '';
        position: absolute; inset: 0; z-index: 0;
        background-image: var(--card-bg);
        background-size: cover;
        background-position: center top;
        pointer-events: none;
    }
    .has-card-bg::after {
        content: '';
        position: absolute; inset: 0; z-index: 0;
        pointer-events: none;
    }
    .has-card-bg > * { position: relative; z-index: 1; }
    .pillar-card.has-card-bg::after,
    .explore-card.has-card-bg::after,
    .gift-card.has-card-bg::after {
        background: linear-gradient(to bottom, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.42) 55%, rgba(255,255,255,0.78) 100%);
    }
    .main-inner.has-card-bg::after {
        background: linear-gradient(to bottom, rgba(255,255,255,0.78) 0%, rgba(248,250,252,0.94) 100%);
    }
    .icon-btn.has-card-bg::after {
        background: linear-gradient(to bottom, rgba(10,54,105,0.15) 0%, rgba(10,54,105,0.72) 100%);
    }
    .icon-btn.has-card-bg .icon-btn-label { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.55); }

    .gift-grid-9 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .gift-tax-cta {
        margin-top: 20px; padding: 20px; border-radius: 14px;
        background: linear-gradient(135deg, rgba(10,54,105,0.06), rgba(212,175,55,0.12));
        display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    }
    .dash-pref-banner { margin: 0 56px 24px; border: 2px solid var(--gold); }

    /* ─── وحدة الضريبة المضافة ─── */
    .tax-module .tax-hero {
        text-align: center; padding: 36px 24px; margin-bottom: 28px; border-radius: 20px;
        background: linear-gradient(135deg, var(--primary) 0%, #1a5a9e 55%, #0d4a7a 100%);
        color: white; position: relative; overflow: hidden;
    }
    .tax-module .tax-hero::after {
        content: '%'; position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
        font-size: 8rem; font-weight: 800; opacity: 0.08;
    }
    .tax-hero-badge {
        display: inline-block; background: rgba(212,175,55,0.25); color: var(--gold-light);
        padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; margin-bottom: 12px;
    }
    .tax-country-grid {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
    }
    .tax-country-card {
        display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px;
        border: 2px solid #e8eef4; border-radius: 14px; background: white; cursor: pointer;
        font-family: inherit; transition: all 0.2s;
    }
    .tax-country-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
    .tax-flag { font-size: 1.8rem; }
    .tax-flag-inline { font-size: 1.4rem; margin-left: 8px; }
    .premium-tax-panel { border: 2px solid var(--gold-light); }
    .tax-disclaimer { margin-top: 20px; font-size: 0.88rem; }
    .erp-kpi-grid { margin-bottom: 20px; }

    .tpl-doc-quote { border-top-color: #0A3669; }
    .tpl-doc-quote .tpl-doc-header { border-bottom-color: #0A3669; }
    .tpl-doc-quote th { background: #0A3669; }
    .tpl-doc-invoice { border-top-color: #1b6b4a; }
    .tpl-doc-invoice .tpl-doc-header { border-bottom-color: #1b6b4a; }
    .tpl-doc-invoice th { background: #1b6b4a; }
    .tpl-doc-payment { border-top-color: #b45309; }
    .tpl-doc-payment .tpl-doc-header { border-bottom-color: #b45309; }
    .tpl-doc-payment th { background: #b45309; }
    .tpl-doc-receipt { border-top-color: #5c3d8a; }
    .tpl-doc-receipt .tpl-doc-header { border-bottom-color: #5c3d8a; }
    .tpl-doc-receipt th { background: #5c3d8a; }
    .tpl-doc-claim { border-top-color: #9f1239; }
    .tpl-doc-claim .tpl-doc-header { border-bottom-color: #9f1239; }
    .tpl-doc-claim th { background: #9f1239; }
    .tpl-doc-claim .tpl-field[style*="font-size:1.1rem"] {
        background: linear-gradient(135deg, #fff5f5, #ffe4e6); border-color: #fecdd3;
    }
