.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* LTR layout adjustments when interface is English */
html[dir="ltr"] body {
    text-align: left;
}

html[dir="ltr"] .shell {
    direction: ltr;
}

html[dir="ltr"] .app-sidebar {
    border-inline-end: 1px solid #1e293b;
    border-inline-start: none;
}

html[dir="ltr"] .sidebar-search {
    padding-inline-start: 12px;
    padding-inline-end: 38px;
}

html[dir="ltr"] .topbar-brand h1 span {
    margin-inline-start: 4px;
    margin-inline-end: 0;
}

html[dir="ltr"] .module-hub-card,
html[dir="ltr"] .settings-hub-card {
    text-align: left;
}

html[dir="ltr"] .page-breadcrumb,
html[dir="ltr"] .breadcrumb {
    direction: ltr;
}

html[dir="ltr"] .auth-meta-row,
html[dir="ltr"] .auth-card {
    text-align: left;
}

html[dir="ltr"] .stat-strip {
    direction: ltr;
}

html[dir="ltr"] .locale-switcher {
    flex-direction: row;
}

.locale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border, #e2e8f0);
}

html.dark .locale-switcher {
    background: rgba(255, 255, 255, 0.06);
    border-color: #334155;
}

.locale-switcher__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    color: var(--muted, #64748b);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.locale-switcher__btn:hover {
    color: var(--text, #1a202c);
    background: rgba(0, 0, 0, 0.05);
}

.locale-switcher__btn--active {
    color: #fff;
    background: var(--accent, #14532d);
}

html.dark .locale-switcher__btn--active {
    color: #ecfdf5;
}

.auth-topbar .locale-switcher {
    margin-inline-end: 0;
    align-self: center;
    vertical-align: middle;
}

.auth-topbar-action .locale-switcher {
    flex-shrink: 0;
}

.topbar-actions .locale-switcher {
    margin-inline-end: 4px;
}

@media (max-width: 640px) {
    .locale-switcher__btn {
        min-width: 32px;
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* كرة أرضية واحدة — نقرة للتبديل */
.locale-switcher--globe {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.locale-switcher--globe:hover {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 122, 85, 0.15);
}

.locale-switcher__globe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.locale-switcher__svg {
    display: block;
}

.locale-switcher__badge {
    position: absolute;
    bottom: 2px;
    inset-inline-end: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #0d7a55;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    font-family: Cairo, system-ui, sans-serif;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
}

html.dark .locale-switcher--globe {
    color: #cbd5e1;
    background: #1e293b;
    border-color: #475569;
}

html.dark .locale-switcher--globe:hover {
    color: #6ee7b7;
    background: #052e16;
    border-color: #166534;
}

html.dark .locale-switcher__badge {
    background: #0f766e;
    color: #ecfdf5;
}
