:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card2: #273449;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; font-size: 17px; line-height: 1.45;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; }
header.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.brand span { color: var(--accent); }
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; margin-bottom: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
h1 { font-size: 26px; margin: 6px 0 12px; }
h2 { font-size: 20px; margin: 4px 0 10px; }
.btn {
  display: block; width: 100%; border: 0; border-radius: var(--radius);
  padding: 18px 16px; font-size: 20px; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #06283a; margin-top: 12px;
  min-height: 60px;
}
.btn:active { transform: scale(.98); }
.btn.green { background: var(--green); color: #052e22; }
.btn.red { background: var(--red); color: #3b0a0a; }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn:disabled { opacity: .5; }
.namebtn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; text-align: left; background: var(--card2); color: var(--text);
  border: 0; border-radius: var(--radius); padding: 18px 16px; margin-bottom: 10px;
  font-size: 19px; font-weight: 600; cursor: pointer; min-height: 64px;
}
.namebtn:active { transform: scale(.98); }
.namebtn .tag { font-size: 13px; color: var(--muted); font-weight: 400; }
.namebtn .pill {
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: #0f172a; color: var(--accent); white-space: nowrap; margin-left: 10px;
}
.namebtn .pill.out { color: var(--amber); }
.big-status { text-align: center; padding: 28px 10px; }
.big-status .icon { font-size: 72px; line-height: 1; }
.big-status .t { font-size: 30px; font-weight: 800; margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=date], select {
  width: 100%; padding: 16px; font-size: 18px; border-radius: 12px;
  border: 1px solid #334155; background: #0f172a; color: var(--text); margin-top: 8px;
}
label { font-weight: 600; display: block; margin-top: 14px; }
.err {
  background: #3b1212; border: 1px solid var(--red); color: #fecaca;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
}
.notice {
  background: #12283b; border: 1px solid var(--accent); color: #bae6fd;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
}
.flag { border-left: 4px solid var(--amber); padding: 12px 14px; background: var(--card2); border-radius: 0 12px 12px 0; margin-bottom: 10px; }
.flag.bad { border-color: var(--red); }
.flag .rsn { font-weight: 700; }
table.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
table.hours th, table.hours td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #334155; }
table.hours th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.tab {
  flex: 1; white-space: nowrap; padding: 14px 10px; border-radius: 12px; border: 0;
  background: var(--card2); color: var(--muted); font-size: 16px; font-weight: 700; cursor: pointer;
}
.tab.active { background: var(--accent); color: #06283a; }
.loc-card h2 { display: flex; justify-content: space-between; align-items: center; }
.count { background: var(--green); color: #052e22; border-radius: 999px; padding: 4px 14px; font-size: 16px; font-weight: 800; }
.who { padding: 8px 0; border-top: 1px solid #334155; display: flex; justify-content: space-between; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.qrbox { text-align: center; }
.qrbox img { max-width: 220px; border-radius: 12px; background: #fff; padding: 8px; }
code.url { word-break: break-all; background: #0f172a; padding: 8px 10px; border-radius: 8px; display: block; margin-top: 8px; font-size: 13px; }
.hidden { display: none !important; }
.spin { text-align: center; padding: 40px; color: var(--muted); }
