html[lang="ae"] .b3na-scope,
html[lang="ar"] .b3na-scope {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

html[lang="en"] .b3na-scope {
    direction: ltr;
    text-align: left;
    font-family: 'Cairo', sans-serif;
}

html[lang="ae"] .b3na-scope .b3acc-passwrap .b3acc-input,
html[lang="ar"] .b3na-scope .b3acc-passwrap .b3acc-input {
    padding-right: 42px !important;
    padding-left: 12px !important;
}

html[lang="en"] .b3na-scope .b3acc-passwrap .b3acc-input {
    padding-left: 42px !important;
    padding-right: 12px !important;
}

html[lang="ae"] .b3na-scope .b3acc-toggle-pass,
html[lang="ar"] .b3na-scope .b3acc-toggle-pass {
    right: 10px;
    left: auto;
}

html[lang="en"] .b3na-scope .b3acc-toggle-pass {
    left: 10px;
    right: auto;
}

html[lang="ae"] .b3na-scope .b3acc-links,
html[lang="ar"] .b3na-scope .b3acc-links {
    justify-content: flex-start;
}

html[lang="en"] .b3na-scope .b3acc-links {
    justify-content: flex-start;
}

html[lang="ae"] .b3na-scope .iti input.b3acc-input,
html[lang="ar"] .b3na-scope .iti input.b3acc-input,
html[lang="en"] .b3na-scope .iti input.b3acc-input {
    direction: ltr;
}

/* ====== Base / Tokens ====== */
.b3na-scope {
    all: initial;
    font-family: 'Cairo', sans-serif;
    box-sizing: border-box;

    --b3acc-primary: #007aff;
    --b3acc-primary-strong: #0062cc;
    --b3acc-primary-soft: rgba(0, 122, 255, .10);

    --b3acc-text: #0f172a;
    --b3acc-muted: #64748b;

    --b3acc-surface: #ffffff;
    --b3acc-surface-2: #f7f9fc;
    --b3acc-border: #e5e7eb;

    --b3acc-radius-xl: 22px;
    --b3acc-radius-lg: 14px;
    --b3acc-radius-md: 12px;

    --b3acc-shadow: 0 16px 55px rgba(2, 6, 23, 0.16);
    --b3acc-shadow-soft: 0 10px 26px rgba(2, 6, 23, 0.10);

    --b3acc-focus: 0 0 0 3px rgba(0, 122, 255, 0.22);
    --b3acc-transition: all .22s cubic-bezier(.2, .8, .2, 1);
}

.b3na-scope * {
    box-sizing: border-box;
}

.b3na-scope [hidden] {
    display: none !important;
}

/* =========================================================
   Modal + Backdrop
   ========================================================= */
.b3acc-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10060;
    font-family: inherit;
}

.b3acc-modal.b3na-open {
    display: block;
}

.b3acc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    opacity: 0;
    transition: opacity .25s ease;
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    .b3acc-backdrop {
        background: rgba(2, 6, 23, 0.45);
        -webkit-backdrop-filter: blur(1px);
        backdrop-filter: blur(1px);
    }
}

.b3na-open .b3acc-backdrop {
    opacity: 1;
}

/* =========================================================
   Dialog
   ========================================================= */
.b3acc-dialog {
    position: relative;
    width: clamp(300px, 92vw, 440px);
    max-width: 440px;
    margin: 7vh auto 0;

    background: var(--b3acc-surface);
    color: var(--b3acc-text);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--b3acc-radius-xl);
    box-shadow: var(--b3acc-shadow);

    transform: translateY(18px) scale(.975);
    opacity: 0;
    transition: var(--b3acc-transition);
    overflow: hidden;

    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 32px);
    overscroll-behavior: contain;
}

.b3na-open .b3acc-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.b3acc-dialog::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(1200px 300px at 50% -20%, rgba(0, 122, 255, 0.10) 0%, transparent 60%);
}

/* =========================================================
   Header
   ========================================================= */
.b3acc-header {
    position: sticky;
    top: 0;
    padding: 16px 52px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(180deg, #ffffff 0%, var(--b3acc-surface-2) 100%);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    z-index: 2;
}

.b3acc-title {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: #0b1220;
    letter-spacing: .2px;
}

.b3acc-close {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--b3acc-transition);
}

.b3acc-close:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, .14);
    box-shadow: 0 6px 14px rgba(2, 6, 23, .08);
    transform: translateY(-50%) scale(1.02);
}

.b3acc-close:active {
    transform: translateY(-50%) scale(.98);
}

/* =========================================================
   Body
   ========================================================= */
.b3acc-body {
    padding: 18px 18px 22px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}

/* =========================================================
   Tabs — Cleaner Pill
   ========================================================= */
.b3acc-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;

    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 14px;
}

.b3acc-tab {
    background: transparent;
    border: 0;
    border-radius: 12px;
    padding: 10px 10px;
    cursor: pointer;

    font-weight: 900;
    color: rgba(15, 23, 42, 0.62);
    text-align: center;
    transition: var(--b3acc-transition);
}

.b3acc-tab:hover {
    background: rgba(0, 122, 255, 0.08);
    color: rgba(15, 23, 42, 0.85);
}

.b3acc-tab.b3acc-active {
    background: #fff;
    color: #0b1220;
    box-shadow: var(--b3acc-shadow-soft);
}

/* =========================================================
   Forms
   ========================================================= */
.b3acc-form {
    display: block;
}

.b3acc-form.b3acc-active {
    display: block !important;
}

.b3acc-form.b3acc-inactive {
    display: none !important;
}

.b3acc-field {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.b3acc-label {
    font-size: 13px;
    color: var(--b3acc-muted);
    font-weight: 800;
}

/* =========================================================
   Inputs
   ========================================================= */
.b3acc-input {
    height: 48px !important;
    border-radius: var(--b3acc-radius-md);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #fff;
    color: var(--b3acc-text);

    padding: 0 12px !important;
    font-size: 16px;
    width: 100%;
    min-width: 0;

    transition: var(--b3acc-transition);
}

.b3acc-input:hover {
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.06);
}

.b3acc-input:focus {
    border-color: var(--b3acc-primary);
    box-shadow: var(--b3acc-focus);
}

.b3na-scope .b3acc-input::placeholder {
    opacity: 0.30;
    color: #0f172a;
}

/* Password wrapper */
.b3acc-passwrap {
    position: relative;
}

/* Toggle pass */
.b3acc-toggle-pass {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #fff;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    outline: none;
    color: #64748b;

    transition: var(--b3acc-transition);
}

.b3acc-toggle-pass:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.08);
}

.b3acc-toggle-pass:active {
    transform: translateY(-50%) scale(.97);
}

.b3acc-toggle-pass--active {
    background: var(--b3acc-primary-soft);
    border-color: rgba(0, 122, 255, 0.55);
    color: var(--b3acc-primary-strong);
}

/* =========================================================
   Buttons — Upgraded (this is the "زيادة" you asked for)
   ========================================================= */
.b3acc-actions {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.b3acc-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    height: 46px;
    padding: 0 16px;
    border-radius: 14px;

    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 950;
    font-size: 15px;
    letter-spacing: .1px;

    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: var(--b3acc-transition);
    will-change: transform, box-shadow;
}

/* Focus */
.b3acc-btn:focus {
    outline: none;
}

.b3acc-btn:focus-visible {
    box-shadow: var(--b3acc-focus);
}

/* Disabled */
.b3acc-btn:disabled,
.b3acc-btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* PRIMARY */
.b3acc-btn--primary {
    color: #fff;
    background:linear-gradient(180deg, #2b97ff 0%, #007aff 55%, #0067d6 100%);
    border-color: rgba(0, 122, 255, 0.35);

}

/* Shine layer */
.b3acc-btn--primary::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 13px;
    pointer-events: none;
    background: radial-gradient(120% 140% at 20% 0%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.10) 35%, transparent 60%);
    opacity: .9;
}

/* Hover / Active */
.b3acc-btn--primary:hover {
    transform: translateY(-1px);
    filter: saturate(1.06);

}

.b3acc-btn--primary:active {
    transform: translateY(0);
    filter: saturate(1.02);

}

/* SECONDARY (glass) */
.b3acc-btn:not(.b3acc-btn--primary) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    color: #0b1220;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.08);
}

.b3acc-btn:not(.b3acc-btn--primary):hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.10);
}

.b3acc-btn:not(.b3acc-btn--primary):active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.08);
}

/* Optional: loading state (if you add class="is-loading") */
.b3acc-btn.is-loading {
    pointer-events: none;
    opacity: .85;
}

.b3acc-btn.is-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: rgba(255, 255, 255, 0.15);
    display: inline-block;
    animation: b3acc-spin .8s linear infinite;
}

.b3acc-btn:not(.b3acc-btn--primary).is-loading::after {
    border: 2px solid rgba(15, 23, 42, 0.30);
    border-top-color: rgba(15, 23, 42, 0.10);
}

@keyframes b3acc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   Links
   ========================================================= */
.b3acc-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 2px 10px;
}

.b3acc-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 900;
    color: var(--b3acc-primary);
    cursor: pointer;
    text-decoration: none;
    transition: var(--b3acc-transition);
}

.b3acc-link:hover {
    color: var(--b3acc-primary-strong);
    text-decoration: underline;
}

/* =========================================================
   Divider
   ========================================================= */
.b3acc-divider {
    position: relative;
    text-align: center;
    margin: 14px 0 8px;
    color: rgba(100, 116, 139, .95);
    font-size: 13px;
    font-weight: 800;
}

.b3acc-divider::before,
.b3acc-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(15, 23, 42, 0.10);
}

.b3acc-divider::before {
    right: 0;
}

.b3acc-divider::after {
    left: 0;
}

.b3acc-modernlink {
    text-align: center;
}

.b3acc-modernlink button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    color: var(--b3acc-primary);
    transition: var(--b3acc-transition);
}

.b3acc-modernlink button:hover {
    color: var(--b3acc-primary-strong);
    text-decoration: underline;
}

/* =========================================================
   intl-tel-input
   ========================================================= */
.iti {
    width: 100%;
}

.iti input.b3acc-input {
    padding-left: 48px !important;
}

.iti--fullscreen-popup .iti__country-list {
    direction: ltr;
}

/* =========================================================
   Errors / Alerts
   ========================================================= */
.b3acc-field.error .b3acc-input {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .12) !important;
}

.b3acc-error {
    color: #b71c1c;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    padding: 8px 10px;
    border-radius: var(--b3acc-radius-md);
    font-size: 13px;
    margin-top: 8px;
    font-weight: 800;
}

.b3acc-alert {
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #f8fafc;
    color: #0b1220;
    padding: 10px 12px;
    border-radius: var(--b3acc-radius-md);
    font-size: 14px;
    margin: 8px 0 12px;
    font-weight: 800;
}

.b3acc-alert--error {
    border-color: #ffcdd2;
    background: #fff5f5;
    color: #b71c1c;
}

.b3acc-alert--success {
    border-color: #c8e6c9;
    background: #f1fff2;
    color: #1b5e20;
}

.b3acc-alert--info {
    border-color: rgba(0, 122, 255, .22);
    background: #f1f7ff;
    color: #0d47a1;
}

/* =========================================================
   OTP
   ========================================================= */
.b3acc-otp-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.b3acc-otp-title {
    font-weight: 950;
    font-size: 18px;
    color: #0b1220;
}

.b3acc-otp-sub {
    color: var(--b3acc-muted);
    font-size: 14px;
    line-height: 1.8;
}

.b3acc-otp-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;

    background: rgba(0, 122, 255, .10);
    border: 1px solid rgba(0, 122, 255, .18);
    color: #0b1220;

    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
}

#otp-single {
    text-align: center;
    letter-spacing: 4px;
    font-weight: 900;
    font-size: 20px;
    height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    width: 100%;
}

#otp-single:focus {
    border-color: var(--b3acc-primary);
    box-shadow: var(--b3acc-focus);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 480px) {
    .b3acc-dialog {
        margin: 4vh auto 0;
    }

    .b3acc-header {
        padding: 14px 48px;
    }
}

/* =========================================================
   Dark Mode (dialog = #181818) + button tuning
   ========================================================= */
body.dark-mode .b3na-scope {
    color: #f1f1f1;

    --b3acc-surface: #181818;
    --b3acc-surface-2: #1d1d1d;
    --b3acc-border: rgba(255, 255, 255, 0.12);

    --b3acc-text: #f1f1f1;
    --b3acc-muted: rgba(255, 255, 255, 0.72);

    --b3acc-shadow: 0 18px 55px rgba(0, 0, 0, 0.60);
    --b3acc-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.45);

    --b3acc-focus: 0 0 0 3px rgba(0, 122, 255, 0.30);
}

/* Backdrop */
body.dark-mode .b3na-scope .b3acc-backdrop {
    background: rgba(0, 0, 0, 0.65);
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    body.dark-mode .b3na-scope .b3acc-backdrop {
        background: rgba(0, 0, 0, 0.50);
        -webkit-backdrop-filter: blur(1px);
        backdrop-filter: blur(1px);
    }
}

/* Dialog */
body.dark-mode .b3na-scope .b3acc-dialog {
    background: var(--b3acc-surface);
    color: var(--b3acc-text);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--b3acc-shadow);
}

body.dark-mode .b3na-scope .b3acc-dialog::before {
    background:
        radial-gradient(1200px 300px at 50% -20%, rgba(0, 122, 255, 0.14) 0%, transparent 60%);
}

/* Header */
body.dark-mode .b3na-scope .b3acc-header {
    background: linear-gradient(180deg, #181818 0%, #1d1d1d 100%);
    border-bottom-color: rgba(255, 255, 255, 0.10);
}

body.dark-mode .b3na-scope .b3acc-title {
    color: #ffffff;
}

/* Close button */
body.dark-mode .b3na-scope .b3acc-close {
    background: #222;
    border-color: rgba(255, 255, 255, 0.16);
    color: #e5e7eb;
}

body.dark-mode .b3na-scope .b3acc-close:hover {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.22);
}

/* Tabs */
body.dark-mode .b3na-scope .b3acc-tabs {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .b3na-scope .b3acc-tab {
    color: rgba(255, 255, 255, 0.70);
}

body.dark-mode .b3na-scope .b3acc-tab:hover {
    background: rgba(0, 122, 255, .16);
    color: #ffffff;
}

body.dark-mode .b3na-scope .b3acc-tab.b3acc-active {
    background: #2a2a2a;
    color: #ffffff;
}

/* Inputs */
body.dark-mode .b3na-scope .b3acc-input,
body.dark-mode .b3na-scope #otp-single {
    background: #222;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

body.dark-mode .b3na-scope .b3acc-input:hover {
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

body.dark-mode .b3na-scope .b3acc-input:focus,
body.dark-mode .b3na-scope #otp-single:focus {
    border-color: var(--b3acc-primary);
    box-shadow: var(--b3acc-focus);
}

body.dark-mode .b3na-scope .b3acc-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
    opacity: 1;
}

/* Buttons (dark) */
body.dark-mode .b3na-scope .b3acc-btn:not(.b3acc-btn--primary) {
    background: linear-gradient(180deg, rgba(34, 34, 34, 0.96) 0%, rgba(28, 28, 28, 0.96) 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

body.dark-mode .b3na-scope .b3acc-btn:not(.b3acc-btn--primary):hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}












@media (max-width: 768px) {
  .user-actions {
    gap: 9px; /* مسافة أكبر بين الأزرار */
  }
  
  .user-actions .icon-btn,
  .user-actions .dm-btn,
  .user-actions .account-trigger {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  
  /* توسيط الأيقونات بشكل صحيح */
  .user-actions .btn-icon,
  .user-actions svg.btn-icon {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: auto !important;
  }
  
  .user-actions .acc-item-text {
    font-size: 13px !important;
  }
  
  .user-actions .account-trigger {
    gap: 0px !important;
    padding: 0 !important;
    width: 40px !important;
  }
  
  .user-actions .chevron {
    display: none !important;
  }
  
  .user-actions .acc-item-text .desktop-text,
  .user-actions .acc-item-text span:not(.mobile-text) {
    display: none !important;
  }
}

/* للهواتف الصغيرة */
@media (max-width: 480px) {
  .user-actions {
    gap: 6px;
  }
  
  .user-actions .icon-btn,
  .user-actions .dm-btn,
  .user-actions .account-trigger {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
  
  .user-actions .btn-icon,
  .user-actions svg.btn-icon {
    width: 18px !important;
    height: 18px !important;
  }
}

@media (min-width: 769px) {
  .user-actions .acc-item-text .mobile-text {
    display: none;
  }
}