:root {
  --bg: #eef2f7;
  --paper: #ffffff;
  --ink: #1a2332;
  --muted: #5b6778;
  --brand: #0d2b52;
  --brand2: #1a4a7a;
  --ok: #0d7a5f;
  --warn: #b45309;
  --danger: #b42318;
  --line: #dbe3ee;
  --soft: #f4f7fb;
  --gold: #f5a623;
  --note: #fff8e6;
  --note-border: #f5a623;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
}

a { color: var(--brand2); }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px;
}

.hero {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  padding: 28px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.hero h1 { margin: 0 0 8px; font-size: 28px; }
.hero p { margin: 0; opacity: 0.95; }

.hero code {
  color: var(--ink);
  background: #fff;
  font-weight: 600;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.badge-solid { background: var(--gold); color: #1a2332; font-weight: 700; }
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-req { background: #fee2e2; color: #991b1b; }
.badge-opt { background: #e0e7ff; color: #3730a3; }

.back {
  display: inline-block;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  color: var(--brand);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(13, 43, 82, 0.08);
}

.section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
}

.section h2 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 20px;
}

.section h3 {
  margin: 18px 0 8px;
  font-size: 17px;
  color: var(--brand2);
}

.quick-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: 16px;
  padding-bottom: 16px;
  box-shadow: 0 4px 16px rgba(13, 43, 82, 0.1);
}

.quick-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-nav-links a {
  display: inline-block;
  text-decoration: none;
  background: var(--soft);
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
}

.quick-nav-links a:hover {
  background: #e8eef6;
  border-color: var(--brand2);
}

.toc a {
  display: block;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
}

.toc a:hover { color: var(--brand2); }

.notes {
  background: var(--note);
  border: 2px dashed var(--note-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
}

.notes h2 {
  margin: 0 0 10px;
  color: var(--warn);
  font-size: 20px;
}

.notes textarea,
.notes .note-box {
  width: 100%;
  min-height: 90px;
  border: 1px solid #f0d48a;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fffdf6;
  font-family: inherit;
  font-size: 14px;
}

.checklist { list-style: none; padding: 0; margin: 8px 0 0; }
.checklist li {
  background: #fff;
  border: 1px solid #f0d48a;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 6px 0;
}

.steps { counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li {
  counter-increment: step;
  background: var(--soft);
  border-right: 4px solid var(--brand2);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 8px 0;
}
.steps li::before {
  content: "الخطوة " counter(step) " — ";
  font-weight: 700;
  color: var(--brand);
}

.tip, .warn, .danger, .site {
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
}

.tip { background: #ecfdf5; border: 1px solid #86efac; }
.warn { background: #fff7ed; border: 1px solid #fdba74; }
.danger { background: #fef2f2; border: 1px solid #fca5a5; }
.site { background: #eff6ff; border: 1px solid #93c5fd; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border: 1px solid var(--line); padding: 9px 10px; vertical-align: top; text-align: right; }
th { background: var(--soft); color: var(--brand); }

code, .mono {
  font-family: Consolas, "Courier New", monospace;
  background: var(--soft);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 13px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover { border-color: var(--brand2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }
.card h3 { margin: 0 0 6px; font-size: 17px; color: var(--brand); }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.caption {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
  text-align: center;
}

/* Approximate admin panel screenshots */
.mock {
  border: 1px solid #c5d0de;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 10px 30px rgba(13, 43, 82, 0.08);
  margin: 12px 0;
  font-size: 13px;
}

.mock-bar {
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.mock-body { display: flex; min-height: 220px; }

.mock-side {
  width: 170px;
  background: #0b2344;
  color: #d7e4f5;
  padding: 10px 8px;
  font-size: 12px;
}

.mock-side .g { color: #8fb4d9; font-size: 11px; margin: 10px 4px 4px; }
.mock-side .i { padding: 6px 8px; border-radius: 6px; margin: 2px 0; }
.mock-side .i.active { background: #1a4a7a; color: #fff; }

.mock-main { flex: 1; padding: 12px; }

.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mock-btn {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.mock-table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; }
.mock-table th { background: #e8eef6; font-size: 11px; }
.mock-table td, .mock-table th { padding: 7px; border-bottom: 1px solid #edf1f6; }
.mock-table tr:last-child td { border-bottom: 0; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-on { background: #16a34a; }
.dot-off { background: #9ca3af; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fld {
  background: #fff;
  border: 1px solid #d5deea;
  border-radius: 8px;
  padding: 8px;
}

.fld label { display: block; font-size: 11px; color: #334155; margin-bottom: 4px; font-weight: 700; }
.fld .box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  color: #64748b;
  min-height: 28px;
  background: #f8fafc;
}

.fld.span2 { grid-column: 1 / -1; }
.star { color: #dc2626; }

.toggle {
  width: 36px;
  height: 18px;
  background: #16a34a;
  border-radius: 99px;
  position: relative;
}
.toggle::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 20px;
}

.site-mock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  background: var(--soft);
}
.tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.faq-q {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 6px 0;
  background: #fff;
}

.nav-footer { margin-top: 18px; color: var(--muted); font-size: 14px; }

@media (max-width: 800px) {
  .mock-body { display: block; }
  .mock-side { width: auto; }
  .form-grid { grid-template-columns: 1fr; }
}
