/* Sign-in page and admin page. Same tokens as the Site Align app (app/css/app.css). */
:root {
  --paper: #f3f5f4;
  --paper-2: #e7ecea;
  --ink: #1c2a33;
  --ink-2: #4d5d66;
  --rule: #cfd8d6;
  --model: #172430;
  --model-2: #22364a;
  --flag: #e8336d;
  --flag-ink: #b3144b;
  --good: #1f8a5b;
  --warn: #b97a06;
  --bad: #c8312b;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border: 1px solid var(--rule); border-radius: 6px;
  background: #fff; cursor: pointer; font-weight: 500; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--paper-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.primary { background: var(--flag); border-color: var(--flag); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--flag-ink); }
.btn.danger { color: var(--bad); }
.brand { display: flex; align-items: center; gap: 10px; font: 600 20px/1 var(--font-cond); letter-spacing: .01em; }
.brand svg { width: 26px; height: 26px; color: var(--flag); }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); }
.intro {
  position: relative; overflow: hidden; background: var(--model); color: #e9eff2;
  padding: 48px; display: flex; flex-direction: column; gap: 18px;
}
.intro .tag { max-width: 380px; color: #a9bac4; font-size: 15px; margin: 0; position: relative; z-index: 1; }
.intro .brand { position: relative; z-index: 1; }
.intro .grid { position: absolute; inset: auto 0 0 0; width: 100%; height: 62%; color: #2d4559; }
.panel { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; background: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.tabs button {
  border: 0; background: none; padding: 10px 4px; margin-right: 18px; cursor: pointer;
  font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--flag); }
.field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px; }
.field > span { font-size: 13px; color: var(--ink-2); }
.field small { font-size: 12px; color: var(--ink-2); }
.field input { height: 40px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
form .btn.primary { width: 100%; }
.msg { min-height: 20px; margin: 0 0 10px; color: var(--bad); font-size: 13px; }
.hint { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }
.done h2 { font: 600 20px/1.2 var(--font-cond); margin: 0 0 8px; }
.done p { color: var(--ink-2); margin: 0 0 18px; }

@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .intro { padding: 20px 16px; }
  .intro .tag, .intro .grid { display: none; }
  .panel { padding: 24px 16px; justify-content: flex-start; }
}

/* ---------- admin ---------- */
.topbar { height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--model); color: #e9eff2; }
.topbar .brand { font-size: 17px; }
.topbar .brand svg { width: 22px; height: 22px; }
.topbar .spacer { flex: 1; }
.topbar a { color: #e9eff2; text-decoration: none; font-weight: 500; }
.topbar a:hover { text-decoration: underline; }
.page { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.page h1 { font: 600 22px/1.2 var(--font-cond); margin: 0 0 4px; }
.page .sub { color: var(--ink-2); margin: 0 0 20px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--paper-2); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; background: var(--paper); }
tr:last-child td { border-bottom: 0; }
td .email { color: var(--ink-2); font-size: 13px; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn { margin-left: 4px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill.pending { background: #fdf1d8; color: var(--warn); }
.pill.active { background: #ddf2e7; color: var(--good); }
.pill.disabled { background: var(--paper-2); color: var(--ink-2); }
.pill.admin { background: #fde3ec; color: var(--flag-ink); margin-left: 6px; }
.notice { background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--flag); border-radius: 6px; padding: 12px 14px; margin: 0 0 16px; }
.notice code { font-size: 15px; background: var(--paper); padding: 2px 6px; border-radius: 4px; user-select: all; }
