@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: radial-gradient(circle at top left, rgba(59, 130, 246, 0.08) 0%, transparent 40%), 
               radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.08) 0%, transparent 40%), 
               linear-gradient(135deg, #0f172a 0%, #050811 100%);
    --sidebar-bg: rgba(15, 23, 42, 0.45);
    --card-bg: rgba(30, 41, 59, 0.35);
    --border-color: rgba(255, 255, 255, 0.06);
    --highlight-color: rgba(255, 255, 255, 0.1);
    
    --color-primary: #3b82f6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-accent: #8b5cf6;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-en);
}

body[dir="rtl"] * {
    font-family: var(--font-ar);
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Sidebar and Main Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media(min-width: 900px) {
    .app-container {
        flex-direction: row;
    }
}

/* Sidebar Styling */
aside {
    background: var(--sidebar-bg);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

@media(min-width: 900px) {
    aside {
        width: 260px;
        min-height: 100vh;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
    }
    
    body[dir="rtl"] aside {
        left: auto;
        right: 0;
        border-right: none;
        border-left: 1px solid var(--border-color);
    }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5), inset 0 2px 4px rgba(255,255,255,0.3);
}

.brand-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

.brand-info h2 {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
}

@media(min-width: 900px) {
    .sidebar-nav {
        flex-direction: column;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(4px);
}

body[dir="rtl"] .nav-link:hover, body[dir="rtl"] .nav-link.active {
    transform: translateX(-4px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
    border-right: 3px solid #60a5fa;
    color: #60a5fa;
    border-radius: 0 14px 14px 0;
}

body[dir="rtl"] .nav-link.active {
    background: linear-gradient(270deg, rgba(59, 130, 246, 0.15), transparent);
    border-right: none;
    border-left: 3px solid #60a5fa;
    border-radius: 14px 0 0 14px;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: none;
}

@media(min-width: 900px) {
    .sidebar-footer {
        display: block;
    }
}

.lang-section {
    margin-bottom: 12px;
}

.btn-lang {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    border: none;
    color: white;
    width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: var(--transition-smooth);
}

.btn-lang:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* Main Content Area */
main {
    flex: 1;
    padding: 24px;
}

@media(min-width: 900px) {
    main {
        margin-left: 260px;
        padding: 40px;
    }
    
    body[dir="rtl"] main {
        margin-left: 0;
        margin-right: 260px;
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.top-bar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-mobile-lang {
    display: block;
}

@media(min-width: 900px) {
    .btn-mobile-lang {
        display: none;
    }
}

/* Grid of Statistics Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.6));
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.stat-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card:nth-child(1) .stat-icon { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-card:nth-child(2) .stat-icon { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.stat-card:nth-child(3) .stat-icon { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.stat-card:nth-child(4) .stat-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.stat-info h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

/* Dashboard Sections wrapper */
.section-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.section-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card layout inside sections */
.content-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    transition: var(--transition-smooth);
}

.content-card:hover {
    box-shadow: 0 15px 50px rgba(0,0,0,0.35);
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.content-card-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

/* Custom Table design */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

body[dir="rtl"] table {
    text-align: right;
}

th, td {
    padding: 14px 16px;
    font-size: 0.88rem;
}

th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.td-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e293b;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Badge styling */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-block;
}

.badge-active { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-blocked { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Table Action buttons */
.btn-action-group {
    display: flex;
    gap: 8px;
}

.btn-table-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-table-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-table-icon.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-table-icon.btn-approve:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Admin Form layout */
.admin-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 550px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

select.form-control option {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.btn-submit {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: var(--transition-smooth);
    width: fit-content;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Notification Popup */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f172a;
    border: 1px solid var(--color-success);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 12px;
}

body[dir="rtl"] .toast {
    right: auto;
    left: 30px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.25rem;
}

/* Banner Component */
.banner-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(139, 92, 246, 0.85));
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    min-height: 180px;
    border: 1px solid var(--border-color);
}

.banner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--banner-bg-img, url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?w=800')) center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.banner-settings-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

body[dir="rtl"] .banner-settings-panel {
    right: auto;
    left: 15px;
}

.btn-banner-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-banner-upload:hover {
    background: var(--highlight-color);
    border-color: rgba(255, 255, 255, 0.2);
}

.banner-date-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.date-field span {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.date-field input[type="date"] {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.68rem;
    outline: none;
    transition: var(--transition-smooth);
}

.date-field input[type="date"]:focus {
    border-color: var(--color-primary);
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.banner-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.banner-desc {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    max-width: 600px;
}

/* Sidebar & Mobile Logout Buttons */
.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.btn-mobile-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.btn-mobile-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Login Page Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 13, 22, 0.72);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.login-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
    from { transform: translateY(10px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.login-brand h2 {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-error-msg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Logo & Brand ──────────────────────────────────────── */
.brand-logo-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.sidebar-custom-logo {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
}

.sidebar-custom-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.login-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* ── Profile Settings Panel ─────────────────────────────── */
.profile-settings-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 160px;
}

.profile-avatar-wrap {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
    position: relative;
}

.profile-avatar-placeholder {
    font-size: 2.5rem;
    font-weight: 800;
    color: #60a5fa;
}

.btn-avatar-upload {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
    border: 1px solid rgba(59,130,246,0.3);
    color: #60a5fa;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-avatar-upload:hover {
    background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(139,92,246,0.25));
    border-color: rgba(59,130,246,0.5);
}

.logo-preview-wrap {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.15);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.3s;
    margin: 0 auto;
}

.logo-preview-wrap:hover {
    border-color: rgba(59,130,246,0.4);
}

.btn-remove-logo {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 6px;
}

.btn-remove-logo:hover {
    background: rgba(239,68,68,0.2);
}

.profile-info-form {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Form Grid (2-column layout) ──────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .profile-settings-layout {
        flex-direction: column;
        align-items: center;
    }
}

/* ── Admins Badge Colors ──────────────────────────────── */
.badge-superadmin {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-moderator {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

/* ── Forgot Password Button ─────────────────────────────── */
.btn-forgot-pass {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: inherit;
}

.btn-forgot-pass:hover {
    opacity: 1;
    color: #93c5fd;
    text-decoration: underline;
}

/* ── Forgot Password Overlay ──────────────────────────── */
.forgot-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.forgot-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.forgot-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 36px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.forgot-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    border: 2px solid rgba(59,130,246,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 4px 20px rgba(59,130,246,0.2);
}

.forgot-icon svg {
    width: 32px;
    height: 32px;
    fill: #60a5fa;
}

.forgot-icon-success {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.15));
    border-color: rgba(16,185,129,0.35);
    box-shadow: 0 4px 20px rgba(16,185,129,0.2);
}

.forgot-icon-success svg {
    fill: #34d399;
}

.forgot-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.forgot-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 4px;
}

.btn-back-login {
    display: inline-block;
    margin-top: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
    padding: 6px;
}

.btn-back-login:hover {
    color: #60a5fa;
}

/* ── Sidebar Profile Mini Card ──────────────────────────── */
.nav-profile-bottom {
    background: rgba(255, 255, 255, 0.04) !important;
    padding: 10px 14px !important;
    gap: 10px !important;
    transition: background 0.25s, border-color 0.25s !important;
}

.nav-profile-bottom:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.nav-profile-bottom.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(139,92,246,0.18)) !important;
    border-color: rgba(59,130,246,0.35) !important;
}

.profile-mini-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: white;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
    flex-shrink: 0;
}

.profile-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Hide mobile logout from header (removed) */
.btn-mobile-logout {
    display: none !important;
}

/* 👁️ Password Eye Toggle Styling — مطابقة أبعاد حقل كلمة المرور 100% مع اسم المستخدم */
.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.password-wrapper .form-control {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 42px !important;
    padding-right: 14px !important;
    display: block;
}

body[dir="rtl"] .password-wrapper .form-control {
    padding-left: 42px !important;
    padding-right: 14px !important;
}

.toggle-password-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    z-index: 5;
    user-select: none;
}

body[dir="rtl"] .toggle-password-btn {
    left: 8px;
    right: auto;
}

.toggle-password-btn:hover {
    color: var(--color-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.15);
}

.toggle-password-btn.active {
    color: var(--color-primary, #3b82f6);
}

.toggle-password-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}


