/* Accmaa — معلومات محاسبية ديناميكية مكان دائرة اللوجو */

.topbar-start--insights {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: min(260px, 28vw);
    max-width: min(380px, 36vw);
    flex: 0 1 auto;
    justify-content: flex-start;
}

.topbar-home-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8c547, #d4af37);
    color: #061f3d !important;
    font-weight: 800;
    font-size: 0.82rem;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    letter-spacing: 0.02em;
}

.topbar-home-chip:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.topbar-acct-insights {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 56px;
    padding: 6px 12px 6px 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(10, 54, 105, 0.16);
    box-shadow: 0 4px 14px rgba(10, 54, 105, 0.08);
    overflow: hidden;
}

.topbar-acct-insights__badge {
    position: absolute;
    top: 4px;
    inset-inline-start: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.62rem;
    font-weight: 800;
    color: #8a6d12 !important;
    letter-spacing: 0.02em;
    z-index: 2;
}

.topbar-acct-insights__badge i {
    font-size: 0.68rem;
    color: #C9A227 !important;
}

.topbar-acct-insights__track {
    position: relative;
    height: 100%;
    padding-top: 14px;
}

.topbar-acct-insights__text {
    margin: 0;
    position: absolute;
    inset-inline: 0;
    top: 16px;
    font-size: clamp(0.72rem, 1.15vw, 0.86rem);
    font-weight: 800;
    line-height: 1.4;
    color: #0A3669 !important;
    -webkit-text-fill-color: #0A3669 !important;
    text-shadow: none !important;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    padding-inline-end: 4px;
}

.topbar-acct-insights__text.is-active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    top: 0;
}

.topbar-acct-insights__text.is-exit {
    opacity: 0;
    transform: translateY(-8px);
}

.topbar-acct-insights__text.is-enter {
    opacity: 0;
    transform: translateY(10px);
}

/* إخفاء دائرة اللوجو القديمة إن وُجدت بالخطأ */
.topbar-start--insights .topbar-brand-link--aqueous,
.topbar-row-main .topbar-brand-link--aqueous {
    display: none !important;
}

body.guest-mode .topbar-premium.is-scrolled .topbar-acct-insights {
    height: 48px;
}

body.guest-mode .topbar-premium.is-scrolled .topbar-acct-insights__text {
    font-size: 0.72rem;
}

@media (max-width: 1100px) {
    .topbar-start--insights {
        min-width: min(340px, 42vw);
        max-width: 46vw;
    }
}

/* تابلت + موبايل: صف كامل حتى لا تُقصّ المعلومة */
@media (max-width: 900px) {
    body.guest-mode .topbar-row--swapped .topbar-start.topbar-start--insights,
    body.guest-mode .topbar-row-main .topbar-start.topbar-start--insights,
    .topbar-start.topbar-start--insights {
        order: 3 !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-top: 4px !important;
        gap: 8px !important;
    }

    .topbar-start--insights .topbar-home-chip {
        display: none !important;
    }

    .topbar-acct-insights {
        width: 100%;
        height: auto !important;
        min-height: 58px;
        padding: 8px 12px 10px;
        overflow: visible;
    }

    .topbar-acct-insights__track {
        height: auto;
        min-height: 2.6em;
        padding-top: 16px;
    }

    .topbar-acct-insights__text,
    .topbar-acct-insights__text.is-active {
        position: relative !important;
        top: 0 !important;
        inset: auto !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        font-size: 0.78rem !important;
        line-height: 1.45 !important;
        color: #0A3669 !important;
        -webkit-text-fill-color: #0A3669 !important;
    }
}

@media (max-width: 640px) {
    .topbar-acct-insights {
        min-height: 62px;
        border-radius: 14px;
    }
    .topbar-acct-insights__text,
    .topbar-acct-insights__text.is-active {
        font-size: 0.74rem !important;
    }
}
