/* DEVI Capture restricted sign-in. Matches deviops.app's sign-in one for one: same tokens, card,
   fields, white primary button, plain-text alternatives, legal line inside the card, borderless card
   on phones (values from DEVI-App site/auth/devi-login.css). Additions only for what the site page
   doesn't have: the use notice, the authenticator QR, and the case table. */
:root {
  --bg: #0a0a0b;
  --card: #111113;
  --border: #1f1f22;
  --stroke: #66666d;
  --t1: #ffffff;
  --t2: #a1a1a8;
  --t3: #8f8f99;
  --accent: #4b8df8;
  --accent-hover: #70a7ff;
  --ok: #34c87a;
  --danger: #f07178;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--t1);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px 48px;
}
.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
}
.card.wide { max-width: 780px; }
.brand { display: flex; justify-content: center; margin: 0 0 28px; }
.brand img { height: 28px; width: auto; }
h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.2;
  text-align: center;
}
h2 { margin: 24px 0 10px; font-size: 1rem; font-weight: 600; }
.sub { margin: 0 0 28px; color: var(--t2); font-size: 15px; text-align: center; }

/* Fields (the site's .field) */
label { display: block; margin: 0 0 8px; color: var(--t1); font-weight: 600; font-size: 14px; }
input {
  width: 100%;
  min-height: 44px;
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: transparent;
  color: var(--t1);
  font: inherit;
  font-size: 16px;
}
input::placeholder { color: var(--t3); }
input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
input.code { letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

/* Primary button (the site's .primary) */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 4px 0 0;
  padding: 11px 16px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: #0a0a0b;
  font: inherit;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
}
button:hover { background: #e4e4e7; }
button:disabled { opacity: .38; cursor: not-allowed; }

/* Alternatives (the site's .alts buttons): plain text under the primary button */
button.secondary, button.link {
  min-height: 40px;
  margin: 10px 0 0;
  background: transparent;
  color: var(--t2);
  font-size: 14px;
  font-weight: 500;
}
button.secondary:hover, button.link:hover { background: transparent; color: var(--t1); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row button { flex: 1 1 180px; }

/* The use notice (Capture only) */
.notice {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 20px;
  color: var(--t2);
  font-size: 14px;
  line-height: 1.55;
}
.notice strong { color: var(--t1); }

/* Authenticator setup (Capture only) */
.qr { display: flex; justify-content: center; margin: 4px 0 12px; }
.qr img { width: 176px; height: 176px; background: #fff; padding: 8px; border-radius: 6px; image-rendering: pixelated; }
.secret { color: var(--t3); font-size: 13px; word-break: break-all; text-align: center; margin: 0 0 18px; }
.secret code { font-family: ui-monospace, "SF Mono", Consolas, monospace; color: var(--t2); }

.hint, .legal {
  margin: 20px 0 0;
  color: var(--t3);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
}
.status { margin: 14px 0 0; min-height: 1.35em; color: var(--t2); font-size: 14px; text-align: center; }
.status.error, .status.err { color: var(--danger); }
.status.ok { color: var(--ok); }

/* Your cases (Capture only): stacked blocks, no sideways scrolling at any width */
.cases { display: flex; flex-direction: column; gap: 20px; text-align: left; }
.case h3 { margin: 0 0 8px; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.acq { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; }
.acq + .acq { margin-top: 8px; }
.acq-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.when { color: var(--t2); font-size: 13px; font-variant-numeric: tabular-nums; }
.acq-meta { color: var(--t1); font-size: 14px; }
.acq-id { color: var(--t3); font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 18px; }
.tab {
  width: auto; min-height: 40px; margin: 0; padding: 8px 14px; border-radius: 0; background: transparent;
  color: var(--t2); font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent;
}
.tab:hover { background: transparent; color: var(--t1); }
.tab[aria-selected="true"] { color: var(--t1); border-bottom-color: var(--t1); }
.who { font-size: 14px; overflow-wrap: anywhere; }
.select {
  min-height: 40px; padding: 8px 10px; border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--card); color: var(--t1); font: inherit; font-size: 14px;
}
.invite { margin-top: 24px; text-align: left; }
.invite h3 { margin: 0 0 10px; font-size: 15px; }
.invite .select { width: 100%; margin: 0 0 16px; }
.row.tight { align-items: center; gap: 8px; }
.row.tight button { flex: 0 1 auto; width: auto; margin: 0; padding: 8px 10px; }
/* (older table styles kept for other views) */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--t3); font-weight: 500; }
td.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--t2); word-break: break-all; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: #1e4d33; }
.pill.bad { color: var(--danger); border-color: #5a2a2e; }

@media (max-width: 480px) {
  .card { padding: 28px 22px 24px; border: 0; background: transparent; }
  .stage { padding: 8px 12px 36px; align-items: flex-start; }
}
