@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --ink: #142420;
  --forest: #0F2A24;
  --forest-2: #18382F;
  --paper: #F3F5F0;
  --white: #FFFFFF;
  --line: #DDE3DC;
  --muted: #46564F;
  --soft: #C9D6CF;
  --lime: #C8F25A;
  --ok: #1C7A4A;
  --ok-bg: #E3F4E9;
  --bad: #B3261E;
  --bad-bg: #FBE7E5;
  --wait: #8A5A00;
  --wait-bg: #FFF2D6;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.55; }
a { color: var(--forest); font-weight: 700; }
a:hover { color: #1F5446; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.bar { background: var(--forest); color: var(--paper); padding: 16px; }
.bar .inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.brand:hover { color: var(--paper); }
.chip { width: 30px; height: 20px; border-radius: 5px; background: var(--lime); display: inline-block; }
.bar .who { color: var(--soft); font-size: 0.95rem; display: flex; gap: 12px; align-items: center; }
.bar .who button { background: transparent; color: var(--paper); border: 1.5px solid #5E8077; min-height: 40px; padding: 6px 14px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.wide { max-width: 1100px; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.panel h2 { font-size: 1.3rem; }

label { font-weight: 700; display: block; margin-bottom: 4px; }
input, select, textarea { font: inherit; width: 100%; min-height: 48px; padding: 11px 13px; border-radius: 12px; border: 1.5px solid #B9C4BD; background: var(--white); color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #5A9BD5; outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 2px; flex: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > * { flex: 1 1 180px; min-width: 0; }

button, .btn { font: inherit; font-weight: 700; min-height: 48px; padding: 12px 22px; border-radius: 999px; border: none; background: var(--forest); color: var(--paper); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { color: var(--paper); background: #1F5446; }
button:hover { background: #1F5446; }
button:disabled { opacity: 0.55; cursor: wait; }
button.ghost { background: transparent; color: var(--forest); border: 1.5px solid #9DB0A7; }
button.danger { background: var(--bad); }
button.small { min-height: 40px; padding: 6px 14px; font-size: 0.9rem; }

.msg { border-radius: 12px; padding: 12px 14px; font-weight: 500; }
.msg:empty { display: none; }
.msg.ok, .res.ok { background: var(--ok-bg); color: #145A36; }
.msg.bad, .res.bad { background: var(--bad-bg); color: #8E1F18; }

/* ---------- verify page ---------- */
.verify .bar { text-align: center; }
.status { border-radius: 24px; padding: 28px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.status h1 { font-size: 2.6rem; font-weight: 800; margin: 8px 0 6px; }
.status p { margin: 0; font-size: 1.1rem; }
.status .holder { font-family: var(--display); font-weight: 800; font-size: 1.8rem; }
.status .note { font-size: 0.98rem; margin-top: 10px; max-width: 30rem; }
.status .checked { font-size: 0.85rem; opacity: 0.8; margin-top: 8px; }
.badge { width: 72px; height: 72px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--white); }
.status.ok { background: var(--ok-bg); color: #0F3F27; } .status.ok .badge { background: var(--ok); }
.status.bad { background: var(--bad-bg); color: #5E140F; } .status.bad .badge { background: var(--bad); }
.status.wait { background: var(--wait-bg); color: #4D3200; } .status.wait .badge { background: var(--wait); }
.status.gray { background: #E6EBE5; color: #2B3934; } .status.gray .badge { background: #5A6A63; }
#ci, #lk { display: flex; gap: 10px; }
#ci input, #lk input { font-size: 1.4rem; letter-spacing: 0.2em; text-align: center; flex: 1; min-width: 0; }
.rlist { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.rhead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.res { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 1.05rem; }
.res strong { font-size: 1.2rem; }
.foot { font-size: 0.85rem; color: var(--muted); text-align: center; }

/* ---------- admin ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { background: var(--white); color: var(--forest); border: 1.5px solid var(--line); }
.tabs button[aria-selected="true"] { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat {background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.9rem; }
.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: #F8FAF7; }
tr:last-child td { border-bottom: none; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; font-weight: 700; background: #E6EBE5; }
.pill.active { background: var(--ok-bg); color: #145A36; }
.pill.void { background: var(--bad-bg); color: #8E1F18; }
.pill.inactive { background: var(--wait-bg); color: #6B4500; }
.bars { display: flex; flex-direction: column; gap: 6px; }
.barrow { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) 3rem; gap: 10px; align-items: center; font-size: 0.92rem; }
.barrow .track { background: #E6EBE5; border-radius: 6px; height: 14px; }
.barrow .fill { background: var(--forest); border-radius: 6px; height: 14px; min-width: 2px; }
.barrow .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; font-weight: 700; letter-spacing: 0.15em; background: var(--wait-bg); padding: 4px 10px; border-radius: 8px; }
[hidden] { display: none !important; }
