/* ===================================================
   SAO Dev — Unified Design System
   الهدف: توحيد تصميم كل صفحات الموقع
   =================================================== */

/* ---- Google Font: Cairo ---- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* ---- Design Tokens ---- */
:root{
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-2: #f0f5fb;
  --border: rgba(15,23,42,.08);
  --border-strong: rgba(15,23,42,.14);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary-1: #0067c0;
  --primary-2: #00a3ff;
  --primary-soft: rgba(0,103,192,.08);
  --danger: #dc2626;
  --danger-soft: rgba(220,38,38,.08);
  --success: #16a34a;
  --success-soft: rgba(22,163,74,.08);
  --warning: #d97706;
  --warning-soft: rgba(217,119,6,.08);
  --shadow: 0 16px 40px rgba(15,23,42,.08);
  --shadow-sm: 0 8px 20px rgba(15,23,42,.07);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --transition: all .25s ease;
  --container: min(1180px, calc(100% - 24px));
  --font: "Cairo", Tahoma, Arial, sans-serif;
}

/* ---- Base Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-main);
  background:
    radial-gradient(circle at top right, rgba(0,163,255,.08), transparent 18%),
    radial-gradient(circle at top left, rgba(0,103,192,.08), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #f4f8fc 100%);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

/* ---- Topbar (shared) ---- */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.site-topbar__inner {
  width: var(--container);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-brand__logo {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(0,103,192,.22);
  flex: 0 0 auto;
}
.site-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.site-brand__text strong { font-size: 17px; font-weight: 900; }
.site-brand__text span { font-size: 12px; color: var(--text-muted); }

/* ---- Footer (shared) ---- */
.site-footer {
  padding: 24px 0 36px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Container ---- */
.container {
  width: var(--container);
  margin: 0 auto;
}

/* ---- Card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  font-size: 16px;
}
.card-body { padding: 22px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: var(--radius-xs);
  font-weight: 800;
  font-size: 14px;
  transition: var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,103,192,.22);
}
.btn-primary:hover { box-shadow: 0 14px 28px rgba(0,103,192,.28); }
.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-1);
}
.btn-outline {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--primary-1);
  color: var(--primary-1);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220,38,38,.14);
}
.btn-danger:hover { background: rgba(220,38,38,.14); }
.btn-danger-solid { background: var(--danger); color: #fff; }

/* ---- Form Fields ---- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  border-radius: var(--radius-xs);
  padding: 11px 14px;
  outline: none;
  font-size: 14px;
  transition: var(--transition);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary-1);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}
.field textarea { min-height: 100px; resize: vertical; }

/* ---- Status Badge / Chip ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.chip-primary { background: var(--primary-soft); color: var(--primary-1); border-color: rgba(0,103,192,.14); }
.chip-success { background: var(--success-soft); color: var(--success); border-color: rgba(22,163,74,.14); }
.chip-danger  { background: var(--danger-soft);  color: var(--danger);  border-color: rgba(220,38,38,.14);  }
.chip-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(217,119,6,.14);  }

/* ---- Utility ---- */
.text-muted    { color: var(--text-muted); }
.text-primary  { color: var(--primary-1); }
.text-danger   { color: var(--danger); }
.text-success  { color: var(--success); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
