:root {
    --bg: #FFFFFF;
    --bg-elevated: #F8F9FA;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text: #003B6D;
    --text-muted: #004B80;
    --brand-1: #003B6D;
    --brand-2: #108AD0;
    --success: #10B981;
    --warning: #E56A21;
    --danger: #EF4444;
    --radius: 14px;
    --shadow: 0 12px 30px rgba(0, 59, 109, 0.08);
    --font-ar: "Cairo", sans-serif;
    --font-en: "Inter", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg-elevated);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.lang-ar { font-family: var(--font-ar); }
body.lang-en { font-family: var(--font-en); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 10px 22px; border-radius: 10px; font-weight: 600;
    font-size: 0.9rem; cursor: pointer; border: 2px solid transparent;
    transition: all 0.2s ease; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--brand-1); color: #fff; border-color: var(--brand-1); }
.btn-primary:hover { background: #002a50; border-color: #002a50; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand-1); border-color: transparent; }
.btn-ghost:hover { background: rgba(0,59,109,0.06); text-decoration: none; }
.btn-outline { background: transparent; color: var(--brand-1); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand-2); text-decoration: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.navbar {
    background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,59,109,0.04);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 32px; }
.navbar-brand { font-size: 1.2rem; font-weight: 700; color: var(--brand-1); text-decoration: none; flex-shrink: 0; }
.navbar-links { display: flex; list-style: none; gap: 4px; }
.navbar-links a { padding: 6px 14px; border-radius: 8px; color: var(--text-muted); font-weight: 500; font-size: 0.9rem; text-decoration: none; }
.navbar-links a:hover { background: var(--bg-elevated); color: var(--brand-1); }
.navbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; color: #fff; font-weight: 700;
    font-size: 0.85rem; flex-shrink: 0; cursor: default; user-select: none;
}

.messages { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.alert { padding: 12px 18px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500; border-left: 4px solid; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: var(--success); }
.alert-warning { background: #fffbeb; color: #92400e; border-color: var(--warning); }
.alert-error, .alert-danger { background: #fef2f2; color: #991b1b; border-color: var(--danger); }
.alert-info { background: #eff6ff; color: #1e40af; border-color: var(--brand-2); }
[dir="rtl"] .alert { border-left: none; border-right: 4px solid; }

.main-content { flex: 1; padding-bottom: 60px; }
.footer { background: var(--brand-1); color: rgba(255,255,255,0.7); padding: 24px 0; font-size: 0.85rem; }
.footer-inner { text-align: center; }

.hero { background: linear-gradient(135deg, var(--brand-1) 0%, #1565a8 100%); color: #fff; padding: 80px 0; }
.hero-inner { max-width: 700px; }
.hero-heading { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.25; margin-bottom: 16px; }
.hero-sub { font-size: 1.1rem; opacity: 0.85; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.section { padding: 60px 0; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 28px; color: var(--brand-1); }
.section-footer { margin-top: 28px; display: flex; justify-content: center; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-body { padding: 22px; }
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 8px; color: var(--brand-1); }
.card-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.card-meta { font-size: 0.78rem; color: #94a3b8; }

.auth-page, .status-page { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card, .status-card { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); box-shadow: var(--shadow); padding: 40px; width: 100%; max-width: 440px; }
.auth-card-header { text-align: center; margin-bottom: 28px; }
.auth-title { font-size: 1.6rem; font-weight: 700; color: var(--brand-1); }
.auth-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-top: 6px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-control { padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.9rem; color: var(--text); background: var(--bg-elevated); width: 100%; }
.form-control:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(16, 138, 208, 0.12); background: var(--surface); outline: none; }
.has-error .form-control { border-color: var(--danger); }
.form-error { font-size: 0.78rem; color: var(--danger); font-weight: 500; }
.auth-footer-text { text-align: center; font-size: 0.88rem; color: var(--text-muted); margin-top: 20px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #94a3b8; font-size: 0.8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.status-card { text-align: center; max-width: 480px; padding: 48px 40px; }
.status-icon { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.status-icon--warning { background: #fff7ed; color: var(--warning); }
.status-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; color: var(--brand-1); }
.status-body { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 28px; }