/* Forms and portal bits layered on style.css (shared with the marketing sites). */
form.stack { display: grid; gap: 0.7rem; max-width: 30rem; margin: 0.75rem 0; }
form.inline { display: inline; margin: 0; }
form.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin: 0.75rem 0; }
label { display: grid; gap: 0.25rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; font-size: 0.92rem; padding: 0.5rem 0.65rem; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--text); min-width: 12rem;
}
/* One height for every single-line control, so a row of them lines up (Safari draws a
   native select shorter than a text box, ignoring padding). The select's
   arrow is a data: SVG, which the CSP's img-src data: allows. */
input[type=text], input[type=email], input[type=password], input[type=number], select {
  height: 2.5rem; line-height: 1.2; margin: 0;
}
input.day { min-width: 0; width: 8.5rem; font-variant-numeric: tabular-nums; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2356686b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 12px 8px;
}
form.row .btn { height: 2.5rem; display: inline-flex; align-items: center; }
form.row label.check { height: 2.5rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pink-300); outline-offset: 1px; }
textarea { min-height: 5rem; width: 100%; font-family: var(--mono); font-size: 0.8rem; }
button.btn { border: none; cursor: pointer; font: inherit; font-weight: 700; }
button.btn.small, .btn.small { padding: 0.3rem 0.8rem; font-size: 0.8rem; box-shadow: none; }
button.btn.danger { background: var(--bad); }
.flash { padding: 0.65rem 1rem; border-radius: 6px; margin: 0.75rem 0; font-size: 0.9rem; }
.flash.ok { background: var(--good-bg); color: var(--good); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.secret { font-family: var(--mono); background: var(--plum-900); color: #fff; padding: 0.9rem 1rem;
  border-radius: 8px; word-break: break-all; font-size: 0.9rem; user-select: all; }
.status { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 99px; font-size: 0.75rem; font-weight: 700; }
.status.active, .status.valid, .status.approved { background: var(--good-bg); color: var(--good); }
.status.pending { background: var(--warn-bg); color: var(--warn); }
.status.expired, .status.suspended { background: var(--warn-bg); color: var(--warn); }
.status.revoked, .status.closed, .status.declined { background: var(--bad-bg); color: var(--bad); }
div.row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; align-items: flex-end; }
div.row > form.row { margin: 0.5rem 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; }
.crumbs { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.nowrap { white-space: nowrap; }
pre.cmd { background: var(--plum-900); color: #fff; padding: 0.8rem 1rem; border-radius: 8px; overflow-x: auto;
  font-size: 0.82rem; }

/* Tables fill the column and size their columns to the content. On narrow screens a wide
   table scrolls inside itself instead of widening the page. */
@media (max-width: 900px) { main table { display: block; max-width: 100%; overflow-x: auto; } }
/* A list box (features): its own height, no drop-down arrow. */
select[multiple] { height: auto; min-height: 5.2rem; background-image: none; padding-right: 0.65rem; }
label[hidden] { display: none; }
/* A date field with its calendar button (static/console.js). */
.day-wrap { display: inline-flex; align-items: stretch; position: relative; }
.day-wrap input.day { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.day-pick { border: 1px solid var(--border); border-left: none; background: var(--surface); cursor: pointer;
  padding: 0 0.55rem; border-radius: 0 6px 6px 0; color: var(--text-muted); display: inline-flex; align-items: center; }
.day-pick:hover { color: var(--text); }
.day-pick svg { width: 16px; height: 16px; }
.day-native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
/* The ghost button sits on the dark header in the portal nav. */
.site-header .btn.ghost, .site-header button.btn.ghost { color: #fff; border-color: rgba(255,255,255,0.55); background: transparent; }
.site-header .btn.ghost:hover { background: rgba(255,255,255,0.12); }
.site-header nav form { margin: 0; }

td code, th code { white-space: nowrap; }
label.check { display: flex; align-items: center; gap: 0.35rem; }

/* Two-factor login (phase 3a) */
.qr-box { background: #fff; padding: 0.5rem; display: inline-block; justify-self: start; width: max-content; border-radius: 8px; border: 1px solid var(--border); }
.qr-box svg.qr { width: 14rem; height: 14rem; display: block; }
ol.codes { columns: 2; max-width: 26rem; font-size: 1rem; }
ol.codes code { font-family: var(--mono); letter-spacing: 0.04em; }
