/*
 * TEDIVO brand, shared by every page on vdxviewer.com.
 *
 * Values come from the TEDIVO brand system at s3://tedivo.com/images/logos/brand/,
 * not from the viewer app — the app's old palette (#1c2645 / #e30513) was SMDG's,
 * read straight off SMDG's own logo file, which is why it never looked like a
 * TEDIVO product.
 *
 * Navy #0D3554 and grey #BDC8D1 are shared by every TEDIVO product mark. Each
 * product adds one accent pair; VDX Viewer inherits the Open Vessel Definition
 * pair because VDX succeeds OVD, so the mark carries the colour forward rather
 * than opening a new slot in the family.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/InterVariable.woff2') format('woff2');
}

:root {
  --navy:      #0d3554;
  --navy-deep: #082438;
  --grey:      #bdc8d1;
  --vdx:       #1a8bb0;
  --vdx-lt:    #44aacc;

  --ink:   #eef3f9;
  --ink-2: #b6c4d4;
  --muted: #8298ae;
  --line:  rgba(255,255,255,.14);

  --bad:  #ff6b6b;
  --good: #00c8b4;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy-deep);
  background-image:
    radial-gradient(1100px 640px at 80% -10%, rgba(26,139,176,.26), transparent 62%),
    radial-gradient(760px 520px at 2% 106%, rgba(0,200,180,.10), transparent 60%);
  color: var(--ink);
  font: 16px/1.62 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ── header ───────────────────────────────────────────────────────── */
header.bar {
  display: flex; align-items: center; gap: 14px;
  padding: 22px clamp(20px, 5vw, 60px);
}
/* The full lockup — icon, wordmark and the Precision Matters tagline — the same
   mark the home page carries, so the vendor's identity does not change shape as
   you move through the product. A white knockout, which needs no plate here
   because every one of these pages is navy. 36px is where the tagline is still
   legible; below about 32px it turns to mush. */
header.bar img.wordmark { height: 36px; width: auto; display: block; }
header.bar .rule { width: 1px; height: 22px; background: var(--line); }
header.bar .product { font-size: 15px; font-weight: 600; }
header.bar .product .thin { color: var(--ink-2); font-weight: 400; }
header.bar .spacer { margin-left: auto; }
/* The account links, filled in by nav.js. Without the gap they run together into
   one word — "Request accessSign in". */
header.bar [data-nav] { display: flex; align-items: center; gap: 18px; }

header.bar a.quiet, header.bar button.quiet { color: var(--ink-2); text-decoration: none; font-size: 14px; }
header.bar a.quiet:hover, header.bar button.quiet:hover { color: #fff; }

/* ── card ─────────────────────────────────────────────────────────── */
main.centred {
  flex: 1; display: grid; place-items: center;
  padding: clamp(16px, 4vw, 40px) clamp(20px, 5vw, 60px) 48px;
}
.card {
  width: 100%; max-width: 560px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.03);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.75);
}
.card.wide { max-width: 1000px; }
.card h1 { margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 31px); letter-spacing: -.02em; font-weight: 700; }
.card .sub { margin: 0 0 26px; color: var(--ink-2); font-size: 15px; }

/* ── form ─────────────────────────────────────────────────────────── */
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field.span2 { grid-column: 1 / -1; }
label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
label .req { color: var(--vdx-lt); }
input[type=text], input[type=email], select {
  font: inherit; font-size: 15px; color: var(--ink);
  background: rgba(0,0,0,.25); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--vdx); outline-offset: 1px; border-color: transparent; }
input[aria-invalid="true"] { border-color: var(--bad); }
select option { background: var(--navy); color: var(--ink); }

.check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--vdx); }

button.primary {
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  background: var(--vdx); color: #fff; border: 0; border-radius: 6px; padding: 12px 26px;
}
button.primary:hover:not(:disabled) { filter: brightness(1.1); }
button.primary:disabled { opacity: .5; cursor: not-allowed; }

.err { color: var(--bad); font-size: 13px; margin: 0; }
.note { color: var(--muted); font-size: 13px; }

/* ── footer ───────────────────────────────────────────────────────── */
footer.bar {
  border-top: 1px solid var(--line); padding: 16px clamp(20px, 5vw, 60px);
  font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
}
footer.bar a { color: var(--ink-2); text-decoration: none; }
footer.bar a:hover { color: #fff; }
footer.bar .sep { color: var(--line); }

/* The SMDG mark is #1c2645 navy on transparency and would vanish on this ground,
   so it sits on a light plate — unaltered, which is what a trademark owner expects. */
.smdg { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.smdg img { background: #fff; border-radius: 4px; padding: 3px 7px; vertical-align: middle; }

/* ── registrations table (admin) ──────────────────────────────────── */
/* The table is the widest thing on the site and the one most likely to be read on
   a laptop rather than a desk. It scrolls inside its own box so the page itself
   never scrolls sideways. */
.tablewrap { overflow-x: auto; margin: 0 -4px; }

table.reg { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 780px; }
table.reg th, table.reg td { padding: 10px 12px; text-align: left; vertical-align: middle; }
table.reg thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line);
}
table.reg tbody tr { border-bottom: 1px solid var(--line); }
table.reg tbody tr:hover { background: rgba(255, 255, 255, .03); }

/* Status is the column the eye goes to, so it carries the colour rather than the
   whole row — a tinted row would fight the hover state and the scores beside it. */
.status {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-transform: capitalize;
}
.status.pending  { background: rgba(224, 168, 0, .16); color: #f0c24a; }
.status.approved { background: rgba(46, 160, 106, .16); color: #5bc98e; }
.status.revoked  { background: rgba(255, 71, 87, .14); color: #ff8a93; }

/* Domain kinds and rules. `work` is the unremarkable case and is deliberately
   quiet — the eye should go to the ones that needed a judgement. */
.status.work       { background: rgba(255, 255, 255, .06); color: var(--ink-2); }
.status.personal   { background: rgba(224, 168, 0, .16); color: #f0c24a; }
.status.disposable { background: rgba(255, 71, 87, .14); color: #ff8a93; }
.status.blocked    { background: rgba(255, 71, 87, .14); color: #ff8a93; }
.status.allowed    { background: rgba(46, 160, 106, .16); color: #5bc98e; }

/* A flagged score is the reason to read a row before approving it. */
.flagged { color: #f0c24a; font-weight: 600; }

/* Revoke sits next to Approve and must read as the lesser action without being
   hard to hit: outlined rather than filled, same size and target as its sibling. */
td.actions button.quiet {
  background: none; border: 1px solid var(--line); border-radius: 7px;
  color: var(--ink-2); cursor: pointer; font: inherit;
}
td.actions button.quiet:hover:not(:disabled) { border-color: var(--ink-2); color: #fff; }
td.actions button:disabled { opacity: .5; cursor: not-allowed; }

td.actions { white-space: nowrap; text-align: right; }
td.actions button + button { margin-left: 8px; }

button.small { padding: 5px 12px; font-size: 13px; }

/* A button that has to sit in a bar of links and not look like a button. */
button.linkish {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
}
button.linkish:hover { color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* The second table on the admin page needs air above it, and a heading that reads
   as a peer of the first rather than a subsection of the table above. */
.domh { margin: 40px 0 6px; font-size: 20px; }

/* ── table toolbars ───────────────────────────────────────────────── */
/* Search and filter sit above each table. Both default to the rows that need a
   decision — pending registrations, undecided domains — because that is what the
   page is opened to do; the "All" option is one click away for everything else. */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; align-items: center; }
.toolbar .srch { flex: 1 1 260px; min-width: 0; }
.toolbar input[type="search"],
.toolbar select {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--ground-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 11px;
}
.toolbar select { width: auto; }
.toolbar input[type="search"]:focus, .toolbar select:focus {
  outline: 2px solid var(--vdx); outline-offset: 1px; border-color: transparent;
}
.toolbar input[type="search"]::placeholder { color: var(--muted); }

/* Denied and revoked both mean "no access" and are deliberately the same colour;
   the word is what distinguishes them, because the difference is history, not
   severity. */
.status.denied { background: rgba(255, 71, 87, .14); color: #ff8a93; }
