/* Hagizra Panel — עיצוב נקי ובהיר: רקע שנהב, טקסט דיו, מבטא אחד מאופק (ירוק־טיל) */
:root {
  --bg: #faf7f0;
  --card: #fffdf8;
  --ink: #1e1b16;
  --muted: #6f675c;
  --line: #e6dfd1;
  --accent: #14665f;
  --accent-soft: #e2efec;
  --accent-ink: #0d4a45;
  --danger: #a92c22;
  --danger-soft: #fbe9e6;
  --warn-bg: #fdf3d2;
  --warn-ink: #6d4c00;
  --ok: #2e7d32;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif;
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 14px 48px; }
header.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 6px 2px 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
header.top h1 { font-size: 22px; margin: 0; line-height: 1.3; }
header.top .sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
button, input, select, textarea { font: inherit; }
button {
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 16px; cursor: pointer; min-height: 44px;
}
button:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: var(--danger); }
button.danger-ghost { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
button.small { padding: 6px 10px; min-height: 36px; font-size: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 19px; }
.card h3 { margin: 18px 0 4px; font-size: 16px; }
.guide { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; margin-inline-start: 6px;
}
.badge.ok { background: #e3f2e4; color: var(--ok); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.muted { background: #efece4; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.stat b { display: block; font-size: 20px; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }
.kv { font-size: 14px; margin: 4px 0; word-break: break-all; }
.kv b { font-weight: 600; }
.warning {
  background: var(--warn-bg); color: var(--warn-ink);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0;
}
.group-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.group-row .jid { font-family: monospace; font-size: 13px; word-break: break-all; direction: ltr; text-align: right; }
.group-row .state { font-size: 13px; color: var(--muted); white-space: nowrap; }
/* מתג */
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: #d8d1c2; border-radius: 999px;
  transition: .2s; cursor: pointer;
}
.slider:before {
  content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; top: 3px; inset-inline-start: 3px; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(-22px); }
[dir="rtl"] .switch input:checked + .slider:before { transform: translateX(-22px); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input[type="text"], .row input[type="password"], textarea {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { width: 100%; min-height: 90px; resize: vertical; }
pre.logs {
  background: #211e19; color: #e8e2d5; border-radius: 10px; padding: 12px;
  font-size: 12px; line-height: 1.5; overflow: auto; max-height: 320px;
  direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word;
}
.savebar {
  position: sticky; bottom: 12px; background: var(--accent-ink); color: #fff;
  border-radius: 12px; padding: 12px 14px; display: none;
  align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px;
}
.savebar.show { display: flex; }
.savebar button { background: #fff; color: var(--accent-ink); }
.danger-zone { border: 1px solid #eec9c4; background: #fff8f7; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.field { margin: 10px 0; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.msg { font-size: 14px; margin: 8px 0; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
.center { max-width: 420px; margin: 60px auto 0; }
.center .card { padding: 24px; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 17, 12, .5);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal { background: var(--card); border-radius: 16px; padding: 20px; max-width: 420px; width: 100%; }
.modal h3 { margin-top: 0; }
.modal .row { justify-content: flex-end; margin-top: 16px; }
footer { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 24px; }
