/* ═══════════════════════════════════════════════════════════════
   BBB Converter — Professional Admin Theme
   Vazirmatn (local) + Bootstrap 5.3.3 RTL (local)
   ═══════════════════════════════════════════════════════════════ */

/* ── Fonts ──────────────────────────────────────────────────── */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400; font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500; font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600; font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700; font-display: swap;
}

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
    --sidebar-w:       260px;
    --sidebar-bg:      #0f172a;
    --sidebar-hover:   rgba(255,255,255,.06);
    --sidebar-active:  #2563eb;
    --sidebar-border:  rgba(255,255,255,.07);
    --sidebar-text:    #94a3b8;
    --sidebar-head:    #64748b;

    --main-bg:         #f1f5f9;
    --card-bg:         #ffffff;
    --border-color:    #e2e8f0;

    --blue:    #2563eb;
    --indigo:  #4f46e5;
    --green:   #16a34a;
    --amber:   #d97706;
    --red:     #dc2626;
    --slate:   #475569;
    --cyan:    #0891b2;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:  0 4px 12px rgba(0,0,0,.1);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.12);

    --radius:  12px;
    --radius-sm: 8px;
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 15px; }

body {
    font-family: 'Vazirmatn', system-ui, sans-serif;
    background: var(--main-bg);
    color: #1e293b;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    top: 0; right: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: transform .3s ease;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-brand-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37,99,235,.4);
}
.sidebar-brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    line-height: 1.2;
}
.sidebar-brand-sub {
    font-size: .7rem;
    color: var(--sidebar-text);
    margin-top: 1px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-section-label {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--sidebar-head);
    text-transform: uppercase;
    padding: 12px 8px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: all .18s ease;
    margin-bottom: 2px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
}
.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar-link.active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,.35);
}
.sidebar-link .link-icon {
    width: 20px; text-align: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.sidebar-link .link-badge {
    margin-right: auto;
    background: rgba(255,255,255,.15);
    font-size: .65rem;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 700;
}
.sidebar-link.active .link-badge {
    background: rgba(255,255,255,.25);
}

/* User area */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--sidebar-border);
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.user-name {
    font-size: .85rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.2;
}
.user-role {
    font-size: .7rem;
    color: var(--sidebar-text);
}
.btn-logout {
    margin-right: auto;
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    font-size: 1rem;
    transition: all .15s;
    display: flex; align-items: center;
}
.btn-logout:hover { background: rgba(220,38,38,.2); color: #f87171; }

/* Mobile sidebar toggle */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
}

/* ════════════════════════════════════════════════════════════
   MAIN CONTENT
   ════════════════════════════════════════════════════════════ */
.main-content {
    margin-right: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}
.topbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
.topbar-sub {
    font-size: .78rem;
    color: #94a3b8;
    margin-top: 1px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Mobile hamburger */
.btn-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #475569;
    cursor: pointer;
    padding: 4px;
}

/* Page body */
.page-body { padding: 24px 28px; flex: 1; }

/* ════════════════════════════════════════════════════════════
   STAT CARDS (gradient)
   ════════════════════════════════════════════════════════════ */
.stat-cards { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; margin-bottom: 24px; }

.stat-card {
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.stat-card-blue   { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
.stat-card-slate  { background: linear-gradient(135deg,#475569,#334155); }
.stat-card-amber  { background: linear-gradient(135deg,#f59e0b,#b45309); }
.stat-card-green  { background: linear-gradient(135deg,#16a34a,#15803d); }
.stat-card-red    { background: linear-gradient(135deg,#dc2626,#b91c1c); }

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label { font-size: .82rem; opacity: .85; }
.stat-icon-bg {
    position: absolute;
    bottom: -8px; left: -8px;
    font-size: 4.5rem;
    opacity: .12;
    line-height: 1;
}

/* ════════════════════════════════════════════════════════════
   CARDS (general)
   ════════════════════════════════════════════════════════════ */
.card-panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.card-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: .9rem;
    color: #0f172a;
    gap: 12px;
}

/* ════════════════════════════════════════════════════════════
   TABLE
   ════════════════════════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    background: #f8fafc;
    padding: 12px 16px;
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}
.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table td {
    padding: 13px 16px;
    font-size: .88rem;
    vertical-align: middle;
    color: #334155;
}
.data-table th:first-child, .data-table td:first-child { padding-right: 24px; }
.data-table th:last-child, .data-table td:last-child { padding-left: 24px; }

/* Recording ID chip */
.rec-chip {
    font-family: 'Courier New', monospace;
    font-size: .75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 6px;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    cursor: default;
    color: #334155;
}

/* Status badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-pending    { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-processing { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.badge-cancelling { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }
.badge-cancelled  { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; text-decoration: line-through; }
.badge-completed  { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.badge-failed     { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* Mode badge */
.badge-mode {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: .72rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Action buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
    font-size: .9rem;
    text-decoration: none;
}
.btn-action:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-action-download { border-color: #86efac; color: #16a34a; }
.btn-action-download:hover { background: #f0fdf4; color: #15803d; }
.btn-action-cancel { border-color: #fdba74; color: #ea580c; }
.btn-action-cancel:hover { background: #fff7ed; color: #c2410c; box-shadow: var(--shadow-sm); }
.btn-action-delete { border-color: #fca5a5; color: #dc2626; }
.btn-action-delete:hover { background: #fef2f2; color: #b91c1c; }

/* ════════════════════════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #94a3b8;
}
.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    opacity: .4;
}
.empty-state-title { font-weight: 600; color: #475569; margin-bottom: 6px; font-size: 1rem; }
.empty-state-sub { font-size: .85rem; }

/* ════════════════════════════════════════════════════════════
   SERVER CARDS
   ════════════════════════════════════════════════════════════ */
.server-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .2s, transform .2s;
    overflow: hidden;
}
.server-card:hover { border-color: #93c5fd; box-shadow: var(--shadow-md); transform: translateY(-2px); }

.server-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f1f5f9;
}
.server-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.server-name { font-weight: 700; color: #0f172a; line-height: 1.3; }
.server-url { font-size: .78rem; color: #64748b; text-decoration: none; }
.server-url:hover { color: var(--blue); }

.key-badge-yes { background:#f0fdf4; color:#166534; border:1px solid #86efac; font-size:.72rem; padding:3px 9px; border-radius:20px; font-weight:600; display:inline-flex; align-items:center; gap:4px; }
.key-badge-no  { background:#fffbeb; color:#92400e; border:1px solid #fcd34d; font-size:.72rem; padding:3px 9px; border-radius:20px; font-weight:600; display:inline-flex; align-items:center; gap:4px; }

.server-card-body { padding: 16px 20px; }
.server-card-footer { padding: 12px 20px; background: #f8fafc; border-top: 1px solid #f1f5f9; display:flex; align-items:center; justify-content:space-between; }

/* ════════════════════════════════════════════════════════════
   FORM ELEMENTS (improved)
   ════════════════════════════════════════════════════════════ */
.form-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 28px;
}
.form-label { font-weight: 600; font-size: .87rem; color: #374151; margin-bottom: 6px; }
.form-control, .form-select {
    border-color: #d1d5db;
    border-radius: 8px;
    padding: .55rem .9rem;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-size: .88rem;
    color: #111827;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-text { color: #6b7280; font-size: .78rem; margin-top: 4px; }
.recordings-textarea { font-family: 'Courier New', monospace; font-size: .8rem; min-height: 110px; resize: vertical; }

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn-primary-custom {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.4rem;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all .15s;
    text-decoration: none;
}
.btn-primary-custom:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,.35); color: #fff; transform: translateY(-1px); }

.btn-outline-custom {
    background: transparent;
    color: #475569;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: .55rem 1.2rem;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-weight: 500;
    font-size: .88rem;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all .15s;
    text-decoration: none;
}
.btn-outline-custom:hover { background: #f8fafc; border-color: #94a3b8; color: #334155; }

.btn-danger-custom {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: .5rem 1rem;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all .15s;
}
.btn-danger-custom:hover { background: #dc2626; color: #fff; border-color: #dc2626; }

/* ════════════════════════════════════════════════════════════
   ALERTS / TOASTS
   ════════════════════════════════════════════════════════════ */
.alert-success-custom {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-right: 4px solid #16a34a;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
    color: #166534;
    font-size: .88rem;
    margin-bottom: 20px;
}
.alert-danger-custom {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-right: 4px solid #dc2626;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
    color: #991b1b;
    font-size: .88rem;
    margin-bottom: 20px;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; }
.alert-close { margin-right: auto; background:none; border:none; cursor:pointer; color:inherit; opacity:.6; font-size:1rem; padding:0; }
.alert-close:hover { opacity:1; }

/* ════════════════════════════════════════════════════════════
   MODAL (improved)
   ════════════════════════════════════════════════════════════ */
.modal-content { border: none; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-header { padding: 20px 24px 0; border: none; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 0 24px 20px; border: none; gap: 8px; }

/* ════════════════════════════════════════════════════════════
   REFRESH PROGRESS BAR
   ════════════════════════════════════════════════════════════ */
/* Indeterminate top progress bar — appears only while a background refresh is in
   flight (GitHub/YouTube-style). Subtle and self-hiding; no constant animation. */
.load-bar {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    z-index: 2000;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity .25s ease;
}
.load-bar.active { opacity: 1; }
.load-bar::before {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 35%;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, transparent, #3b82f6 40%, #6366f1 60%, transparent);
    animation: loadSlide 1.1s ease-in-out infinite;
}
@keyframes loadSlide {
    0%   { left: -35%; }
    100% { left: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .load-bar::before { animation-duration: 2s; }
}

/* Live dot */
.live-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #16a34a;
    animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.5; transform:scale(.8); }
}

/* ════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: grid;
    /* Brand panel (decorative) on the LEFT, form panel on the RIGHT */
    grid-template-columns: 1fr 440px;
    direction: ltr;
    overflow: hidden;
}

/* ── Decorative brand panel with animated gradient ── */
.login-brand-panel {
    background: linear-gradient(-45deg, #0b1220 0%, #14274e 35%, #1e40af 70%, #0ea5b7 100%);
    background-size: 400% 400%;
    animation: loginGradient 20s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
@keyframes loginGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* soft glowing orbs that gently breathe */
.login-brand-panel::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,.30), transparent 70%);
    animation: loginOrb 9s ease-in-out infinite;
}
.login-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 340px; height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.28), transparent 70%);
    animation: loginOrb 11s ease-in-out infinite reverse;
}
@keyframes loginOrb {
    0%,100% { transform: translate(0,0) scale(1);   opacity: .8; }
    50%     { transform: translate(20px,30px) scale(1.15); opacity: 1; }
}

/* floating media icons drifting behind the content */
.login-orbits { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.login-orbits i {
    position: absolute;
    color: rgba(255,255,255,.10);
    animation: loginFloat 12s ease-in-out infinite;
}
.login-orbits i:nth-child(1) { top: 14%; left: 16%; font-size: 3.2rem; animation-duration: 13s; }
.login-orbits i:nth-child(2) { top: 26%; right: 14%; font-size: 2.2rem; animation-duration: 10s; animation-delay: -3s; }
.login-orbits i:nth-child(3) { bottom: 24%; left: 12%; font-size: 2.6rem; animation-duration: 15s; animation-delay: -6s; }
.login-orbits i:nth-child(4) { bottom: 16%; right: 18%; font-size: 3rem;  animation-duration: 11s; animation-delay: -2s; }
.login-orbits i:nth-child(5) { top: 48%; left: 46%; font-size: 1.8rem; animation-duration: 14s; animation-delay: -5s; }
@keyframes loginFloat {
    0%,100% { transform: translateY(0) rotate(0deg);   opacity: .35; }
    50%     { transform: translateY(-30px) rotate(10deg); opacity: .9; }
}

/* full-panel animated particle network (drawn by /js/login-bg.js) */
.login-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%; height: 100%;
    pointer-events: none;
}

.login-brand-content { position: relative; z-index: 2; text-align: center; direction: rtl; }

/* logo with a pulsing glow and a slowly rotating ring */
.login-brand-logo {
    position: relative;
    width: 96px; height: 96px;
    border-radius: 24px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem;
    margin: 0 auto 28px;
    animation: loginLogoPulse 3.2s ease-in-out infinite;
}
.login-brand-logo::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 30px;
    background: conic-gradient(from 0deg, transparent, rgba(56,189,248,.9), transparent 40%);
    z-index: -1;
    animation: loginSpin 6s linear infinite;
}
@keyframes loginLogoPulse {
    0%,100% { box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 0 0 0 rgba(56,189,248,.5); }
    50%     { box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 0 38px 6px rgba(56,189,248,.45); }
}
@keyframes loginSpin { to { transform: rotate(360deg); } }

.login-brand-title { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.login-brand-desc { font-size: .95rem; color: rgba(255,255,255,.7); line-height: 1.7; max-width: 320px; margin: 0 auto; }
.login-features { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; text-align: right; width: 100%; max-width: 290px; margin-inline: auto; }
.login-feature { display:flex; align-items:center; gap:10px; font-size:.88rem; color:rgba(255,255,255,.85); }
.login-feature-icon { width:32px; height:32px; border-radius:8px; background:rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; font-size:.9rem; flex-shrink:0; }

/* animated audio/video equalizer bars (on-theme: media conversion) */
.login-eq { display:flex; gap:5px; align-items:flex-end; justify-content:center; height:42px; margin-top:38px; }
.login-eq span {
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(to top, #38bdf8, #818cf8);
    animation: loginEq 1.2s ease-in-out infinite;
    opacity: .85;
}
.login-eq span:nth-child(1){ animation-delay: -.0s; }
.login-eq span:nth-child(2){ animation-delay: -.9s; }
.login-eq span:nth-child(3){ animation-delay: -.4s; }
.login-eq span:nth-child(4){ animation-delay: -1.1s; }
.login-eq span:nth-child(5){ animation-delay: -.2s; }
.login-eq span:nth-child(6){ animation-delay: -.7s; }
.login-eq span:nth-child(7){ animation-delay: -.5s; }
.login-eq span:nth-child(8){ animation-delay: -1.0s; }
.login-eq span:nth-child(9){ animation-delay: -.3s; }
@keyframes loginEq {
    0%,100% { height: 18%; }
    50%     { height: 100%; }
}

.login-form-panel {
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.login-form-inner { width: 100%; direction: rtl; }
.login-form-title { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.login-form-sub { color: #64748b; font-size: .88rem; margin-bottom: 32px; }
.login-input-group { position: relative; margin-bottom: 16px; }
.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%; transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}
.login-input {
    width: 100%;
    padding: .75rem 1rem .75rem 2.8rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-size: .92rem;
    color: #111827;
    transition: border-color .15s, box-shadow .15s;
    direction: rtl;
    text-align: right;
}
.login-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.login-input::placeholder { color: #c4c4c4; }
.login-label { display:block; font-weight:600; font-size:.85rem; color:#374151; margin-bottom:7px; }
.btn-login {
    width: 100%;
    padding: .85rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 8px;
    transition: all .2s;
}
.btn-login:hover { background: #1d4ed8; box-shadow: 0 6px 20px rgba(37,99,235,.4); transform: translateY(-1px); }
.login-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 11px 14px;
    color: #991b1b;
    font-size: .85rem;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px;
    animation: loginShake .4s ease;
}
@keyframes loginShake {
    0%,100% { transform: translateX(0); }
    25%     { transform: translateX(-6px); }
    75%     { transform: translateX(6px); }
}

/* gentle entrance for the form */
.login-form-inner { animation: loginFadeUp .6s ease both; }
@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* sweeping shine across the submit button */
.btn-login { position: relative; overflow: hidden; }
.btn-login::before {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg);
    animation: loginShine 3.2s ease-in-out infinite;
}
@keyframes loginShine {
    0%   { left: -120%; }
    55%  { left: 130%; }
    100% { left: 130%; }
}

/* Accessibility: honour users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .login-brand-panel,
    .login-brand-panel::before,
    .login-brand-panel::after,
    .login-orbits i,
    .login-brand-logo,
    .login-brand-logo::before,
    .login-eq span,
    .login-form-inner,
    .login-error,
    .btn-login::before {
        animation: none !important;
    }
}

/* ════════════════════════════════════════════════════════════
   RECORDING BROWSER (Servers page)
   ════════════════════════════════════════════════════════════ */

/* Panel that expands inside the server card */
.rec-panel {
    margin-top: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

/* Loading state */
.rec-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: .85rem;
    padding: 8px 0;
}

/* Error / no-key notice */
.rec-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: .82rem;
    color: #78350f;
}
.rec-notice.rec-notice-err {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}
.rec-notice i { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* Empty state inside panel */
.rec-empty {
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
    font-size: .85rem;
}
.rec-empty i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: .45; }

/* Toolbar: search + count + select-all buttons */
.rec-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.rec-search {
    flex: 1;
    min-width: 140px;
    padding: 7px 12px 7px 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: .82rem;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    color: #334155;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 10px center;
    transition: border-color .15s, box-shadow .15s;
}
.rec-search:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.rec-count-badge {
    font-size: .72rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
}
.rec-sel-btn {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8fafc;
    color: #475569;
    font-size: .75rem;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    cursor: pointer;
    transition: all .14s;
    white-space: nowrap;
}
.rec-sel-btn:hover { border-color: #94a3b8; background: #f1f5f9; }

/* Scrollable table wrapper */
.rec-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.rec-table-wrap::-webkit-scrollbar { width: 5px; }
.rec-table-wrap::-webkit-scrollbar-track { background: transparent; }
.rec-table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Recording table */
.rec-table { width: 100%; border-collapse: collapse; }
.rec-table thead th {
    background: #f8fafc;
    padding: 9px 12px;
    font-size: .72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.rec-table thead th:first-child { width: 36px; padding-right: 14px; }
.rec-table tbody tr {
    border-bottom: 1px solid #f8fafc;
    transition: background .1s;
}
.rec-table tbody tr:last-child { border-bottom: none; }
.rec-table tbody tr:hover { background: #f8fafc; }
.rec-table tbody tr.rec-row-hidden { display: none; }
.rec-table tbody tr.rec-row-checked { background: #eff6ff; }
.rec-table td {
    padding: 10px 12px;
    font-size: .82rem;
    color: #334155;
    vertical-align: middle;
}
.rec-table td:first-child { padding-right: 14px; }
.rec-name-cell { max-width: 200px; }
.rec-name-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    font-weight: 500;
    color: #0f172a;
}
.rec-id-chip {
    font-family: 'Courier New', monospace;
    font-size: .68rem;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.rec-duration { color: #475569; font-size: .8rem; white-space: nowrap; }
.rec-date { color: #64748b; font-size: .78rem; white-space: nowrap; }
.rec-participants { text-align: center; }

/* Checkbox */
.rec-checkbox {
    width: 16px; height: 16px;
    cursor: pointer;
    accent-color: var(--blue);
}

/* Footer: mode select + submit button */
.app-footer {
    padding: 16px 24px;
    text-align: center;
    font-size: .78rem;
    color: #94a3b8;
}
.app-footer a {
    color: #94a3b8;
    text-decoration: underline;
}
.rec-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    gap: 10px;
    flex-wrap: wrap;
}
.rec-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: #64748b;
}

/* ════════════════════════════════════════════════════════════
   HELP CARD
   ════════════════════════════════════════════════════════════ */
.help-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-top: 16px;
}
.help-card-title { font-weight: 700; color: #334155; font-size: .88rem; margin-bottom: 10px; display:flex; align-items:center; gap:6px; }
.help-item { display:flex; align-items:flex-start; gap:6px; font-size:.8rem; color:#64748b; margin-bottom:6px; }
.help-item:last-child { margin-bottom:0; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════════
   ACTIVE JOBS PANEL
   ════════════════════════════════════════════════════════════ */
.active-jobs-section {
    margin-bottom: 20px;
}
.active-jobs-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.active-jobs-title {
    font-size: .88rem;
    font-weight: 700;
    color: #0f172a;
}
.active-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}
.active-job-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid #bfdbfe;
    box-shadow: 0 2px 8px rgba(37,99,235,.1);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s;
}
.active-job-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    animation: shimmerBar 2s ease-in-out infinite;
}
.active-job-card.cancelling {
    border-color: #fdba74;
    box-shadow: 0 2px 8px rgba(234,88,12,.1);
}
.active-job-card.cancelling::before {
    background: linear-gradient(90deg, #f97316, #fbbf24);
    animation: none;
}
@keyframes shimmerBar {
    0%,100% { opacity: 1; }
    50%      { opacity: .6; }
}
.active-job-rec {
    font-family: 'Courier New', monospace;
    font-size: .75rem;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px 7px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    margin-bottom: 8px;
}
.active-job-meta {
    font-size: .78rem;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.active-job-progress-wrap {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}
.active-job-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    transition: width .5s ease;
}
.active-job-card.cancelling .active-job-progress-fill {
    background: linear-gradient(90deg, #f97316, #fbbf24);
}
.active-job-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem;
}
.active-job-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.active-job-elapsed {
    font-size: .75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ════════════════════════════════════════════════════════════
   SETTINGS BAR
   ════════════════════════════════════════════════════════════ */
.settings-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 12px;
}
.settings-bar-label {
    font-size: .85rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 7px;
}
.settings-bar-hint { font-size: .75rem; color: #94a3b8; margin-top: 2px; }
.settings-select {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: .85rem;
    color: #334155;
    background: #f8fafc;
    cursor: pointer;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    transition: border-color .15s, box-shadow .15s;
}
.settings-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

@media (max-width: 991px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .main-content { margin-right: 0; }
    .btn-hamburger { display: flex; }
    .stat-cards { grid-template-columns: repeat(3,1fr); }
    .page-body { padding: 16px; }
    .login-page { grid-template-columns: 1fr; }
    .login-brand-panel { display: none; }
    .login-form-panel { padding: 40px 28px; min-height: 100vh; }
}

@media (max-width: 575px) {
    .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 1.7rem; }
    .topbar { padding: 0 16px; }
    .rec-chip { max-width: 110px; }
    .active-jobs-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   ✦  "پنل آبی" THEME ENHANCEMENTS  ✦
   Richer blue gradients, glass accents, smoother depth.
   (Appended last so these refinements win the cascade.)
   ════════════════════════════════════════════════════════════ */
:root {
    --grad-blue: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #0ea5b7 100%);
    --grad-blue-soft: linear-gradient(135deg, #3b82f6, #06b6d4);
}

/* Sidebar: subtle gradient backdrop + glowing brand mark */
.sidebar {
    background:
        radial-gradient(120% 60% at 100% 0%, rgba(37,99,235,.22), transparent 60%),
        var(--sidebar-bg);
}
.sidebar-brand-icon {
    background: var(--grad-blue);
    box-shadow: 0 6px 18px rgba(37,99,235,.5);
}
.sidebar-brand-name {
    background: linear-gradient(90deg, #fff, #bae6fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar-link.active {
    background: var(--grad-blue);
    box-shadow: 0 6px 18px rgba(37,99,235,.45);
}

/* Primary actions get the signature gradient + a soft glow */
.btn-primary-custom,
.btn-login {
    background: var(--grad-blue);
    background-size: 160% 160%;
    transition: background-position .4s ease, box-shadow .2s, transform .15s;
}
.btn-primary-custom:hover { background-position: 100% 0; box-shadow: 0 8px 22px rgba(37,99,235,.4); }
.btn-login:hover { background-position: 100% 0; }

/* Cards lift a touch more invitingly */
.card-panel { transition: box-shadow .2s, transform .2s; }
.card-panel:hover { box-shadow: var(--shadow-md); }

/* Login brand title: shimmering gradient text */
.login-brand-title {
    background: linear-gradient(90deg, #ffffff 0%, #7dd3fc 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandSheen 6s linear infinite;
}
@keyframes brandSheen { to { background-position: 200% center; } }

/* Glassier login logo */
.login-brand-logo { background: rgba(255,255,255,.14); }

/* ── Captcha ─────────────────────────────────────────────────── */
.login-captcha {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.login-captcha-question {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--grad-blue);
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .04em;
    box-shadow: 0 4px 14px rgba(37,99,235,.35);
    user-select: none;
    position: relative;
    overflow: hidden;
}
.login-captcha-question::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg);
    animation: loginShine 4s ease-in-out infinite;
}
.login-captcha-question i { font-size: .95rem; opacity: .9; }
.login-captcha-question .login-captcha-eq { opacity: .8; }
.login-captcha-input-group { flex: 1; margin-bottom: 0; }
.login-captcha .login-input { padding-left: 1rem; text-align: center; letter-spacing: .05em; }
.login-captcha .login-input-icon { display: none; }

/* ════════════════════════════════════════════════════════════
   AUTO-SYNC TOGGLE (server card)
   ════════════════════════════════════════════════════════════ */
.sync-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-size: .74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.sync-toggle:hover { border-color: #94a3b8; color: #334155; }
.sync-toggle.on {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}
.sync-toggle.on i { animation: syncSpin 3s linear infinite; }
@keyframes syncSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sync-toggle.on i { animation: none; } }

/* ════════════════════════════════════════════════════════════
   🌐  LANGUAGE SWITCHER
   ════════════════════════════════════════════════════════════ */
/* Sidebar variant: a pill toggle with two segments */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--sidebar-border);
}
.lang-switch a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all .15s ease;
    line-height: 1;
}
.lang-switch a:hover { color: #fff; background: rgba(255,255,255,.07); }
.lang-switch a.active {
    color: #fff;
    background: var(--grad-blue);
    box-shadow: 0 3px 10px rgba(37,99,235,.45);
}
.lang-switch a i { font-size: .85rem; }
.sidebar-lang { padding: 0 20px 16px; }

/* Floating variant for the login page (top corner) */
.lang-switch-float {
    position: absolute;
    top: 22px;
    inset-inline-end: 22px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.18);
}
.lang-switch-float a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: all .15s ease;
    line-height: 1;
}
.lang-switch-float a:hover { color: #fff; }
.lang-switch-float a.active {
    color: #fff;
    background: var(--grad-blue);
    box-shadow: 0 3px 12px rgba(37,99,235,.5);
}

/* ════════════════════════════════════════════════════════════
   ⇄  LTR (English) DIRECTION OVERRIDES
   The base theme is authored RTL; these flip the handful of
   physical-direction rules when the document is in English.
   ════════════════════════════════════════════════════════════ */
html[dir="ltr"] .sidebar { right: auto; left: 0; }
html[dir="ltr"] .main-content { margin-right: 0; margin-left: var(--sidebar-w); }
html[dir="ltr"] .sidebar-link { text-align: left; }
html[dir="ltr"] .link-badge { margin-right: 0; margin-left: auto; }
html[dir="ltr"] .btn-logout { margin-right: 0; margin-left: auto; }
html[dir="ltr"] .alert-close { margin-right: 0; margin-left: auto; }
html[dir="ltr"] .alert-success-custom { border-right: 1px solid #86efac; border-left: 4px solid #16a34a; }
html[dir="ltr"] .alert-danger-custom  { border-right: 1px solid #fca5a5; border-left: 4px solid #dc2626; }

/* Login form inputs read LTR in English */
html[dir="ltr"] .login-input { direction: ltr; text-align: left; }
html[dir="ltr"] .login-form-inner,
html[dir="ltr"] .login-brand-content { direction: ltr; }
html[dir="ltr"] .login-features { text-align: left; }

/* Mobile sidebar slides in from the LEFT in LTR */
@media (max-width: 991px) {
    html[dir="ltr"] .sidebar { transform: translateX(-100%); }
    html[dir="ltr"] .sidebar.open { transform: translateX(0); }
}
