
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --accent: #4f46e5;
  --danger: #b42318;
  --control: #cbd5e1;
  --radius: 12px;
  --radius-control: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 14px; line-height: 1.55; display: flex; flex-direction: column;
}
body.centered { justify-content: center; align-items: center; padding: 24px 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand { color: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.gate { width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 6px; }
.gate .brand { margin-bottom: 14px; }
h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin: 0 0 14px; color: var(--muted); }
label { display: block; font-size: 13px; font-weight: 500; margin: 0 0 6px; }
input {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 15px; font-family: inherit; color: inherit; background: var(--surface); min-height: 44px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.code { letter-spacing: 8px; text-align: center; font-size: 22px; font-family: ui-monospace, Menlo, monospace; }
.cf-turnstile { margin-top: 14px; }
button, .secondary { font-family: inherit; cursor: pointer; min-height: 44px; }
.primary {
  width: 100%; margin-top: 16px; padding: 9px 18px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 500;
}
.secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: var(--surface);
  color: var(--ink); font-size: 13px; font-weight: 500;
}
.secondary:hover { text-decoration: none; border-color: var(--muted); }
.err { margin: 10px 0 0; font-size: 13px; color: var(--danger); }
.alt { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.top {
  display: flex; align-items: center; gap: 14px; padding: 0 20px; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.top .brand { flex: 1; }
.who { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout { margin: 0; }
.wrap {
  flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 22px 20px 32px;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start;
}
.card-head { padding: 18px 20px 6px; }
.card-head h1 { font-size: 20px; }
.card-head .sub { margin-bottom: 0; }
.rows { list-style: none; margin: 8px 0 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
}
.row-main { flex: 1; min-width: 0; }
.title { margin: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.meta { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.open { flex: 0 0 auto; }
.open {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 9px 14px; border: 1px solid #cbd5e1; border-radius: 8px; color: var(--ink);
  font-size: 13px; font-weight: 500;
}
.open:hover { text-decoration: none; border-color: var(--muted); }
.empty { margin: 8px 20px 4px; padding: 26px 0; text-align: center; color: var(--muted); border-top: 1px solid #f1f5f9; }
.absence {
  margin: 8px 20px 18px; padding: 10px 12px; border-radius: 8px;
  background: #f8fafc; color: var(--muted); font-size: 13px;
}
.try { padding: 18px; display: flex; flex-direction: column; gap: 10px; border-color: #c7d2fe;
  background: linear-gradient(#ffffff, #fbfbff); }
.try .secondary { align-self: flex-start; }
.try-lede { margin: 0; font-weight: 600; font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.badge strong { color: var(--accent); }
.foot {
  border-top: 1px solid var(--line); padding: 12px 20px; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 8px 16px; align-items: center; font-size: 12px; color: var(--muted);
}
body.centered .foot { border-top: 0; margin-top: 18px; max-width: 420px; text-align: center; }
.foot-note { max-width: 520px; }
.foot-note a { color: inherit; }
@media (max-width: 640px) {
  .wrap { grid-template-columns: 1fr; padding: 14px 12px 24px; }
  .top { padding: 0 12px; }
  .who { display: none; }
  .row { flex-direction: column; align-items: stretch; gap: 10px; }
  .open { width: 100%; }
}
