/**
 * Accmaa — دائرة اللوجو الداخلية فقط (الحلقة السوداء) · بدون إطار أبيض فارغ خارجها
 */

/* جودة عرض اللوجو في كامل المنصة */
img.brand-logo,
img.sidebar-logo,
img.topbar-logo,
img.modal-logo,
img.footer-logo,
img.about-logo,
img.hero-orbit-core-logo,
img.accmaa-orbit-core-logo,
img.accmaa-brand-intro-logo,
img[data-accmaa-logo] {
    image-rendering: auto !important;
    -ms-interpolation-mode: bicubic;
    backface-visibility: hidden;
    transform: translateZ(0);
    max-width: 100%;
}

/* ===== الغلاف الدائري (الهيدر — إن وُجد) ===== */
.topbar-brand-link--aqueous {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: clamp(56px, 7vw, 72px) !important;
    height: clamp(56px, 7vw, 72px) !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

body.guest-mode .topbar-premium.is-scrolled .topbar-brand-link--aqueous {
    width: clamp(52px, 6.5vw, 68px) !important;
    height: clamp(52px, 6.5vw, 68px) !important;
    padding: 0 !important;
}

.logo-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 14px 12px 12px !important;
}

/* قاعدة اللوجو: بدون قصّ دائري على الصورة نفسها */
img.brand-logo.brand-logo--disk,
img.topbar-logo,
img.sidebar-logo,
img.modal-logo,
img.about-logo,
img.footer-logo,
img.brand-logo--official,
img.brand-logo--aqueous {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    box-sizing: border-box !important;
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}

.topbar-brand-link--aqueous .topbar-logo,
.topbar-brand-link--aqueous img.brand-logo {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    aspect-ratio: auto !important;
}

/* سايدبار — دائرة اللوجو الداخلية تملأ المكان بدون إطار أبيض فارغ */
.logo-box .sidebar-logo,
aside .sidebar-logo,
.sidebar .sidebar-logo {
    width: 112px !important;
    height: 112px !important;
    max-width: 112px !important;
    max-height: 112px !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    object-position: center center !important;
    box-sizing: border-box !important;
    display: block !important;
    margin: 0 auto !important;
}

/* نص تحت اللوجو — واضح على الخلفية الداكنة */
.logo-box small,
#sidebarSubtitle {
    opacity: 1 !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    display: block !important;
    margin-top: 10px !important;
    color: #e8c547 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    max-width: 92%;
}

/* مودال / من نحن / فوتر — الدائرة الداخلية فقط تملأ الفتحة */
.modal-logo,
.about-logo,
.footer-logo {
    width: 108px !important;
    height: 108px !important;
    max-width: 120px !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 50% !important;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.14) !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
}

.footer-logo {
    width: 92px !important;
    height: 92px !important;
    padding: 0 !important;
}

.brand-logo-wrap,
.brand-logo-wrap--official,
.topbar-start--logo-prominent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.brand-logo-wrap--official {
    padding: 0 !important;
}

.brand-logo-wrap::after,
.brand-logo-wrap--official::after {
    display: none !important;
}

/* هيرو أوربت — الدائرة الداخلية تملأ القرص بدون حلقة بيضاء فارغة */
.hero-orbit-core-disk,
.accmaa-orbit-core-disk {
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    border-radius: 50% !important;
}

.hero-orbit-core-logo,
.accmaa-orbit-core-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    clip-path: none !important;
}

/* دخلة المنصة — الدائرة الداخلية فقط تملأ المكان */
.accmaa-brand-intro-logo-wrap {
    width: 148px !important;
    height: 148px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

.accmaa-brand-intro-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.dash-landing--organized,
.accmaa-pdf-tools-page,
.tafqeet-page,
.gifts-hub,
.gifts-hub-page,
.main-inner,
.dash-landing,
.dash-flow,
.dash-home,
.studio-page,
.tax-module,
.ak-courses-browse,
.ak-home-board,
.ak-tools-page,
.admin-shell,
.erp-shell,
.content-panel.panel-premium {
    position: relative;
}

.dash-landing--organized::before,
.accmaa-pdf-tools-page::before,
.tafqeet-page::before,
.gifts-hub::before,
.gifts-hub-page::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    width: min(440px, 58vw);
    height: min(300px, 40vw);
    pointer-events: none;
    z-index: 0;
    background: url('../images/Accmaa-logo-official-hq.png') center / contain no-repeat;
    opacity: 0.07;
}

/* لا تكرار شبحي على كل لوحة داخلية — الطبقة العامة من system-integrity */
.main-inner::before,
.dash-landing::before,
.dash-flow::before,
.dash-home::before,
.studio-page::before,
.tax-module::before,
.ak-courses-browse::before,
.ak-home-board::before,
.ak-tools-page::before,
.admin-shell::before,
.erp-shell::before {
    content: none;
    background: none;
}

.main-inner > *,
.dash-landing > *,
.dash-flow > *,
.dash-home > *,
.studio-page > *,
.tax-module > *,
.ak-courses-browse > *,
.ak-home-board > *,
.ak-tools-page > *,
.accmaa-pdf-tools-page > *,
.tafqeet-page > *,
.gifts-hub-page > *,
.admin-shell > *,
.erp-shell > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .logo-box .sidebar-logo,
    aside .sidebar-logo,
    .sidebar .sidebar-logo {
        width: 96px !important;
        height: 96px !important;
        max-width: 96px !important;
        max-height: 96px !important;
        padding: 0 !important;
    }

    .topbar-brand-link--aqueous {
        width: clamp(48px, 14vw, 64px) !important;
        height: clamp(48px, 14vw, 64px) !important;
        padding: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topbar-brand-link--aqueous {
        transition: none;
    }
}
