/* Shared design tokens + components for the AVERIFY admin/auth pages
   (signup.html, accept-invite.html, admin.html). Mirrors index.html's look
   without touching that file. */

:root {
  --bg: #0a0e12;
  --panel: #11161c;
  --panel-2: #161d25;
  --line: #1f2933;
  --line-bright: #2b3744;
  --ink: #d8e0e8;
  --ink-dim: #7d8b99;
  --ink-faint: #4a5663;
  --phos: #38e08b;
  --phos-dim: #1d7a4c;
  --amber: #f5b945;
  --cyan: #46c8ff;
  --red: #ff5d5d;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Sora', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  background-image:
    linear-gradient(rgba(56,224,139,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,224,139,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

a { color: var(--phos); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  border-bottom: 1px solid var(--line);
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(17,22,28,0.9), rgba(10,14,18,0.6));
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 30px; height: 30px; border: 1.5px solid var(--phos);
  border-radius: 4px; position: relative; flex-shrink: 0;
  box-shadow: 0 0 14px rgba(56,224,139,0.25), inset 0 0 10px rgba(56,224,139,0.08);
}
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; background: var(--phos); }
.brand-mark::before { width: 12px; height: 1.5px; top: 13.5px; left: 3.5px; box-shadow: 0 0 6px var(--phos); }
.brand-mark::after { width: 5px; height: 5px; border-radius: 50%; top: 11.5px; left: 17px; box-shadow: 0 0 8px var(--phos); }
.brand h1 { font-size: 15px; font-weight: 800; letter-spacing: 0.12em; }
.brand h1 span { color: var(--phos); }
.brand .sub { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); letter-spacing: 0.16em; text-transform: uppercase; }
.hdr-actions { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); }

main { max-width: 1000px; margin: 0 auto; padding: 32px 24px 80px; }
main.narrow { max-width: 420px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 20px; overflow: hidden;
}
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); display: flex; align-items: center; justify-content: space-between;
}
.panel-head .idx { color: var(--phos); }
.panel-body { padding: 20px 18px; }

label.fld {
  display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); margin: 14px 0 6px;
}
label.fld:first-child { margin-top: 0; }
input, select {
  width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: 13px;
  color: var(--ink); background: #070b0e; border: 1px solid var(--line-bright);
  border-radius: 6px; padding: 10px 12px; outline: none;
}
input:focus, select:focus { border-color: var(--phos-dim); box-shadow: 0 0 0 3px rgba(56,224,139,0.08); }
.hint { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 8px; line-height: 1.6; }

.btn {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  padding: 10px 18px; border-radius: 6px; border: 1px solid var(--phos-dim); cursor: pointer;
  background: rgba(56,224,139,0.08); color: var(--phos); transition: all .15s;
}
.btn:hover:not(:disabled) { background: rgba(56,224,139,0.16); box-shadow: 0 0 16px rgba(56,224,139,0.15); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { border-color: var(--line-bright); color: var(--ink-dim); background: transparent; }
.btn.ghost:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-dim); box-shadow: none; }
.btn.danger { border-color: var(--red); color: var(--red); background: transparent; }
.btn.danger:hover:not(:disabled) { background: rgba(255,93,93,0.1); }
.btn.small { padding: 6px 12px; font-size: 10.5px; }

.err { font-family: var(--mono); font-size: 11.5px; color: var(--red); margin-top: 14px; min-height: 14px; }
.ok-msg { font-family: var(--mono); font-size: 11.5px; color: var(--phos); margin-top: 14px; min-height: 14px; }

table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
th {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
  color: var(--ink-faint); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.role-pill {
  display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 10px;
  letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid var(--line-bright); color: var(--ink-dim);
}
.role-pill.owner { color: var(--phos); border-color: var(--phos-dim); background: rgba(56,224,139,0.06); }
.role-pill.admin { color: var(--cyan); border-color: rgba(70,200,255,0.35); background: rgba(70,200,255,0.06); }
.muted { color: var(--ink-faint); }
.empty-row td { color: var(--ink-faint); font-style: italic; text-align: center; padding: 20px; }

.toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 999;
  background: #0c1116; border: 1px solid var(--line-bright); border-radius: 8px;
  padding: 12px 16px; font-family: var(--mono); font-size: 12px; color: var(--ink);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5); display: none; max-width: 360px;
}
.toast.show { display: block; }
.toast.err { border-color: var(--red); color: var(--red); }
.toast.ok { border-color: var(--phos-dim); color: var(--phos); }

code.tok {
  font-family: var(--mono); font-size: 11.5px; background: #060a0d; border: 1px solid var(--line);
  border-radius: 5px; padding: 8px 10px; display: block; word-break: break-all; color: var(--phos);
  margin-top: 8px;
}
.hidden { display: none !important; }

.confirm-overlay {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center;
  background: rgba(5,8,11,0.92); backdrop-filter: blur(4px);
}
.confirm-overlay.show { display: flex; }
.confirm-card {
  width: 360px; background: #0c1116; border: 1px solid var(--line-bright);
  border-radius: 10px; padding: 24px 24px 20px; font-family: var(--mono);
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.confirm-title { font-size: 14px; color: var(--ink); font-weight: 600; margin: 0 0 10px; }
.confirm-body { font-size: 12px; color: var(--ink-dim); line-height: 1.6; margin-bottom: 22px; word-break: break-word; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-btn {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  padding: 9px 16px; border-radius: 6px; cursor: pointer; border: 1px solid var(--line-bright);
  background: transparent; color: var(--ink-dim); transition: all .12s;
}
.confirm-btn:hover { color: var(--ink); border-color: var(--ink-dim); }
.confirm-btn.danger { background: var(--red); border-color: var(--red); color: #1a0505; }
.confirm-btn.danger:hover { filter: brightness(1.1); }
