/* Customer console views: view-specific layout only; colours via semantic tokens (tokens.css). Shared components live in app.css. */

/* ---- Overview: "Service and devices" heading row (freshness sits beside the data it describes) ---- */
.freshrow { align-items: center; margin-bottom: var(--space-3); }
.freshrow .live1 { margin-left: auto; }

/* ---- Overview: service and device summary ---- */
.ovsum { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-4) var(--space-5); align-items: start; margin-bottom: var(--space-4); }
.ovsum .k { display: block; font-size: 12px; font-weight: 500; color: var(--text-tertiary); margin-bottom: 4px; }
.ovsum .s { display: block; margin-top: 6px; font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
.ovsum .v { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.ovsum a.v:hover { text-decoration: underline; }
.ovs-sub, .ovs-links ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.ovs-links ul { flex-direction: column; flex-wrap: nowrap; gap: 4px; margin-top: 0; }
.ovs-sub a { color: var(--text-secondary); font-weight: 500; }
.ovs-sub a.bad { color: var(--status-danger-fg); font-weight: 600; }
.ovs-sub a.warn { color: var(--status-warning-fg); font-weight: 600; }
.ovs-links a { color: var(--link); font-weight: 500; }
@media (max-width: 900px) { .ovsum { grid-template-columns: 1fr; gap: var(--space-3); } .ovs-links ul { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; } }

/* ---- Overview: recent changes ---- */
.a-sum a, .a-sum > span:first-child { font-weight: 500; overflow-wrap: anywhere; }
.a-sum .sub { display: block; margin-top: 2px; }

/* ---- Access rules: configured rules table, rule editor preview ---- */
.rules-t td, .rules-t th { vertical-align: top; }
.rulepreview { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--status-info-border); border-radius: 12px; background: var(--status-info-bg); color: var(--status-info-fg); font-weight: 500; overflow-wrap: anywhere; }
.rulepreview[hidden] { display: none; }

/* ---- Access rules: effective access (flow and matrix views, matrix list for narrow screens) ---- */
.effview[hidden] { display: none !important; }
#effect > .hd { align-items: center; margin-bottom: var(--space-2); }
.mxlist { display: none; list-style: none; margin: 12px 0 0; padding: 0; }
.mxlist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 10px 0; border-top: 1px solid var(--border-subtle); }
.mxlist li:first-child { border-top: 0; }
.mxl-pair { font-weight: 600; color: var(--text); }
.mxl-ports { color: var(--text-secondary); }
.mxlist li.no .mxl-pair { font-weight: 500; color: var(--text-secondary); }
@media (max-width: 700px) {
  .mxwrap { display: none; }
  .mxlist { display: block; }
}

/* ---- Domains and names ---- */
.dnssum .callout { margin-top: var(--space-3); }
.dnsstart { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.dnsstart .card { display: flex; flex-direction: column; gap: 6px; }
.dnsstart .card + .card { margin-top: 0; } /* .card + .card stacks cards; in this grid it pushed cards 2 and 3 down */
.dnsstart .card h3 { margin: 0; font-size: 16px; }
.dnsstart .card h3 .badge { margin-left: var(--space-2); vertical-align: 1px; }
.dnsstart .card p { margin: 0; color: var(--text-secondary); }
.dnsstart .card p:last-child { margin-top: auto; }
.rec .idc { white-space: normal; }
.rec code { overflow-wrap: anywhere; word-break: break-all; }
.choice .when { display: block; margin: 4px 0; font-weight: 600; color: var(--text); }
#f-prereq ul { margin: 6px 0 0; padding-left: 18px; }

/* ---- Device detail ---- */
.lastconn { margin-bottom: var(--space-4); }
.lastconn .hint { margin: 2px 0 var(--space-3); }
.lastconn .fstrip { margin-bottom: 0; }
.timeline .evt { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.timeline .evt .badge { margin-left: 6px; vertical-align: 1px; }
.timeline .evm { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-tertiary); overflow-wrap: anywhere; }
.timeline .evm time { margin-left: 0; }

/* Members and registration keys (critique fixes) */
/* Members page: full page width like Devices, Keys and Rules; the User column takes the spare width. */
.members-t th.c-fit, .members-t td.c-fit { width: 1%; white-space: nowrap; }
.members-t th.c-fit.r { padding-left: var(--space-4, 16px); }
.members-t .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.members-t .who2 { display: block; font-size: 13px; line-height: 1.4; color: var(--text-tertiary); overflow-wrap: anywhere; }
.members-t .you { margin: 0; background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--control-border); }
.members-t .lastnote { display: block; margin: 4px 0 0; white-space: normal; max-width: 22ch; }
.members-t td .when time { color: var(--text-secondary); }
.members-t .when .who2 { margin-top: 2px; }
.members-t .when .badge { margin-left: 6px; }
.members-t .num a { font-weight: 600; }
.members-t .num .zero { color: var(--text-tertiary); }
.members-t tr.selected { --text-tertiary: var(--text-secondary); }
/* The kebab is the row's only visible action: 32 x 32 hit area, dots in the tertiary text colour (>= 4.5:1 on every row background). */
.members-t .kebab { min-width: 32px; min-height: 32px; height: 32px; color: var(--text-secondary); }
/* Checkboxes of this table draw their own box so the border is the control-border token (>= 3:1 in both themes) */
.members-t input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; width: 18px; height: 18px; margin: 0; vertical-align: middle; border: 1.5px solid var(--control-border); border-radius: 4px; background: var(--control-bg); cursor: pointer; }
.members-t input[type=checkbox]:checked, .members-t input[type=checkbox]:indeterminate { background: var(--action-primary-bg); border-color: var(--action-primary-bg); }
.members-t input[type=checkbox]:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 4px; height: 9px; border: solid var(--action-primary-fg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.members-t input[type=checkbox]:indeterminate::after { content: ""; position: absolute; left: 3px; top: 7px; width: 8px; height: 0; border-top: 2px solid var(--action-primary-fg); }
.members-t input[type=checkbox]:disabled { cursor: not-allowed; background: var(--surface-sunken); border-color: var(--border-strong); }
.members-t input[type=checkbox]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.members-t .mi .why { display: block; font-size: 12px; font-weight: 400; color: var(--text-tertiary); margin-top: 2px; white-space: normal; }
.members-t .menupop .mi[aria-disabled="true"] { display: block; }
.callout.measure, .hint.measure { max-width: 70ch; }
.kname { overflow-wrap: anywhere; }
.keysteps > li { margin-bottom: 14px; }
.snip { display: flex; gap: 8px; align-items: flex-start; max-width: 70ch; margin: 6px 0; }
.snip pre { flex: 1 1 auto; min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; }
.snip .btn { flex: none; }
.keyfilter { margin: 12px 0; }
@media (max-width: 700px) { .snip { flex-direction: column; align-items: stretch; } }
