:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --sidebar-width: 260px;
    --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg-main); color: var(--text-main); direction: rtl; }
.app-wrapper { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: #0f172a; color: #fff; display: flex; flex-direction: column; padding: 1.5rem 1rem; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid #1e293b; }
.brand-logo { width: 40px; height: 40px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.25rem; }
.brand-info { display: flex; flex-direction: column; }
.brand-title { font-weight: 700; font-size: 1.1rem; }
.brand-subtitle { font-size: 0.75rem; color: #94a3b8; }
.nav-menu { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: #cbd5e1; text-decoration: none; border-radius: var(--radius); transition: 0.2s; }
.nav-link:hover, .nav-link.active { background: #1e293b; color: #fff; }
.nav-link.active { background: var(--primary); }
.sidebar-footer { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: #94a3b8; border-top: 1px solid #1e293b; padding-top: 1rem; }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.badge-version { background: #1e293b; padding: 2px 8px; border-radius: 4px; font-family: monospace; }
.main-content { flex-grow: 1; display: flex; flex-direction: column; }
.topbar { background: var(--bg-card); padding: 1rem 2rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.page-title { font-size: 1.25rem; font-weight: 600; }
.badge-env { background: #e0f2fe; color: #0369a1; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.content-body { padding: 2rem; max-width: 1200px; width: 100%; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.card-body { padding: 1.5rem; }
.dashboard-grid, .grid-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.stat-card { display: flex; align-items: center; padding: 1.5rem; gap: 1.25rem; }
.card-icon { font-size: 2rem; background: #f0f9ff; padding: 12px; border-radius: var(--radius); }
.card-label { display: block; font-size: 0.875rem; color: var(--text-muted); }
.card-value { font-size: 1.5rem; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: var(--radius); font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover { background: #cbd5e1; }
.form-group { margin-bottom: 1rem; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit; }
.form-help { font-size: 0.8rem; color: var(--text-muted); }
.table { width: 100%; border-collapse: collapse; text-align: right; }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.table th { background: #f8fafc; color: var(--text-muted); }
.badge { padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.alert { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.health-item { display: flex; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); gap: 1rem; }
.status-bullet { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.status-bullet.ok { background: var(--success); }
.status-bullet.error { background: var(--danger); }
.health-info { flex-grow: 1; }
.health-title { font-weight: 600; }
.health-desc { font-size: 0.85rem; color: var(--text-muted); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.p-0 { padding: 0 !important; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.text-center { text-align: center; }
.error-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg-main); }
.error-card { background: var(--bg-card); padding: 3rem; border-radius: var(--radius); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); text-align: center; max-width: 480px; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 1rem; }
.error-title { font-size: 1.25rem; margin-bottom: 0.75rem; }
.error-desc { color: var(--text-muted); margin-bottom: 1.5rem; }