:root {
  /* Bố cục: một cột, tối đa 480px, dùng trước hết trên điện thoại */
  --bg: #f2f5f2; --surface: #ffffff; --ink: #17201b; --muted: #59665e; --line: #dbe2dc;
  --accent: #1e6a49; --accent-ink: #ffffff; --accent-soft: #e2f0e8;
  --danger: #b3261e; --warn: #8a5300; --warn-bg: #fff2d2;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1310; --surface: #171c18; --ink: #e7ece8; --muted: #9aa79e; --line: #2b332d;
    --accent: #62c499; --accent-ink: #06281a; --accent-soft: #1b3328;
    --danger: #ff8a80; --warn: #f2b84b; --warn-bg: #3a2d0c;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
p { margin: 0; }
#app { max-width: 480px; margin: 0 auto; padding: 24px 16px 32px; display: flex; flex-direction: column; gap: 16px; min-height: 100%; }
.center { text-align: center; margin-top: 30vh; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 11px 12px; width: 100%; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 11px 14px; font-weight: 500; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn[disabled] { opacity: .6; cursor: default; }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; }
.status { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 12px; }
.status.ok { background: var(--accent-soft); }
.status.warn { background: var(--warn-bg); color: var(--warn); }
.status b { display: block; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--accent); }
.status.warn .dot { background: var(--warn); }
.rooms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.rooms li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.rooms li span { display: block; font-size: 12px; color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
