/* Shared Flow look — NFG group palette (black / greys / white). Divisional accents via --accent. */
:root {
  --black: #000000; --grey-d: #A7A9AC; --grey-l: #D9D9D9; --white: #FFFFFF;
  --thirsti-red: #E02627; --thirsti-blue: #003A70; --tek-green: #004B28;
  --bg: #F4F4F5; --surface: #FFFFFF; --text: #111111; --muted: #5F6166; --line: #D9D9D9;
  --accent: #000000; --accent-text: #FFFFFF; --danger: #E02627; --ok: #2CA22C;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0E0E10; --surface: #1A1A1D; --text: #F2F2F2; --muted: #A7A9AC; --line: #2C2C30;
          --accent: #FFFFFF; --accent-text: #000000; --shadow: none; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; font-size: 15px; line-height: 1.45; }
a { color: inherit; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--black); color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar .brand { font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar .brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey-d); }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--grey-l); }
.topbar button, .topbar a.btn { background: transparent; color: #fff; border: 1px solid #444; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 13px; }

label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { color: var(--danger); border-color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

.msg { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-top: 12px; }
.msg.err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.msg.ok  { background: color-mix(in srgb, var(--ok) 14%, transparent); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--grey-l); color: #111; }
.pill.on { background: #111; color: #fff; } .pill.off { background: transparent; border: 1px solid var(--grey-d); color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr { cursor: pointer; } tbody tr:hover { background: color-mix(in srgb, var(--grey-l) 35%, transparent); }

dialog { border: none; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
dialog .body { padding: 4px 20px 16px; max-height: 70vh; overflow: auto; }
dialog footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 500; margin: 0; }
.check input { width: 18px; height: 18px; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 14px 0 0; }
.switch input { width: 18px; height: 18px; }
.temp { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .08em; padding: 10px; background: var(--bg); border-radius: 8px; text-align: center; }
