/* Copernix admin. Same tokens as copernix.ca (website/css/style.css):
   dark steel-graphite panels, blue for actions, cyan for signal/labels,
   red only for errors. */
:root {
  color-scheme: dark;
  --bg: #0B1016;
  --bg-2: #0F151D;
  --panel: #121A23;
  --panel-2: #19232E;
  --line: #222D3A;
  --line-2: #35424F;
  --text: #E9EDF2;
  --text-2: #C6CFDA;
  --muted: #A9B4C1;
  --faint: #7C8897;
  --accent: #2A66D6;
  --accent-hover: #2358BF;
  --accent-text: #8AB4FF;
  --signal: #64D2FF;
  --bad: #F2796B;
  --ok: #7FD19E;
  --body: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.6; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); }
a:hover { color: #B8D0FF; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(10, 14, 19, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid #1E2733; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.wordmark { font-weight: 600; font-size: 19px; letter-spacing: 0.3em; }
.brand-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--signal); border: 1px solid var(--line-2); padding: 3px 8px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
@media (max-width: 560px) {
  .wordmark { display: none; }
  .brand-tag { display: none; }
}

/* Language switch, same look as the public site */
.lang-switch { display: flex; flex-shrink: 0; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 13px; letter-spacing: 1px; }
.lang-switch button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 42px; padding: 0 10px; background: transparent; border: 0; color: var(--text-2); font: inherit; letter-spacing: inherit; cursor: pointer; }
.lang-switch button:hover { color: #FFFFFF; background: var(--panel-2); }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); cursor: default; }

/* Type */
.eyebrow { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 1.8px; text-transform: uppercase; color: var(--signal); }
.display { font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; font-size: clamp(1.75rem, 3vw, 2.4rem); text-wrap: balance; }
.lead { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--muted); max-width: 40em; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 4px; font-weight: 600; font-size: 16px; font-family: var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn--primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); font-weight: 500; }
.btn--ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn--block { width: 100%; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.input { min-height: 48px; width: 100%; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); padding: 10px 14px; font-size: 16px; font-family: inherit; border-radius: 0; }
.input:focus { outline: none; border-color: var(--signal); }
.input::placeholder { color: var(--faint); }
.form-status { font-size: 15px; color: var(--text-2); border-left: 3px solid var(--signal); padding-left: 12px; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--bad); border-left-color: var(--bad); }
.form-status.is-ok { color: var(--ok); border-left-color: var(--ok); }
.hint { font-size: 13px; color: var(--faint); }

/* Auth pages: login, forgot, set password */
.auth { flex: 1; display: grid; place-items: center; padding: 48px var(--gutter); }
.auth-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); padding: clamp(24px, 5vw, 40px); display: flex; flex-direction: column; gap: 22px; }
.auth-card .display { font-size: clamp(1.6rem, 3vw, 2rem); }
.auth-card form { display: flex; flex-direction: column; gap: 18px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; }

/* Dashboard */
.page { flex: 1; padding-block: clamp(36px, 6vw, 72px); }
.page-head { margin-bottom: 32px; }
.search { display: flex; gap: 12px; max-width: 720px; }
.search .input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .search { flex-direction: column; } }
.results { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.results-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); background: var(--bg-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel-2); }
td.mono { font-size: 14px; color: var(--text-2); }
td .empty { color: var(--faint); }

/* QR modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 12, 0.82); display: grid; place-items: center; padding: 16px; }
.modal-card { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--text-2); }
.qr-box { background: #FFFFFF; padding: 16px; display: grid; place-items: center; }
.qr-box img { width: 100%; max-width: 280px; aspect-ratio: 1; }

/* Footer */
.site-footer { border-top: 1px solid #1E2733; padding-block: 20px; font-size: 13px; color: var(--faint); }
