#root { min-height: 100vh; }
:root {
    --primary: #0da361; --primary-rgb: 13, 163, 97; --primary-hover: #0a8a51; --primary-light: rgba(13, 163, 97, 0.1);
    --secondary: #ffcb27; --accent: #2c3e50;
    --success: #10b981; --error: #f43f5e; --warning: #f59e0b; --info: #3b82f6;
    --bg-main: #f4f7f9; --bg-surface: #ffffff; --bg-glass: rgba(255, 255, 255, 0.7);
    --text-main: #1e293b; --text-muted: #64748b; --text-light: #94a3b8;
    --border-soft: #e2e8f0; --border-rich: rgba(226, 232, 240, 0.5); --border-width: 1px;
    --font-base: 'IBM Plex Sans Arabic', sans-serif; --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
    --header-h: 72px; --sidebar-w: 260px; --sidebar-collapsed-w: 80px;
    --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1); --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-base); background-color: var(--bg-main); color: var(--text-main); direction: rtl; text-align: right; min-height: 100vh; }
body.layout-user, body.layout-admin, body.layout-auth { overflow: hidden; height: 100vh; }
html.layout-landing, body.layout-landing { overflow-y: auto !important; overflow-x: hidden; height: auto !important; min-height: 100vh; }
.main-content { width: 100%; position: relative; display: block; }
.glass { background: var(--bg-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border-rich); }
.logo-box { width: 40px; height: 40px; background: var(--primary); color: white; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.logo-box.has-custom-logo { background: transparent !important; box-shadow: none !important; border: none !important; }
.visual-logo.has-custom-logo { background: transparent !important; box-shadow: none !important; filter: none !important; }
.logo-text { font-weight: 800; font-size: 1.25rem; white-space: nowrap; transition: var(--transition-base); }
body.sidebar-collapsed .logo-text { display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md); text-decoration: none; color: var(--text-muted); font-weight: 600; transition: var(--transition-base); }
.nav-link:hover { background: var(--bg-main); color: var(--primary); }
.nav-link.active { background: var(--bg-main); color: var(--primary); box-shadow: inset 2px 0 0 var(--primary); }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 6px; }
.logout-link:hover { color: var(--error) !important; background: rgba(244, 63, 94, 0.05); }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: var(--bg-surface); border-bottom: 1px solid var(--border-soft); z-index: 999; height: var(--header-h); }
.search-wrap { position: relative; width: 100%; max-width: 500px; }
.search-wrap input { width: 100%; padding: 12px 16px 12px 44px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); background: var(--bg-main); color: var(--text-main); font-family: inherit; font-weight: 500; outline: none; transition: var(--transition-base); }
.search-wrap input:focus { border-color: var(--primary); background: var(--bg-surface); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.search-wrap i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-light); width: 18px; height: 18px; }
.app-main { padding: 40px; overflow-y: auto; background: var(--bg-main); display: flex; flex-direction: column; gap: 32px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; width: 100%; }
.stat-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: none; background: var(--bg-surface); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.stat-icon-wrapper { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--bg-main); color: var(--primary); border: 1.5px solid var(--border-soft); transition: all 0.3s ease; }
.stat-card:hover .stat-icon-wrapper { background: var(--primary); color: white; border-color: var(--primary); }
.btn-sidebar-toggle { width: 100%; margin-top: 12px; background: transparent; border: none; padding: 12px; color: var(--text-light); cursor: pointer; border-radius: var(--radius-md); transition: var(--transition-base); }
.btn-sidebar-toggle:hover { background: var(--bg-main); color: var(--primary); }
.page-title { font-size: 1.25rem; font-weight: 800; color: var(--text-main); }
.header-divider { width: 1.5px; height: 32px; background: var(--border-soft); margin: 0 8px; opacity: 0.6; }

.user-profile-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 6px 6px 14px;
    border-radius: 50px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: none;
}

.user-profile-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #fdfdfd;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.user-status {
    width: 35px;
    height: 3.5px;
    background: var(--primary);
    border-radius: 10px;
    opacity: 0.4;
    transition: 0.3s;
}

.user-profile-box:hover .user-status {
    width: 100%;
    opacity: 1;
}

.user-avatar-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.user-avatar-wrapper i { width: 18px; height: 18px; }

.avatar-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 200%;
    animation: shimmer-swipe 3s infinite;
    pointer-events: none;
}

@keyframes shimmer-swipe {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.badge-dot.pulse {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4);
    animation: pulse-ring-glow 2s infinite;
}

@keyframes pulse-ring-glow {
    0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.notification-trigger { position: relative; }
@media (max-width: 768px) { .app-header { padding: 0 16px; } .header-center { display: none; } }
.table-container { background: var(--bg-surface); border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow-x: auto; width: 100%; }
.table-central { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-central th { text-align: right; padding: 16px; color: var(--text-light); font-weight: 600; border-bottom: 2px solid var(--border-soft); }
.table-central td { padding: 16px; color: var(--text-main); font-weight: 500; border-bottom: 1px solid var(--border-soft); }
.badge { padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-error { background: rgba(244, 63, 94, 0.1); color: var(--error); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.btn-primary { background: var(--primary); color: white; padding: 10px 20px; border-radius: var(--radius-md); border: none; font-family: inherit; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: var(--transition-base); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; }
.modal-card { background: #fff; width: 100%; max-width: 500px; border-radius: 28px; box-shadow: 0 30px 60px -12px rgba(0,0,0,0.25); overflow: hidden; border: none; }
.modal-header { padding: 24px 32px; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 32px; }
.hidden { display: none !important; }
.animated-view { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-column-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gap-12 { gap: 12px; }
.mb-32 { margin-bottom: 32px; }
.text-muted { color: var(--text-muted); }
.text-bold { font-weight: 700; }
.w-full { width: 100%; }
.rounded-12 { border-radius: 12px; }
.p-32 { padding: 32px; }

