/* Sertifika Portal design system. Plain CSS, no framework. */

:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-muted: #f3f6fb;
    --border: #e3e8f0;
    --text: #1d2939;
    --text-muted: #667085;
    --primary: #3b6fe0;
    --primary-hover: #2f5cc4;
    --primary-soft: #edf3ff;
    --accent: #6366f1;
    --appbar-bg: rgba(255, 255, 255, 0.92);

    --critical: #c0362c;
    --critical-bg: #fdecea;
    --high: #c4501a;
    --high-bg: #fff0e6;
    --medium: #a16207;
    --medium-bg: #fff7e0;
    --low: #52607a;
    --low-bg: #f1f4f9;
    --info: #667085;
    --info-bg: #f4f6fa;
    --ok: #18794e;
    --ok-bg: #e7f6ee;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 6px rgba(16, 24, 40, 0.05);
    --shadow-pop: 0 10px 30px rgba(30, 41, 59, 0.14);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1:focus { outline: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.5rem; font-weight: 650; }
h2 { font-size: 1.05rem; font-weight: 600; }
small, .muted { color: var(--text-muted); }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.85em; word-break: break-all; }

/* ---------- App shell: top bar with grouped menus ---------- */

.shell { min-height: 100vh; display: flex; flex-direction: column; }

.appbar {
    position: sticky; top: 0; z-index: 20;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem;
    padding: 0.55rem 1.5rem;
    background: var(--appbar-bg);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex; align-items: center; gap: 0.6rem;
    color: var(--text); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em;
    text-decoration: none; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.logo { display: block; flex-shrink: 0; }

.topnav { display: flex; justify-content: center; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.nav-item {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border: 0; background: none; font: inherit; cursor: pointer;
    border-radius: 999px;
    color: var(--text-muted); font-weight: 550; font-size: 0.93rem;
    text-decoration: none; white-space: nowrap;
}
.nav-item:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.nav-item.active, .nav-group:has(.active) > .nav-trigger { background: var(--primary-soft); color: var(--primary); }

.nav-group { position: relative; }
.nav-menu {
    position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    min-width: 260px; padding: 0.4rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
    display: none; flex-direction: column; gap: 2px;
}
.nav-menu.align-end { left: auto; right: 0; transform: none; }
/* Hover bridge so the menu does not close while the pointer crosses the gap. */
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-group:hover > .nav-menu, .nav-group:focus-within > .nav-menu { display: flex; }

.nav-menu-item {
    display: flex; align-items: flex-start; gap: 0.65rem; width: 100%;
    padding: 0.55rem 0.65rem; border-radius: var(--radius-sm);
    color: var(--text); font: inherit; font-weight: 550; font-size: 0.92rem; text-align: left;
    background: none; border: 0; cursor: pointer; text-decoration: none;
}
.nav-menu-item svg { margin-top: 2px; color: var(--primary); flex-shrink: 0; }
.nav-menu-item span { display: flex; flex-direction: column; }
.nav-menu-item small { font-weight: 400; font-size: 0.8rem; color: var(--text-muted); }
.nav-menu-item:hover, .nav-menu-item.active { background: var(--primary-soft); text-decoration: none; }
.menu-form { margin: 0; }

.appbar-end { display: flex; align-items: center; gap: 0.6rem; justify-content: flex-end; }
.tenant-pill {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.85rem; padding: 0.25rem 0.35rem 0.25rem 0.75rem;
    background: var(--surface-muted); border: 1px solid var(--border); border-radius: 999px;
}
.tenant-pill .org { color: var(--text-muted); }
.tenant-pill .tenant { font-weight: 600; }
.icon-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.5rem; border-radius: 999px; color: var(--text-muted); font-size: 0.82rem; font-weight: 600;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }

.user-trigger {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.2rem 0.55rem 0.2rem 0.2rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text);
}
.user-trigger:hover { border-color: #c7d4ee; background: var(--primary-soft); }
.avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: #fff;
    background: linear-gradient(135deg, #38bdf8, var(--accent));
}
.user-name { font-size: 0.85rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { padding: 1.75rem 1.5rem; max-width: 1280px; width: 100%; margin: 0 auto; min-width: 0; }

@media (max-width: 1100px) {
    .appbar { grid-template-columns: auto 1fr; }
    .topnav { grid-column: 1 / -1; order: 3; justify-content: flex-start; }
    .user-name { display: none; }
    .topnav .nav-menu { left: 0; transform: none; }
}

.page-header {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-header p { margin: 0.25rem 0 0; color: var(--text-muted); }

/* ---------- Cards, grids ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.card-header p { margin: 0.2rem 0 0; color: var(--text-muted); font-size: 0.9rem; }
.card.flush { padding: 0; }
.card.flush .card-header { padding: 1.1rem 1.25rem 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 1.25rem; }

.kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
    display: flex; flex-direction: column; gap: 0.25rem;
    color: inherit;
}
a.kpi:hover { text-decoration: none; border-color: var(--primary); }
.kpi .label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.kpi .value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.kpi .hint { font-size: 0.8rem; color: var(--text-muted); }
.kpi.critical .value { color: var(--critical); }
.kpi.warning .value { color: var(--medium); }
.kpi.ok .value { color: var(--ok); }

dl.props { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 0.45rem 1.25rem; margin: 0; }
dl.props dt { color: var(--text-muted); font-size: 0.88rem; }
dl.props dd { margin: 0; word-break: break-word; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th {
    text-align: left; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--text-muted); background: var(--surface-muted);
    padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafbfd; }
table.data .primary-cell a { font-weight: 600; color: var(--text); }
table.data .primary-cell a:hover { color: var(--primary); }
table.data .sub { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }
table.data .nowrap { white-space: nowrap; }
table.data .primary-cell { min-width: 180px; overflow-wrap: anywhere; }
.card.flush table.data { margin-top: 0.75rem; }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem; font-weight: 600; white-space: nowrap;
    background: var(--info-bg); color: var(--info);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.critical { background: var(--critical-bg); color: var(--critical); }
.badge.high { background: var(--high-bg); color: var(--high); }
.badge.medium { background: var(--medium-bg); color: var(--medium); }
.badge.low { background: var(--low-bg); color: var(--low); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.neutral { background: var(--surface-muted); color: var(--text-muted); }

/* ---------- Forms, buttons ---------- */

.btn, button {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    font: inherit; font-size: 0.9rem; font-weight: 600;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
    cursor: pointer; text-decoration: none;
}
.btn:hover, button:hover { background: var(--surface-muted); text-decoration: none; }
.btn-primary, button.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover, button.btn-primary:hover { background: var(--primary-hover); }
.btn-sm, button.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.82rem; }
.btn-link { border: none; background: none; color: var(--primary); padding: 0; font-weight: 500; }
.btn-link:hover { background: none; text-decoration: underline; }

label { font-weight: 500; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
    font: inherit; font-size: 0.92rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.form-row .field { margin-bottom: 0; }
form.inline { display: inline; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.toolbar input[type=search] { min-width: 260px; flex: 1; max-width: 420px; }
.check { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; font-size: 0.9rem; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.segmented a {
    padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
}
.segmented a:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.segmented a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.segmented a .n { margin-left: 0.3rem; opacity: 0.8; }

/* ---------- Alerts, empty states ---------- */

.alert { padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.92rem; border: 1px solid; }
.alert.error { background: var(--critical-bg); border-color: #f7c1bd; color: var(--critical); }
.alert.success { background: var(--ok-bg); border-color: #b7e3c3; color: var(--ok); }
.alert.warning { background: var(--medium-bg); border-color: #f2d58c; color: var(--medium); }
.error { color: var(--critical); }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty h3 { color: var(--text); margin-bottom: 0.4rem; }
.steps { list-style: none; padding: 0; margin: 1rem auto 0; max-width: 520px; text-align: left; counter-reset: step; }
.steps li { counter-increment: step; display: flex; gap: 0.75rem; align-items: baseline; padding: 0.4rem 0; }
.steps li::before {
    content: counter(step); flex-shrink: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%;
    display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 0.85rem;
}

.token-box { padding: 1rem; margin-bottom: 1rem; background: var(--medium-bg); border: 1px solid #f2d58c; border-radius: var(--radius-sm); }
.token-box pre { white-space: pre-wrap; word-break: break-all; background: var(--surface); padding: 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 0.25rem 0; }

/* ---------- Auth pages ---------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, #e0f2fe 0%, transparent 45%), radial-gradient(circle at 85% 90%, #e0e7ff 0%, transparent 45%), var(--bg); }
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--surface); border-radius: 14px; padding: 2rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}
.auth-card .brand { color: var(--text); padding: 0 0 1.25rem; font-size: 1.15rem; }
.auth-card h1 { margin-bottom: 0.4rem; }
.auth-card p.lead { margin: 0 0 1.5rem; color: var(--text-muted); }
.auth-card input[type=email], .auth-card input[type=password] { width: 100%; }
.auth-card .btn-primary { width: 100%; padding: 0.65rem; }
.auth-footer { margin-top: 1.25rem; text-align: center; font-size: 0.85rem; }

.tenant-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.tenant-list button {
    width: 100%; justify-content: space-between; text-align: left;
    padding: 0.85rem 1rem; font-weight: 500;
}
.tenant-list button:hover { border-color: var(--primary); background: var(--primary-soft); }
.tenant-list .org { display: block; font-size: 0.8rem; color: var(--text-muted); }
.tenant-list .name { display: block; font-weight: 600; }

/* ---------- Blazor ---------- */

#blazor-error-ui {
    background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .appbar { position: static; padding: 0.6rem 1rem; }
    .tenant-pill .org { display: none; }
    .content { padding: 1rem; }
    dl.props { grid-template-columns: 1fr; }
}

/* Certificate renewal panel */
.renewal-links { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0 1rem; }
.renew-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: 1rem; }
.renew-steps form { margin-top: 0.5rem; }
.renew-steps textarea { width: 100%; font-size: 0.8rem; margin-top: 0.5rem; }
.subcard { border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; margin: 0.75rem 0; }
.subcard h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.subcard details { margin-top: 0.5rem; }
.subcard summary { cursor: pointer; font-weight: 500; }
.inline-details { display: inline-block; vertical-align: top; }
.inline-details summary { list-style: none; display: inline-block; }
.inline-details[open] form { margin-top: 0.4rem; }
.card.narrow { max-width: 520px; }
.card.narrow input[type=password] { width: 100%; }

/* Help */
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.help-body { min-width: 0; }
.help-toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; }
.help-section h2 { margin-bottom: 0.6rem; }
.faq { border-top: 1px solid var(--border); padding: 0.6rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 0.5rem 0 0; color: var(--text); }
pre.code { margin: 0.5rem 0 0; padding: 0.7rem 0.85rem; background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm); overflow-x: auto; font-size: 0.82rem; white-space: pre; }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; } }

/* Tools */
.tool-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.tool-card { margin-bottom: 0; display: flex; flex-direction: column; }
.tool-card form { margin-top: auto; }
.tool-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tool-card input[type=file], .tool-card input[type=password] { width: 100%; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.checks li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); background: var(--surface-muted); }
.check-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; color: #fff; }
.check-ok .check-icon { background: var(--ok); }
.check-info .check-icon { background: var(--info); }
.check-warning .check-icon { background: var(--medium); }
.check-error .check-icon { background: var(--critical); }
.check-error { background: var(--critical-bg) !important; }
.check-warning { background: var(--medium-bg) !important; }
.report-error { border-left: 4px solid var(--critical); }
.report-warning { border-left: 4px solid var(--medium); }
.report-ok, .report-info { border-left: 4px solid var(--ok); }
ol.chain { margin: 0.4rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; font-size: 0.9rem; }
.card h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }

/* Dashboard charts (dataviz reference palette: categorical slots 1–2, status roles) */
:root { --series-1: #2a78d6; --series-2: #eb6834; }
.dash-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.25rem; }
.dash-grid .card { margin-bottom: 0; }
.dash-wide { grid-column: span 2; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-wide { grid-column: auto; } }
.viz { margin: 0; }
.viz svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-legend { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.viz-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }
.viz-grid { stroke: var(--border); stroke-width: 1; }
.viz-baseline { stroke: #c9d1dc; stroke-width: 1; }
.viz-axis { font-size: 10.5px; fill: var(--text-muted); }
.viz-axis-strong { font-weight: 600; fill: var(--critical); }
.viz-value { font-size: 11px; font-weight: 600; fill: var(--text); }
.viz-label { font-size: 12px; fill: var(--text); }
.viz-label:hover { fill: var(--primary); text-decoration: underline; }
.viz-track { fill: var(--surface-muted); }
.viz-hit:hover rect[fill]:not([fill="transparent"]), .viz-hit:hover path { filter: brightness(1.08); }
.viz-table { margin-top: 0.5rem; font-size: 0.85rem; }
.viz-table summary { cursor: pointer; color: var(--text-muted); }
.health-hero .grade { display: flex; align-items: baseline; gap: 0.9rem; margin: 0.4rem 0 0.6rem; }
.grade-letter { font-size: 3.6rem; font-weight: 800; line-height: 1; }
.grade-score { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.grade-score small { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.grade-a .grade-letter, .grade-b .grade-letter { color: #0a7f0a; }
.grade-c .grade-letter { color: #a16207; }
.grade-d .grade-letter { color: #c4501a; }
.grade-f .grade-letter { color: #c0362c; }
.grade-dist { list-style: none; display: flex; gap: 0.8rem; padding: 0; margin: 0.6rem 0 0; font-size: 0.9rem; }
.grade-chip { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 0.8rem; color: #fff; }
.grade-chip.grade-a, .grade-chip.grade-b { background: #0ca30c; }
.grade-chip.grade-c { background: #c98500; }
.grade-chip.grade-d { background: #ec835a; }
.grade-chip.grade-f { background: #d03b3b; }
.hbars { display: grid; gap: 0.5rem; }
.hbar { display: grid; grid-template-columns: minmax(70px, 34%) 1fr auto; align-items: center; gap: 0.6rem; font-size: 0.88rem; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
a.hbar-label:hover { color: var(--primary); }
.hbar-track { height: 14px; border-radius: 4px; background: var(--surface-muted); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 4px; }
.hbar-value { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }
.checks-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem 0.8rem; margin: 0.6rem 0; display: grid; gap: 0.3rem; }
.checks-group legend { font-size: 0.85rem; color: var(--text-muted); padding: 0 0.3rem; }
.ok-text { color: var(--ok); font-weight: 500; }
.warn-text { color: var(--high); }
.raw-whois { max-height: 420px; overflow: auto; white-space: pre-wrap; font-size: 0.8rem; background: var(--surface-2, #f6f7f9); padding: 0.75rem; border-radius: var(--radius-sm); }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.segmented a { padding: 0.4rem 0.8rem; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.segmented a.active { background: var(--accent-bg, #e8f0fe); color: var(--accent, #2a5bd7); font-weight: 600; }
.cipher-summary { display: flex; gap: 1.25rem; flex-wrap: wrap; padding: 0.75rem 1rem; }
.cipher-ok, .cipher-warn, .cipher-bad { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 500; }
.cipher-ok { color: var(--ok); }
.cipher-warn { color: var(--high); }
.cipher-bad { color: var(--critical); }
.cipher-actions { padding: 0 1rem 0.75rem; align-items: center; }
tr.row-muted td { opacity: 0.7; }
.cipher-heading { font-size: 0.95rem; margin: 0.5rem 1rem; }
.protocol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; padding: 0 1rem 0.75rem; }
.protocol-card { display: flex; flex-direction: column; gap: 0.25rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.7rem; cursor: pointer; }
.protocol-card.risky { border-color: var(--critical); background: color-mix(in srgb, var(--critical) 6%, transparent); }
.protocol-card.off { opacity: 0.75; }
.protocol-name { font-weight: 600; }
.terminal { background: #0f172a; color: #e2e8f0; font-size: 0.8rem; min-height: 260px; max-height: 420px; overflow: auto; padding: 0.75rem; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; }
.terminal-input { width: 100%; margin: 0.5rem 0; }
pre.commands { background: var(--surface-2, #f6f7f9); padding: 0.6rem; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; font-size: 0.8rem; }
.device-grid { align-items: start; }
.license-banner { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; }
.license-banner.soon { background: var(--medium-bg); color: var(--medium); }
.license-banner.lapsed { background: color-mix(in srgb, var(--critical) 10%, transparent); color: var(--critical); font-weight: 500; }
.license-banner a { margin-left: auto; font-weight: 600; }

/* Audit log */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
table.data td.audit-details code { white-space: pre-wrap; word-break: break-all; font-size: 12px; }
.mono-wrap { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; word-break: break-all; }

/* Two-step verification */
.qr svg { width: 200px; height: 200px; display: block; margin: 12px 0; background: #fff; padding: 8px; border-radius: 8px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-size: 15px; margin: 12px 0; }
ol.mfa-steps { padding-left: 20px; display: grid; gap: 14px; }
ol.mfa-steps .qr svg { margin-top: 8px; }

/* Single sign-on on the sign-in page */
.sso { display: grid; gap: 10px; margin-top: 18px; }
.sso-divider { display: flex; align-items: center; gap: 10px; color: var(--muted, #64748b); font-size: 13px; }
.sso-divider::before, .sso-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.sso-button { justify-content: center; width: 100%; text-align: center; }
pre.test-result { background: var(--surface-2, #f1f5f9); padding: 12px; border-radius: 8px; white-space: pre-wrap; margin-top: 12px; }
