/* =====================================================
   MAMvip Panel - Modern Redesign CSS
   ===================================================== */

/* ===================== */
/* CSS Variables          */
/* ===================== */
:root {
    --bg-base:      #0d1117;
    --bg-surface:   #161b22;
    --bg-elevated:  #1c2128;
    --bg-hover:     rgba(255,255,255,0.04);

    --border-color:  rgba(255,255,255,0.08);
    --border-subtle: rgba(255,255,255,0.04);

    --primary:       #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow:  rgba(37,99,235,0.18);
    --primary-light: rgba(37,99,235,0.1);

    --success:    #22c55e;
    --success-bg: rgba(34,197,94,0.1);
    --warning:    #f59e0b;
    --warning-bg: rgba(245,158,11,0.1);
    --danger:     #ef4444;
    --danger-bg:  rgba(239,68,68,0.1);
    --info:       #38bdf8;
    --info-bg:    rgba(56,189,248,0.1);
    --purple:     #a855f7;
    --purple-bg:  rgba(168,85,247,0.1);

    --text:           #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted:     #475569;

    --sidebar-w: 260px;
    --topbar-h:  60px;

    --radius:    12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow:    0 4px 24px rgba(0,0,0,0.35);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.45);

    --transition: 0.2s ease;
}

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

body {
    background-color: var(--bg-base) !important;
    color: var(--text) !important;
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif !important;
    min-height: 100vh;
    margin: 0;
}

/* ===================== */
/* Scrollbar              */
/* ===================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ===================== */
/* Auth Layout            */
/* ===================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(37,99,235,0.13) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 80%, rgba(168,85,247,0.09) 0%, transparent 55%),
        var(--bg-base);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--purple));
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border: 1px solid rgba(37,99,235,0.25);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 0.85rem;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ===================== */
/* Landing Navbar         */
/* ===================== */
.landing-nav {
    background: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.landing-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary-light);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.95rem;
}

.landing-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

/* ===================== */
/* Layout Wrapper         */
/* ===================== */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===================== */
/* Sidebar                */
/* ===================== */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    height: var(--topbar-h);
}

.sidebar-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary-light);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--primary);
    flex-shrink: 0;
}

.sidebar-brand {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.75rem;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    padding: 0.75rem 0.65rem 0.35rem;
    margin-top: 0.25rem;
    display: block;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.58rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    margin-bottom: 0.1rem;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav .nav-link .nav-icon {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition);
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.sidebar-nav .nav-link:hover .nav-icon {
    color: var(--primary);
}

.sidebar-nav .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav .nav-link.active .nav-icon {
    color: var(--primary);
}

.sidebar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-user {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-user-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: right;
}

.sidebar-user-btn:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 1px solid rgba(37,99,235,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--primary);
    flex-shrink: 0;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.user-role-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex: 1;
}

/* ===================== */
/* Main Content           */
/* ===================== */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.topbar {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-spacer { flex: 1; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    text-decoration: none;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.topbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: rgba(255,255,255,0.14);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--danger);
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--bg-surface);
    padding: 0 2px;
    font-weight: 700;
}

.mobile-toggle { display: none !important; }

.content-area {
    flex: 1;
    padding: 1.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.page-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ===================== */
/* Cards                  */
/* ===================== */
.card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
    overflow: hidden;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.875rem 1.25rem !important;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.card-body {
    padding: 1.25rem !important;
}

.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 0.75rem 1.25rem !important;
}

/* Gradient header variants */
.card-h-primary .card-header {
    background: linear-gradient(135deg, #1e40af, var(--primary)) !important;
    color: #fff !important;
    border-bottom-color: transparent !important;
}
.card-h-success .card-header {
    background: linear-gradient(135deg, #065f46, #059669) !important;
    color: #fff !important;
    border-bottom-color: transparent !important;
}
.card-h-warning .card-header {
    background: linear-gradient(135deg, #92400e, #d97706) !important;
    color: #fff !important;
    border-bottom-color: transparent !important;
}
.card-h-danger .card-header {
    background: linear-gradient(135deg, #991b1b, #dc2626) !important;
    color: #fff !important;
    border-bottom-color: transparent !important;
}
.card-h-info .card-header {
    background: linear-gradient(135deg, #0c4a6e, #0284c7) !important;
    color: #fff !important;
    border-bottom-color: transparent !important;
}
.card-h-secondary .card-header {
    background: linear-gradient(135deg, #1f2937, #374151) !important;
    color: #fff !important;
    border-bottom-color: transparent !important;
}

/* ===================== */
/* Stat Cards             */
/* ===================== */
.stat-card {
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.si-primary { background: var(--primary-light); color: var(--primary); }
.si-success { background: var(--success-bg);  color: var(--success);  }
.si-warning { background: var(--warning-bg);  color: var(--warning);  }
.si-danger  { background: var(--danger-bg);   color: var(--danger);   }
.si-info    { background: var(--info-bg);     color: var(--info);     }
.si-purple  { background: var(--purple-bg);   color: var(--purple);   }

.stat-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===================== */
/* Buttons                */
/* ===================== */
.btn {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all var(--transition) !important;
}

.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.btn-success {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #fff !important;
}
.btn-success:hover {
    background: #047857 !important;
    border-color: #047857 !important;
}

.btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}

.btn-warning {
    background: var(--warning) !important;
    border-color: var(--warning) !important;
    color: #000 !important;
}

.btn-outline-primary {
    border-color: rgba(37,99,235,0.4) !important;
    color: var(--primary) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.btn-outline-secondary {
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
}
.btn-outline-secondary:hover {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
}

.btn-outline-success {
    border-color: rgba(34,197,94,0.4) !important;
    color: var(--success) !important;
    background: transparent !important;
}
.btn-outline-success:hover {
    background: var(--success-bg) !important;
}

.btn-outline-danger {
    border-color: rgba(239,68,68,0.4) !important;
    color: var(--danger) !important;
    background: transparent !important;
}
.btn-outline-danger:hover {
    background: var(--danger-bg) !important;
}

.btn-outline-info {
    border-color: rgba(56,189,248,0.4) !important;
    color: var(--info) !important;
    background: transparent !important;
}
.btn-outline-info:hover {
    background: var(--info-bg) !important;
}

.btn-outline-warning {
    border-color: rgba(245,158,11,0.4) !important;
    color: var(--warning) !important;
    background: transparent !important;
}
.btn-outline-warning:hover {
    background: var(--warning-bg) !important;
}

.btn-outline-light {
    border-color: var(--border-color) !important;
    color: var(--text) !important;
    background: transparent !important;
}
.btn-outline-light:hover {
    background: var(--bg-hover) !important;
}

.btn-check:checked + .btn-outline-primary {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* ===================== */
/* Badges                 */
/* ===================== */
.badge.bg-success  { background: #059669 !important; }
.badge.bg-danger   { background: #dc2626 !important; }
.badge.bg-warning  { background: var(--warning) !important; color: #000 !important; }
.badge.bg-info     { background: #0284c7 !important; }
.badge.bg-primary  { background: var(--primary) !important; }
.badge.bg-secondary{ background: #374151 !important; }

.badge-pill-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,0.2); padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-pill-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-pill-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-pill-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid rgba(56,189,248,0.2); padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-pill-primary { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(37,99,235,0.2); padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

/* ===================== */
/* Tables                 */
/* ===================== */
.table {
    color: var(--text) !important;
    --bs-table-color: var(--text) !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: var(--bg-hover) !important;
    --bs-table-striped-bg: rgba(255,255,255,0.02) !important;
    --bs-table-border-color: var(--border-subtle) !important;
}

.table thead th {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    background: var(--bg-elevated) !important;
    border-color: var(--border-color) !important;
    padding: 0.75rem 1rem !important;
}

.table tbody td {
    border-color: var(--border-subtle) !important;
    color: var(--text) !important;
    vertical-align: middle !important;
    padding: 0.8rem 1rem !important;
}

.table-hover tbody tr:hover > td,
.table-hover tbody tr:hover > th {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
}

.table-light {
    --bs-table-bg: var(--bg-elevated) !important;
    --bs-table-color: var(--text) !important;
    --bs-table-border-color: var(--border-color) !important;
}

/* ===================== */
/* Forms                  */
/* ===================== */
.form-control, .form-select {
    background: var(--bg-elevated) !important;
    border-color: var(--border-color) !important;
    color: var(--text) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.6rem 0.875rem !important;
    font-size: 0.875rem !important;
    transition: border-color var(--transition), box-shadow var(--transition) !important;
}

.form-control:focus, .form-select:focus {
    background: var(--bg-elevated) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    color: var(--text) !important;
}

.form-control::placeholder { color: var(--text-muted) !important; opacity: 1 !important; }
.form-select option { background: var(--bg-elevated); color: var(--text); }

.form-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.form-text { color: var(--text-muted) !important; font-size: 0.78rem; }
.form-check-input { background-color: var(--bg-elevated) !important; border-color: var(--border-color) !important; }
.form-check-input:checked { background-color: var(--primary) !important; border-color: var(--primary) !important; }
.form-check-label { color: var(--text-secondary); font-size: 0.875rem; }

.input-group-text {
    background: var(--bg-elevated) !important;
    border-color: var(--border-color) !important;
    color: var(--text-muted) !important;
    font-size: 0.875rem !important;
}

/* ===================== */
/* Alerts                 */
/* ===================== */
.alert {
    border-radius: var(--radius-sm) !important;
    border-width: 1px !important;
    font-size: 0.875rem;
}

.alert-success  { background: var(--success-bg) !important; border-color: rgba(34,197,94,0.2) !important;  color: #4ade80 !important; }
.alert-danger   { background: var(--danger-bg)  !important; border-color: rgba(239,68,68,0.2) !important;  color: #f87171 !important; }
.alert-warning  { background: var(--warning-bg) !important; border-color: rgba(245,158,11,0.2) !important; color: #fbbf24 !important; }
.alert-info     { background: var(--info-bg)    !important; border-color: rgba(56,189,248,0.2) !important; color: #7dd3fc !important; }
.alert-primary  { background: var(--primary-light) !important; border-color: rgba(37,99,235,0.2) !important; color: #93c5fd !important; }
.alert-secondary{ background: rgba(55,65,81,0.3) !important; border-color: var(--border-color) !important; color: var(--text-secondary) !important; }

.alert-link { color: inherit !important; text-decoration: underline; }
.btn-close { filter: invert(1) opacity(0.6) !important; }
.btn-close:hover { filter: invert(1) opacity(1) !important; }

/* ===================== */
/* Progress Bars          */
/* ===================== */
.progress {
    background: var(--bg-elevated) !important;
    border-radius: 4px !important;
    height: 6px !important;
    overflow: hidden;
}

.progress-bar {
    border-radius: 4px !important;
    transition: width 0.6s ease !important;
}

/* ===================== */
/* Modals                 */
/* ===================== */
.modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.15rem 1.5rem !important;
    background: transparent !important;
}

.modal-body { padding: 1.5rem !important; }

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
    padding: 0.875rem 1.5rem !important;
    background: transparent !important;
}

.modal-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.modal-header.bg-primary { background: linear-gradient(135deg, #1e40af, var(--primary)) !important; }
.modal-header.bg-danger  { background: linear-gradient(135deg, #991b1b, #dc2626) !important; }
.modal-header.bg-success { background: linear-gradient(135deg, #065f46, #059669) !important; }
.modal-header.bg-warning { background: linear-gradient(135deg, #92400e, #d97706) !important; }
.modal-header.bg-info    { background: linear-gradient(135deg, #0c4a6e, #0284c7) !important; }

.modal-backdrop.show { opacity: 0.6 !important; }

/* ===================== */
/* Dropdowns              */
/* ===================== */
.dropdown-menu {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 0.4rem !important;
}

.dropdown-item {
    color: var(--text) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem;
    transition: background var(--transition);
}

.dropdown-item:hover, .dropdown-item:focus {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
}

.dropdown-item.text-danger { color: var(--danger) !important; }
.dropdown-item.text-danger:hover { background: var(--danger-bg) !important; }

.dropdown-divider {
    border-color: var(--border-color) !important;
    margin: 0.3rem 0 !important;
    opacity: 1 !important;
}

/* ===================== */
/* List Group             */
/* ===================== */
.list-group-item {
    background: transparent !important;
    border-color: var(--border-subtle) !important;
    color: var(--text) !important;
    padding: 0.85rem 1rem !important;
}

.list-group-item-action:hover {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
}

.list-group-item-action.active {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    border-color: var(--border-subtle) !important;
}

/* ===================== */
/* Notification Dropdown  */
/* ===================== */
.notif-dropdown {
    width: 320px !important;
    padding: 0 !important;
    max-height: 80vh;
    overflow: hidden;
    /* NOTE: do NOT set display here — Bootstrap controls visibility via .show class */
    flex-direction: column;
}

/* Only apply flex layout when Bootstrap opens the dropdown */
.notif-dropdown.show {
    display: flex !important;
}

.notif-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.notif-title { font-weight: 600; font-size: 0.875rem; color: var(--text); }

.notif-scroll { overflow-y: auto; max-height: 340px; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none !important;
    color: var(--text) !important;
}

.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(37,99,235,0.04); }

.notif-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.notif-content-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-content-body {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.1rem;
}

.notif-content-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.notif-footer {
    padding: 0.65rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.notif-footer a {
    color: var(--primary);
    font-size: 0.82rem;
    text-decoration: none;
    font-weight: 500;
}

.notif-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.notif-empty i { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }

/* ===================== */
/* Mobile Bottom Nav      */
/* ===================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    padding: 0.3rem 0.5rem;
    justify-content: space-around;
    align-items: center;
}

.mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none !important;
    color: var(--text-muted) !important;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    min-width: 52px;
    font-size: 0.62rem;
}

.mob-nav-item.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}

.mob-nav-item i { font-size: 1rem; }

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 150;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* ===================== */
/* Service Cards          */
/* ===================== */
.service-card-new {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
}

.service-card-new::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
}

.service-card-new.active-svc::before { background: linear-gradient(90deg, var(--success), #10b981); }
.service-card-new.expired-svc::before { background: linear-gradient(90deg, var(--danger), #b91c1c); }

.service-card-new:hover {
    border-color: rgba(255,255,255,0.13);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.service-card-body { padding: 1.1rem 1.15rem; }
.service-card-footer { padding: 0.75rem 1.15rem; border-top: 1px solid var(--border-color); display: flex; gap: 0.5rem; }

.svc-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.32rem 0;
}

.svc-label { font-size: 0.78rem; color: var(--text-muted); }
.svc-value { font-size: 0.82rem; font-weight: 600; color: var(--text); }

/* ===================== */
/* Location/Server Cards  */
/* ===================== */
.location-card-new {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none !important;
    color: var(--text) !important;
    transition: all var(--transition);
    cursor: pointer;
}

.location-card-new:hover {
    border-color: rgba(37,99,235,0.35);
    background: var(--bg-elevated);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.loc-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.loc-name { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 0; }
.loc-sub  { font-size: 0.78rem; color: var(--text-muted); margin: 0.15rem 0 0; }

/* ===================== */
/* Plan Cards             */
/* ===================== */
.plan-card-new {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
}

.plan-card-new:hover {
    border-color: rgba(37,99,235,0.35);
    transform: translateY(-3px);
    box-shadow: 0 6px 28px rgba(37,99,235,0.12);
}

.plan-card-new.featured-plan {
    border-color: rgba(37,99,235,0.4);
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
    position: relative;
}

.plan-badge-top {
    position: absolute;
    top: 0; right: 0; left: 0;
    text-align: center;
    background: linear-gradient(90deg, var(--primary), var(--purple));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.plan-header {
    padding: 1.25rem 1.25rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.plan-name { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0 0 0.75rem; }

.plan-price-wrap { display: flex; align-items: flex-end; justify-content: center; gap: 0.3rem; }
.plan-price { font-size: 1.75rem; font-weight: 800; color: var(--primary); line-height: 1; }
.plan-price-unit { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.2rem; }

.plan-body { padding: 1rem 1.25rem 1.25rem; }

.plan-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.plan-feature .fi { color: var(--success); font-size: 0.8rem; width: 14px; text-align: center; flex-shrink: 0; }

/* ===================== */
/* Step Indicator         */
/* ===================== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.step-item-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 160px;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin-top: -1.5rem;
    max-width: 60px;
}

.step-connector.done { background: var(--primary); }

.step-circle-new {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    transition: all var(--transition);
    position: relative;
    z-index: 1;
}

.step-item-new.s-active .step-circle-new {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 5px var(--primary-glow);
}

.step-item-new.s-done .step-circle-new {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.step-label-new {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

.step-item-new.s-active .step-label-new,
.step-item-new.s-done .step-label-new { color: var(--text); }

/* ===================== */
/* Wallet Card            */
/* ===================== */
.wallet-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2332 100%);
    border: 1px solid rgba(37,99,235,0.25);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    position: relative;
    overflow: hidden;
}

.wallet-hero::before {
    content: '';
    position: absolute;
    top: -40px; left: -40px;
    width: 120px; height: 120px;
    background: rgba(37,99,235,0.12);
    border-radius: 50%;
}

.wallet-hero::after {
    content: '';
    position: absolute;
    bottom: -30px; right: -30px;
    width: 90px; height: 90px;
    background: rgba(99,102,241,0.1);
    border-radius: 50%;
}

.wallet-balance-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.wallet-balance-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-right: 0.3rem;
}

/* Quick charge buttons */
.quick-charge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.quick-charge-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-weight: 500;
}

.quick-charge-btn:hover {
    background: var(--primary-light);
    border-color: rgba(37,99,235,0.3);
    color: var(--primary);
}

/* ===================== */
/* Config Box             */
/* ===================== */
.config-box {
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #7ee787;
    word-break: break-all;
    line-height: 1.6;
    position: relative;
    max-height: 160px;
    overflow-y: auto;
}

/* ===================== */
/* Breadcrumb             */
/* ===================== */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 0 0.65rem !important;
}

.breadcrumb-item { font-size: 0.8rem; }
.breadcrumb-item a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--text); }
.breadcrumb-item.active { color: var(--text-secondary) !important; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted) !important; }

/* ===================== */
/* Flash / Alerts area    */
/* ===================== */
.flash-container { padding: 0; }
.flash-container .alert { margin-bottom: 0.5rem; }

/* ===================== */
/* Panel Footer           */
/* ===================== */
.panel-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    margin-right: 1rem;
}

.footer-links a:last-child { margin-right: 0; }
.footer-links a:hover { color: var(--text); }

/* ===================== */
/* Misc                   */
/* ===================== */
.text-primary   { color: var(--primary)       !important; }
.text-success   { color: var(--success)       !important; }
.text-warning   { color: var(--warning)       !important; }
.text-danger    { color: var(--danger)        !important; }
.text-info      { color: var(--info)          !important; }
.text-muted     { color: var(--text-muted)    !important; }
.text-secondary { color: var(--text-secondary)!important; }
.text-light     { color: var(--text)          !important; }

.bg-dark        { background: var(--bg-elevated) !important; }
.bg-surface     { background: var(--bg-surface)  !important; }
.bg-primary     { background: var(--primary) !important; }
.bg-success     { background: #059669 !important; }
.bg-danger      { background: #dc2626 !important; }
.bg-warning     { background: var(--warning) !important; }
.bg-info        { background: #0284c7 !important; }
.bg-secondary   { background: #374151 !important; }

.border-secondary { border-color: var(--border-color) !important; }
.border-top     { border-color: var(--border-color) !important; }
.border-bottom  { border-color: var(--border-color) !important; }
.border         { border-color: var(--border-color) !important; }

/* ===================== */
/* Pagination             */
/* ===================== */
.pagination .page-link {
    background: var(--bg-elevated) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
}

.pagination .page-link:hover {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
}

.pagination .page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.pagination .page-item.disabled .page-link {
    background: var(--bg-elevated) !important;
    color: var(--text-muted) !important;
}

/* ===================== */
/* Btn group / toggle     */
/* ===================== */
.btn-group .btn { border-radius: 0 !important; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
.btn-group .btn:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.btn-group-sm .btn { padding: 0.35rem 0.75rem !important; font-size: 0.8rem !important; }

/* ===================== */
/* Animations             */
/* ===================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

.animate-in { animation: fadeInUp 0.3s ease both; }

/* ===================== */
/* Responsive             */
/* ===================== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
        z-index: 300;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
    }

    .mobile-toggle {
        display: flex !important;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .content-area {
        padding: 1rem;
        padding-bottom: 5.5rem;
    }

    .topbar { padding: 0 1rem; }
}

@media (max-width: 576px) {
    .auth-card { padding: 1.75rem 1.25rem; }
    .wallet-balance-num { font-size: 1.75rem; }
    .plan-price { font-size: 1.4rem; }
}

/* ===================== */
/* hr override            */
/* ===================== */
hr {
    border-color: var(--border-color) !important;
    opacity: 1 !important;
}

/* ===================== */
/* payment method card    */
/* ===================== */
.payment-method-card {
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius) !important;
}

.payment-method-card:has(input:checked),
.payment-method-card.selected {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
}

/* ===================== */
/* nav pills / tabs       */
/* ===================== */
.nav-pills .nav-link {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.875rem;
}

.nav-pills .nav-link.active {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.nav-tabs {
    border-color: var(--border-color) !important;
}

.nav-tabs .nav-link {
    color: var(--text-secondary) !important;
    border-color: transparent !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
}

.nav-tabs .nav-link.active {
    background: var(--bg-surface) !important;
    color: var(--text) !important;
    border-color: var(--border-color) var(--border-color) var(--bg-surface) !important;
}

/* ===================== */
/* selected server card   */
/* ===================== */
.selected-server-info {
    background: var(--info-bg);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.selected-server-info .loc-icon { background: var(--info-bg); color: var(--info); }

/* =====================================================
   FIXES: RTL Dropdown + Mobile Responsiveness
   ===================================================== */

/* ── Topbar Dropdown Fix (RTL) ────────────────────── */
/* In RTL layout, topbar actions are on the LEFT side.
   Force dropdown to open leftward from button. */
.topbar .dropdown {
    position: relative;
}

.topbar .dropdown-menu {
    position: absolute !important;
    /* RTL: open toward left (end of RTL line = left side) */
    right: auto !important;
    left: 0 !important;
    top: calc(100% + 6px) !important;
    transform: none !important;
    margin: 0 !important;
    min-width: 200px;
}

.topbar .notif-dropdown {
    min-width: 320px !important;
    left: 0 !important;
    right: auto !important;
}

/* When button is near left edge, ensure dropdown doesn't go off-screen */
@media (max-width: 400px) {
    .topbar .notif-dropdown {
        min-width: calc(100vw - 2rem) !important;
        left: 0 !important;
    }
}

/* ── Sidebar Mobile Fix ───────────────────────────── */
/* Sidebar is on the RIGHT in RTL, so it slides to the right when hidden */

/* Prevent any content from showing under sidebar when closed */
.sidebar {
    will-change: transform;
}

/* ── Layout: prevent horizontal overflow ─────────── */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.layout-wrapper {
    max-width: 100vw;
    overflow-x: hidden;
}

.main-content {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Mobile Responsive Overhaul ──────────────────── */
@media (max-width: 992px) {
    /* Sidebar: hidden to the right, slides in */
    .sidebar {
        transform: translateX(110%) !important;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: -8px 0 40px rgba(0,0,0,0.5);
    }

    /* Main content: full width without sidebar margin */
    .main-content {
        margin-right: 0 !important;
        width: 100%;
    }

    /* Topbar mobile */
    .topbar {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    .content-area {
        padding: 0.875rem 0.875rem 5.5rem;
    }

    /* Cards stack better on mobile */
    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    /* Wallet hero smaller on mobile */
    .wallet-hero {
        padding: 1.25rem;
    }

    .wallet-balance-num {
        font-size: 1.6rem;
    }

    /* Table on mobile: make scrollable */
    .table-responsive {
        border-radius: var(--radius);
    }

    /* Page header */
    .page-title { font-size: 1.1rem; }
    .page-header { margin-bottom: 1rem; }

    /* Hide some topbar elements */
    .topbar-btn { width: 34px; height: 34px; }

    /* Row adjustments */
    .row.g-4 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
    .row.g-3 { --bs-gutter-x: 0.75rem; --bs-gutter-y: 0.75rem; }

    /* Service cards full width on small mobile */
    .service-card-new { margin-bottom: 0; }
}

@media (max-width: 576px) {
    /* Even smaller screens */
    .content-area {
        padding: 0.75rem 0.75rem 5.5rem;
    }

    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: var(--radius);
    }

    .auth-wrapper {
        padding: 1rem 0.75rem;
    }

    .wallet-balance-num { font-size: 1.4rem; }
    .plan-price { font-size: 1.3rem; }

    /* Step indicator: smaller */
    .step-circle-new { width: 34px; height: 34px; font-size: 0.8rem; }
    .step-label-new { font-size: 0.68rem; }
    .step-connector { max-width: 30px; }

    /* Topbar */
    .topbar { height: 52px; }
    :root { --topbar-h: 52px; }

    /* Page title */
    .page-title { font-size: 1rem; }

    /* Modal full-screen on mobile */
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important;
    }

    /* Location cards: smaller padding */
    .location-card-new { padding: 0.875rem 1rem; }
    .loc-icon { width: 42px; height: 42px; font-size: 1rem; }

    /* Quick charge grid */
    .quick-charge-grid { grid-template-columns: 1fr 1fr; }

    /* Notification in topbar */
    .topbar .notif-dropdown {
        min-width: calc(100vw - 1.5rem) !important;
        position: fixed !important;
        left: 0.75rem !important;
        right: 0.75rem !important;
        top: 52px !important;
    }
}

/* ── Bottom nav: safe area for devices with notch ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(0.3rem + env(safe-area-inset-bottom));
    }
    @media (max-width: 992px) {
        .content-area { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
    }
}

/* ── Sidebar overlay: prevent scroll ──────────────── */
body.sidebar-open {
    overflow: hidden;
}

/* ── Fix: make card body not overflow on mobile ───── */
@media (max-width: 992px) {
    .card-body { padding: 1rem !important; }
    .card-header { padding: 0.75rem 1rem !important; }
    .card-footer { padding: 0.6rem 1rem !important; }

    /* Profile grid stack */
    .col-lg-8, .col-lg-4 { width: 100%; }
}

/* ── Fix: Notification badge in sidebar ────────────── */
.sidebar-nav .nav-link {
    /* Prevent badge from wrapping */
    flex-wrap: nowrap;
}

/* ── Fix: dropdown in RTL Bootstrap 5 ─────────────── */
/* Bootstrap 5 RTL uses `inset-inline-*` logical props.
   We override to ensure correct positioning */
[dir="rtl"] .topbar .dropdown-menu {
    right: auto !important;
    left: 0 !important;
}

/* Sidebar user dropdown: opens upward, fits inside sidebar */
.sidebar-user .dropdown-menu {
    min-width: 200px !important;
    right: 0.5rem !important;
    left: 0.5rem !important;
    width: calc(var(--sidebar-w) - 1.5rem);
    bottom: calc(100% + 0.5rem) !important;
    top: auto !important;
}

/* Ensure modal backdrop doesn't block mobile bottom nav */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal {
    z-index: 1055 !important;
}

/* Mobile bottom nav stays on top */
.mobile-bottom-nav {
    z-index: 1000 !important;
}

/* Sidebar z-index higher than overlay */
.sidebar { z-index: 1100 !important; }
.sidebar-overlay { z-index: 1090 !important; }


