/* PALLET-SUPERADMIN-001: platform control plane. Desktop-first, works on tablets. */
:root {
  --bg: #f6f7f9; --surface: #fff; --text: #17191c; --muted: #5d6470; --line: #e3e6eb; --line-strong: #cfd4dc;
  --brand: #0f5c4d; --brand-soft: #e3f1ed; --danger: #a4281c; --danger-soft: #fbe9e7; --warn: #8a5a00; --warn-soft: #fdf2dc;
  --ok: #1e6b35; --ok-soft: #e4f3e8; --info-soft: #e8eef9; --info: #2a4e8f; --radius: 8px; --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: #12302a; color: #d8e6e1; padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { font-weight: 700; color: #fff; padding: 4px 10px 2px; font-size: 15px; }
.side .env { padding: 0 10px 14px; font-size: 11px; color: #9fbab2; }
.side a { display: block; color: #d8e6e1; padding: 7px 10px; border-radius: 6px; margin: 1px 0; }
.side a.active, .side a:hover { background: #1f4a40; color: #fff; text-decoration: none; }
.main { min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.content { padding: 20px 24px 40px; max-width: 1400px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .v { font-size: 22px; font-weight: 700; }
.kpi .l { color: var(--muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; position: sticky; top: 0; }
tr:hover td { background: #fbfcfd; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--info-soft); color: var(--info); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.grey { background: #eef0f3; color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); padding: 7px 12px;
  border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; min-height: 34px; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.link { border: 0; background: none; color: var(--brand); padding: 4px 6px; min-height: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; background: #fff; min-height: 34px; }
textarea { min-height: 70px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 12px 0 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; text-decoration: none; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }
.banner { padding: 10px 16px; font-weight: 600; }
.banner.support { background: #7a2e0e; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.notice { padding: 10px 12px; border-radius: 6px; background: var(--info-soft); color: var(--info); margin-bottom: 12px; }
.notice.bad { background: var(--danger-soft); color: var(--danger); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 20, 25, .45); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 10px; width: min(520px, 100%); padding: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.modal h2 { margin-bottom: 8px; }
.login { max-width: 400px; margin: 10vh auto; }
.toast { position: fixed; right: 16px; bottom: 16px; padding: 10px 14px; border-radius: 6px; background: #12302a; color: #fff; z-index: 60; max-width: 420px; }
.toast.bad { background: var(--danger); }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-weight: 400; color: var(--text); }
.check input { width: auto; min-height: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.effects span { margin-right: 6px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; }
  .side .brand, .side .env { width: 100%; }
  .content { padding: 16px; }
  .two { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 130px 1fr; }
}
