  :root {
    --bg: #f6f6f4; --card: #ffffff; --text: #1d1d1b; --muted: #6b6b66;
    --line: #e4e4df; --accent: #f28c28; --accent-ink: #ffffff;
    --green: #1f9d55; --red: #c0392b;
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--text);
         font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
  .wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
  header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
  h1 { font-size: 22px; margin: 0; }
  h2 { font-size: 17px; margin: 0 0 4px; }
  .muted { color: var(--muted); font-size: 13px; }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
  label.field { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 13px; }
  input[type=email], input[type=password], textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
  textarea { min-height: 96px; resize: vertical; }
  button { font: inherit; border-radius: 10px; padding: 9px 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
  button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
  button.danger { color: var(--red); }
  button:disabled { opacity: .5; cursor: default; }
  .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .row:first-of-type { border-top: 0; }
  .switch { position: relative; width: 46px; height: 26px; flex: none; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .slider { position: absolute; inset: 0; background: #ccc; border-radius: 26px; transition: .2s; cursor: pointer; }
  .slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
  .switch input:checked + .slider { background: var(--green); }
  .switch input:checked + .slider::before { transform: translateX(20px); }
  .tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
  .tabs button.active { background: var(--text); color: #fff; border-color: var(--text); }
  .side-title { margin: 16px 0 6px; font-weight: 700; }
  .msg { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
  .msg.off { opacity: .55; }
  .msg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
  .msg-actions .grow { flex: 1; }
  .toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: #fff;
           padding: 10px 16px; border-radius: 10px; font-size: 14px; display: none; max-width: calc(100% - 32px); }
  .error { color: var(--red); font-size: 13px; margin-top: 8px; }
  .hidden { display: none; }
  .main-tabs { margin: 0 0 16px; }
  .main-tabs button.active, #rep-tabs button.active, #main-vtc .tabs button.active, #main-resa .tabs button.active, #main-sanctions .tabs button.active, #main-options .tabs button.active, #main-control .tabs button.active, #main-location .tabs button.active, #main-confirm .tabs button.active, #main-locale .tabs button.active, #main-update .tabs button.active { background: var(--text); color: #fff; border-color: var(--text); }
  .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
  .stat b { display: block; font-size: 22px; }
  .tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
  .tbl th, .tbl td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
  .tbl-wrap { overflow-x: auto; }
  .badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eee; margin-right: 4px; }
  .badge.grave, .badge.urgent { background: #fde2df; color: var(--red); }
  .badge.serious { background: #fff1db; color: #a35a00; }
  .badge.ok { background: #e2f5ea; color: var(--green); }
  .item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
  .item p { margin: 6px 0; white-space: pre-wrap; }
  .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  input[type=number], input[type=text], select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
  input[type=number] { width: 100px; }
