/* تنسيق تبويبات السيرفر بنفس هوية الهيكل الجديد (shell.css). يحمّل بعد style.css */

/* ---------- لوحة ألوان هادئة (بدون توهج) ---------- */
html body { background-color: #111827 !important; background-image: none !important; }
.card, .stat-big, .srv, .stat {
  background: #1a2232 !important; border-color: rgba(255,255,255,.06) !important; box-shadow: none !important;
}
.card:hover, .stat-big:hover, .srv:hover, .stat:hover { transform: none !important; box-shadow: none !important; }
.stat-big .stat-ico { box-shadow: none !important; background: rgba(107,140,206,.14) !important; }
.stat-big b, .stat b, .score .pct { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: #e2e8f0 !important; }
.stat-big.ok b, .badge.ok { color: #5eb8a8 !important; }
.stat-big.warn b, .badge.warn { color: #d6a85c !important; }
.badge.bad, .stat-big.bad b { color: #d4726a !important; }
.badge.ok { background: rgba(94,184,168,.12) !important; }
.badge.warn { background: rgba(214,168,92,.12) !important; }
.badge.bad { background: rgba(212,114,106,.12) !important; }
.btn.bad { color: #e0a19c !important; }

/* ---------- تحسينات عامة: تسلسل العناوين، المسافات، والجوال ---------- */
.hero h1 { font-size: 22px; font-weight: 700; letter-spacing: 0; }
.hero p { font-size: 13px; line-height: 1.7; max-width: 62ch; }
.card { border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.card > h2 { font-size: 15px; font-weight: 700; color: #e2e8f0; }
.card > .desc, .card .desc { font-size: 12.5px; line-height: 1.7; }
.sec-title { font-size: 12px; letter-spacing: .2px; text-transform: none; }
.list-item { padding: 11px 14px; margin-bottom: 8px; border-color: rgba(255,255,255,.05); background: rgba(255,255,255,.02); }
.list-item:hover { background: rgba(255,255,255,.035); }
.list-item small { display: block; color: #94a3b8; font-size: 12px; margin-top: 3px; }
.btn { border-radius: 9px; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(107,140,206,.7); outline-offset: 2px;
}
.ov-kpis .stat-big b { font-size: 22px; font-weight: 700; }
.ov-kpis .stat-big span { font-size: 12px; }

/* ---------- الرئيسية: أرقام بلون واحد هادئ، بدون توهج أو تدرج ---------- */
.home .stat-big b, .stat-big b, .home .stat b {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  color: #e2e8f0 !important; text-shadow: none !important; filter: none !important;
}
.home .stat-big span, .stat-big span { color: #94a3b8 !important; text-shadow: none !important; }
.home .stat-big .stat-ico, .stat-big .stat-ico { box-shadow: none !important; transform: none !important; }
.home .stat-big:hover .stat-ico { transform: none !important; box-shadow: none !important; }
.home .hero-title, .home .hero-title .grad-text, .home h1 {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  color: #e2e8f0 !important; text-shadow: none !important;
}
.home .stat-big.ok b { color: #5eb8a8 !important; }
.home .stat-big.warn b { color: #d6a85c !important; }

/* الرئيسية: عنوان أكبر، والمؤشرات متوسطة المحتوى */
.home .hero-title { font-size: clamp(40px, 6vw, 62px) !important; line-height: 1.2 !important; }
.home .stat-big { flex-direction: column !important; text-align: center !important; justify-content: center !important; gap: 8px !important; }
.home .stat-big > div:not(.stat-ico) { align-items: center; }

@media (max-width: 720px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 14px 16px; }
  .card { padding: 14px 15px; }
  .btns { gap: 6px; }
  .btn { padding: 7px 11px; }
}

/* ---------- الهيدر الخاص بالسيرفر ---------- */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 18px 20px; margin-bottom: 14px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(59,130,246,.14), rgba(129,140,248,.05));
  border: 1px solid rgba(96,165,250,.16);
}
.hero h1 { margin: 0 0 2px; font-size: 20px; }
.hero p { margin: 0; color: var(--muted, #94a3b8); font-size: 13px; }
.hero .btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- البطاقات ---------- */
.card {
  border-radius: 14px; padding: 16px 18px; margin-bottom: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card > h2 { margin: 0 0 4px; font-size: 16px; }
.card > .desc { margin: 0 0 12px; }
.card-head h2, .card-head h3, .sec-title { margin: 0; font-size: 15px; }
.sec-title { margin: 14px 2px 8px; font-size: 14px; color: var(--muted, #94a3b8); font-weight: 600; }
.card.err { border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.06); }
.desc, .muted, .muted.small { color: var(--muted, #94a3b8); }
.muted.small { font-size: 12px; }

/* ---------- الشبكات ---------- */
.grid-2, .grid-4 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ---------- الحقول والعناصر ---------- */
.field { display: grid; gap: 6px; margin-bottom: 10px; }
.row-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.05); }
.row-f:first-child { border-top: 0; }
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); margin-bottom: 8px;
}
.log { font-size: 13px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 6px 0; }

/* ---------- الأزرار ---------- */
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer;
  background: rgba(255,255,255,.05); color: inherit; border: 1px solid rgba(255,255,255,.1); text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { border-color: rgba(96,165,250,.5); background: rgba(96,165,250,.08); }
.btn.primary { background: #6b8cce; border-color: transparent; color: #f8fafc; font-weight: 600; }
.btn.primary:hover { background: #7d9bd6; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.bad { color: #fca5a5; border-color: rgba(248,113,113,.3); }
.btn.bad:hover { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.5); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- الوسوم والشرائح ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: rgba(148,163,184,.12); color: #cbd5e1; }
.badge.ok { background: rgba(52,211,153,.12); color: #6ee7b7; }
.badge.warn { background: rgba(251,191,36,.12); color: #fcd34d; }
.badge.bad { background: rgba(248,113,113,.12); color: #fca5a5; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.chip.on { background: rgba(96,165,250,.18); border-color: rgba(96,165,250,.4); }

/* ---------- الكلمات الممنوعة ---------- */
.wf-words { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-word { font-size: 12px; padding: 3px 9px; border-radius: 8px; background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.2); }

/* ---------- الخلفية والتركيز ---------- */
input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; border-radius: 8px; }

/* ---------- شريط الحفظ (الإعدادات): ثابت أسفل الشاشة بدون blur لتفادي التقطيع ---------- */
.savebar {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding: 12px 14px;
  border-radius: 14px; background: #0f172a; border: 1px solid rgba(96,165,250,.2);
  box-shadow: 0 -10px 30px -18px rgba(0,0,0,.6);
}

/* ---------- السجلات ---------- */
#lg-q {
  width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: inherit;
}
#lg-q:focus { border-color: rgba(96,165,250,.5); outline: none; }
#lg-list .log {
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; border: 0;
  background: rgba(255,255,255,.025); border-inline-start: 3px solid rgba(96,165,250,.45);
}
#lg-list .log small { color: var(--muted, #94a3b8); font-size: 12px; }
#lg-list .log p { margin: 4px 0 0; }

/* ---------- نظرة عامة: مؤشرات + مجموعات الإجراءات ---------- */
.ov-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 12px; }
.ov-kpis .stat-big { min-width: 0; }
.act-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 6px; }
.act-group { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.05); }
.act-group.danger { border-color: rgba(248,113,113,.2); background: rgba(248,113,113,.03); }
.act-group .sec-title { margin: 0 0 8px; }

/* ---------- مستوى الأمان (الرئيسية) ---------- */
.score .bar { min-width: 0; }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
