
/* ============================================================
   1. المتغيرات الأساسية (الهوية البصرية)
   ============================================================ */
:root {
  --bg: #0a0f1a;
  --bg-grid: rgba(56, 189, 248, 0.03);
  --surface: #131b2e;
  --surface-hover: #1a2332;
  --border: #243044;
  --border-hover: #38bdf8;
  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --accent: #38bdf8;
  --accent-2: #4049C6;
  --accent-3: #2ECF52;
  --accent-hover: #7dd3fc;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 6px;
  --font-size: 14px;
  --max-width: 1200px;
  --header-height: 72px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   2. إعادة الضبط (Reset) والأساسيات
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-size); scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
main { padding: 0 1.5rem; }
@media (min-width: 768px) { main { padding: 0 2rem; } }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* ============================================================
   3. الشريط العلوي (Navbar)
   ============================================================ */
.navbar {
  background: rgba(17, 24, 39, 0.8);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px); height: var(--header-height);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.navbar-brand { display: flex; align-items: center; gap: 0.75rem; font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.navbar-brand:hover { text-decoration: none; color: var(--accent); }
.navbar-nav { display: flex; align-items: center; gap: 2rem; list-style: none; }
.navbar-nav a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.navbar-nav a:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   4. الأزرار (Buttons)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition); text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-hover); border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-glow); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #0284c7); border-color: transparent; color: #0b1120; font-weight: 700; }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), #0369a1); color: #0b1120; box-shadow: 0 0 25px rgba(56, 189, 248, 0.4); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(248, 113, 113, 0.1); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #0b1120; }

/* ============================================================
   5. البطاقات (Cards)
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.card-text { font-size: 0.95rem; color: var(--text-muted); line-height: 1.8; }
.card-muted { background: rgba(30, 41, 59, 0.5); border: 1px dashed var(--border); color: var(--text-muted); }
.card-muted .card-title, .card-muted p { color: var(--text-muted); }

/* ============================================================
   6. تخطيط صفحة الهبوط (Landing Page)
   ============================================================ */
.hero-split { display: flex; align-items: center; justify-content: space-between; gap: 4rem; min-height: calc(100vh - var(--header-height)); padding: 4rem 1.5rem; }
.hero-content { flex: 1; max-width: 600px; }
.hero-title {
  font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -1px;
  color: var(--accent);
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 2.5rem; line-height: 1.8; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; }
.chart-preview-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-lg), var(--shadow-glow); width: 100%; max-width: 500px;
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg); transition: transform var(--transition);
}
.chart-preview-card:hover { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); }
.chart-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.chart-preview-code {
  font-family: "JetBrains Mono", "Fira Code", monospace; font-size: 0.75rem; color: var(--text-muted);
  background: var(--bg); padding: 0.5rem; border-radius: var(--radius-sm); margin-top: 1rem; overflow-x: auto;
}

/* ============================================================
   7. الأقسام والشبكات (Sections & Grids)
   ============================================================ */
.section { padding: 6rem 0; }
.section-alt { background: var(--surface); }
.section-title { font-size: 2.5rem; font-weight: 800; text-align: center; margin-bottom: 1rem; letter-spacing: -0.5px; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); text-align: center; max-width: 600px; margin: 0 auto 3rem; }
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   8. التذييل (Footer)
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 3rem 0; margin-top: 4rem; text-align: center; font-size: 0.9rem; color: var(--text-muted); background: var(--surface); }
.footer a { font-weight: 600; color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* ============================================================
   9. أدوات مساعدة (Utilities)
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.hidden { display: none !important; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }

/* ============================================================
   10. مكونات إضافية (Badges, Alerts, Forms, FAQ)
   ============================================================ */
.badge { display: inline-block; padding: 0.2rem 0.6rem; font-size: 0.8rem; font-weight: 700; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-accent { background: var(--accent); color: #0b1120; }
.badge-success { background: var(--success); color: #0b1120; }
.badge-danger { background: var(--danger); color: #0b1120; }

.alert { padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--border); font-size: 0.9rem; line-height: 1.7; }
.alert-info { background: rgba(56, 189, 248, 0.08); border-color: var(--accent); color: var(--text); }

.form-input { width: 100%; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color var(--transition); }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.inline-code { font-family: "JetBrains Mono", "Fira Code", monospace; font-size: 0.85em; background: var(--bg); padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; list-style: none; transition: background var(--transition); }
.faq-question:hover { background: var(--surface-hover); }
.faq-question::-webkit-details-marker { display: none; }
.faq-answer { padding: 0 1.25rem 1rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }

/* ============================================================
   11. صفحة تسجيل الدخول (Auth)
   ============================================================ */
.auth-container { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--header-height) - 120px); padding: 2rem; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg), var(--shadow-glow); }
.auth-title { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 0.5rem; letter-spacing: -0.5px; }
.auth-subtitle { font-size: 0.9rem; color: var(--text-muted); text-align: center; margin-bottom: 2rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all var(--transition); margin-bottom: 0.75rem; text-decoration: none; }
.oauth-btn:hover { border-color: var(--accent); background: var(--surface-hover); color: var(--accent); box-shadow: var(--shadow-glow); text-decoration: none; }

/* ============================================================
   12. Header Dropdown (User Menu)
   ============================================================ */
.user-menu { position: relative; display: inline-block; }
.user-menu-trigger { display: flex; align-items: center; gap: 0.5rem; background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 0.35rem 0.6rem; cursor: pointer; transition: all var(--transition); color: var(--text); }
.user-menu-trigger:hover { background: var(--surface-hover); border-color: var(--border); }
.user-avatar, .user-avatar-fallback { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; flex-shrink: 0; }
.user-avatar-fallback { background: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: var(--accent); }
.user-name { font-size: 0.9rem; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown { position: absolute; top: calc(100% + 0.5rem); right: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0.5rem; z-index: 200; display: none; }
.user-dropdown.open { display: block; }
.user-dropdown-header { padding: 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.user-dropdown-header .email { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; word-break: break-all; }
.user-dropdown-header .meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.user-dropdown-item { display: block; padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text); text-decoration: none; transition: background var(--transition); cursor: pointer; border: none; background: none; width: 100%; text-align: left; }
.user-dropdown-item:hover { background: var(--surface-hover); text-decoration: none; }
.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger:hover { background: rgba(248, 113, 113, 0.1); }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }

/* ============================================================
   13. Modal & FAB & Restore
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg), var(--shadow-glow); position: relative; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0.25rem; }
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

.fab { position: fixed; bottom: 2rem; right: 2rem; background: linear-gradient(135deg, var(--accent), #0284c7); color: #0b1120; border: none; border-radius: 999px; padding: 0.9rem 1.5rem; font-size: 0.95rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-lg), 0 0 20px rgba(56, 189, 248, 0.3); display: flex; align-items: center; gap: 0.5rem; transition: all var(--transition); z-index: 500; }
.fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 0 30px rgba(56, 189, 248, 0.5); }

.restore-banner { background: rgba(56, 189, 248, 0.08); border: 1px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.restore-banner .actions { display: flex; gap: 0.5rem; }

/* ============================================================
   14. Admin Layout & Tables
   ============================================================ */
.admin-layout { display: flex; min-height: calc(100vh - var(--header-height)); }
.admin-sidebar { width: 240px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 1.5rem 0; position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); overflow-y: auto; display: flex; flex-direction: column; }
.admin-sidebar-header { padding: 0 1.5rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
.admin-sidebar-title { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.admin-sidebar-nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.admin-sidebar-footer { border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.75rem; }
.admin-sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 1.5rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; border-left: 3px solid transparent; transition: all var(--transition); text-decoration: none; }
.admin-sidebar-link:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.admin-sidebar-link.active { background: rgba(56, 189, 248, 0.08); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.admin-sidebar-icon { font-size: 1rem; width: 1.2rem; text-align: center; }
.admin-content { flex: 1; padding: 2rem; min-width: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; transition: all var(--transition); }
.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }

.users-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.users-table th { background: var(--bg); color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; text-align: left; padding: 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; font-weight: 600; }
.users-table td { padding: 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: rgba(56, 189, 248, 0.03); }

.user-cell { display: flex; align-items: center; gap: 0.75rem; }
.user-cell-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); object-fit: cover; flex-shrink: 0; }
.user-cell-avatar-fallback { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface-hover); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: var(--accent); flex-shrink: 0; }
.user-cell-name { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.user-cell-email { font-size: 0.8rem; color: var(--text-muted); word-break: break-all; }

.status-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.status-active { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.status-suspended { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

.search-input { width: 100%; max-width: 400px; padding: 0.6rem 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 0.9rem; transition: border-color var(--transition); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.actions-cell { white-space: nowrap; }
.action-btn { padding: 0.4rem 0.7rem; font-size: 0.85rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; transition: all var(--transition); margin-right: 0.25rem; font-weight: 500; }
.action-btn:last-child { margin-right: 0; }
.action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-hover); }
.action-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ============================================================
   15. Spinner, Banner, Back to Top, Cookie Banner
   ============================================================ */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--text-muted); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { background: var(--accent); color: #0b1120; text-align: center; padding: 0.6rem 1rem; font-size: 0.9rem; font-weight: 600; }
.banner a { color: #0b1120; text-decoration: underline; }

.back-to-top { position: fixed; bottom: 6rem; right: 2rem; left: auto; transform: translateY(100px); width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); opacity: 0; transition: all var(--transition); z-index: 400; pointer-events: none; }
.back-to-top.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--accent); color: #0b1120; border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }

.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 1rem 1.5rem; z-index: 900; box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3); transform: translateY(100%); transition: transform var(--transition); }
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-content { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cookie-banner-content p { margin: 0; font-size: 0.9rem; color: var(--text); flex: 1; min-width: 200px; line-height: 1.6; }
.cookie-banner-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ============================================================
   16. إضافات الصفحة الرئيسية الجديدة (New Landing Additions)
   ============================================================ */
.hero-code-block {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem; color: var(--text-muted); overflow-x: auto; line-height: 1.6;
}
.hero-code-block code { white-space: nowrap; }
.hero-badges { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-badge { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.trust-bar { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.trust-items { display: flex; justify-content: center; align-items: center; gap: 3rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.trust-icon { font-size: 1.2rem; }

.use-case-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; transition: all var(--transition);
}
.use-case-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.use-case-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.use-case-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text); }
.use-case-text { font-size: 0.95rem; color: var(--text-muted); line-height: 1.8; margin: 0; }

.pricing-card { position: relative; transition: all var(--transition); }
.pricing-featured {
  border-color: var(--accent); background: linear-gradient(135deg, var(--surface), rgba(56, 189, 248, 0.05));
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.2); transform: scale(1.05);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #0b1120; padding: 0.3rem 1rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}

/* ============================================================
   17. الاستجابة للجوال (Responsive)
   ============================================================ */
@media (max-width: 900px) {
  .hero-split { flex-direction: column; text-align: center; gap: 2rem; padding: 2rem 1.5rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-actions { justify-content: center; }
  .chart-preview-card { transform: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .navbar-nav { gap: 1rem; }
  
  .trust-items { gap: 1.5rem; }
  .pricing-featured { transform: scale(1); }
  .hero-code-block { font-size: 0.75rem; }
  
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; top: 0; border-right: none; border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
  .admin-sidebar-nav { flex-direction: row; overflow-x: auto; gap: 0; }
  .admin-sidebar-link { padding: 0.65rem 1rem; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .admin-sidebar-link.active { border-left: none; border-bottom-color: var(--accent); }
  .admin-sidebar-footer { display: none; }
  .admin-sidebar-header { padding: 0 1rem 0.5rem; }
  .admin-content { padding: 1.5rem 1rem; }
  .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
}
/* ============================================================
   18. تحسينات UX النهائية (أحجام النصوص فقط)
   ============================================================ */

/* رفع أحجام النصوص الصغيرة جداً لضمان القراءة المريحة */
.badge { font-size: 0.8rem; padding: 0.25rem 0.7rem; }
.action-btn { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
.status-badge { font-size: 0.8rem; padding: 0.25rem 0.6rem; }
.users-table th { font-size: 0.85rem; }

/* ضبط مسافة الـ Toast ليكون أعلى قليلاً من شريط الكوكيز */
.toast { bottom: 5rem; left: 50%; transform: translateX(-50%) translateY(100px); }

@media (max-width: 900px) {
  .toast { bottom: 6rem; width: 90%; }
}

/* Mobile header: keep brand intact, let the nav links scroll sideways instead of overlapping */
@media (max-width: 640px) {
  .navbar .container { gap: 0.75rem; }
  .navbar-brand { flex-shrink: 0; font-size: 1.1rem; gap: 0.4rem; }
  .navbar-brand img { width: 28px; height: 28px; margin-left: 0 !important; }
  .navbar-nav { gap: 0.6rem; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .navbar-nav::-webkit-scrollbar { display: none; }
  .navbar-nav > li { flex-shrink: 0; }
  .user-dropdown { position: fixed; top: 4.5rem; right: 0.75rem; left: auto; max-width: calc(100vw - 1.5rem); }
  .navbar-nav a { font-size: 0.85rem; }
  .navbar-nav .btn-sm { padding: 0.4rem 0.7rem; }
}

@media (max-width: 640px) {
  .hero-split > * { min-width: 0; max-width: 100%; }
  .hero-code-block { max-width: 100%; overflow-x: auto; }
}
@media (max-width: 480px) {
  .navbar-nav .btn-primary { display: none; }
}
@media (max-width: 400px) {
  .navbar-nav { gap: 0.5rem; }
  .navbar-nav a { font-size: 0.8rem; }
  .user-menu-trigger { padding: 0.25rem; }
  .user-name { display: none; }
}
