@font-face {
    font-family: "InterVariable";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/InterVariable.woff2?v=4.1") format("woff2");
}

:root {
    color-scheme: light;
    --bg: #e9edf2;
    --surface: rgba(255, 255, 255, 0.58);
    --surface-solid: #fff;
    --surface-elevated: rgba(255, 255, 255, 0.42);
    --surface-hover: rgba(255, 255, 255, 0.74);
    --surface-active: rgba(0, 0, 0, 0.08);
    --ink: #111;
    --muted: #414141;
    --muted-light: #686868;
    --line: rgba(17, 17, 17, 0.14);
    --line-strong: rgba(17, 17, 17, 0.28);
    --control-border: rgba(17, 17, 17, 0.28);
    --brand: #111;
    --brand-dark: #000;
    --brand-text: #111;
    --brand-soft: rgba(0, 0, 0, 0.08);
    --success: #0e9f6e;
    --success-text: #087654;
    --success-soft: #e7f7f0;
    --warning: #ad7b00;
    --warning-text: #805b00;
    --warning-soft: #fff7df;
    --danger: #df1b41;
    --danger-text: #a30b27;
    --danger-soft: #fff0f3;
    --info: #292929;
    --info-soft: rgba(17, 17, 17, 0.08);
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-small: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 28px 70px rgba(0, 0, 0, 0.16), 0 4px 14px rgba(0, 0, 0, 0.07);
    --glass-blur: blur(24px) saturate(125%);
    --focus-ring: 0 0 0 3px rgba(0, 0, 0, 0.18);
    --radius: 0;
    --radius-small: 0;
    --content-max: 1380px;
    --gutter: clamp(14px, 2vw, 24px);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    position: relative;
    isolation: isolate;
    color: var(--ink);
    background: var(--bg);
    font-family: "InterVariable", Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    font-synthesis: none;
    line-height: 1.45;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ambient-bg {
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 17, 17, 0.045) 1px, transparent 1px),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(210, 216, 223, 0.56));
    background-size: 32px 32px, 32px 32px, 100% 100%;
    pointer-events: none;
}

.ambient-bg::after {
    content: none;
}

.view-guest {
    overflow-x: hidden;
}

.view-guest .ambient-bg::after {
    opacity: 0.55;
}

.page,
.site-footer {
    position: relative;
    z-index: 1;
}

a {
    color: var(--brand-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-dark);
}

button,
input,
select,
textarea {
    font: inherit;
}

code,
pre,
.mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-feature-settings: normal;
    font-variant-ligatures: none;
    letter-spacing: 0;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 9px 12px;
    color: #fff;
    background: var(--ink);
    border-radius: 0;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

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

.shell {
    width: 100%;
    max-width: calc(var(--content-max) + (var(--gutter) * 2));
    margin: 0 auto;
    padding-right: var(--gutter);
    padding-left: var(--gutter);
}

.view-admin .shell {
    max-width: none;
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-top: 3px solid var(--brand);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 28px rgba(0, 0, 0, 0.06);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    position: relative;
    padding-left: 13px;
    white-space: nowrap;
}

.brand:hover {
    color: var(--ink);
}

.brand::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 3px;
    background: var(--brand);
}

.brand strong {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.main-nav {
    min-width: 0;
    padding: 3px;
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.36);
    border-radius: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    min-height: 34px;
    padding: 7px 13px;
    color: var(--muted);
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.66);
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.account-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-name {
    max-width: 150px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-form {
    display: inline;
    margin: 0;
}

.page {
    min-height: calc(100vh - 132px);
    padding-top: 20px;
    padding-bottom: 32px;
}

.page-heading {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.page-heading h1,
.panel h1,
.panel h2,
.panel h3 {
    margin-top: 0;
}

.page-heading h1 {
    margin-bottom: 4px;
    color: var(--ink);
    font-size: clamp(21px, 1.8vw, 24px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.8px;
}

.page-heading p,
.panel-intro,
.muted {
    color: var(--muted);
}

.page-heading p {
    max-width: 680px;
    margin: 0;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--brand-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel {
    position: relative;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.76);
    outline: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.card {
    position: relative;
    margin-bottom: 12px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.76);
    outline: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.panel + .panel {
    margin-top: 12px;
}

.panel-header {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.card-heading {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.card-heading h2 {
    margin: 0;
}

.panel-header h2,
.panel-header h3 {
    margin: 0 0 4px;
}

.panel h1 {
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.panel-header h2,
.card-heading h2,
.compact-heading h2,
.odm-device-card h2 {
    font-size: 15px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.panel-header h3,
.panel > h3,
.card > h3 {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
}

.panel-header p {
    margin: 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 12px;
}

.grid-main {
    grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.75fr);
}

.metrics {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.metric-grid {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.metric {
    min-height: 92px;
    padding: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.76);
    outline: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.panel::before,
.card::before,
.metric::before,
.site-header::before,
.metric::after {
    content: none;
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.metric-value {
    margin-top: 6px;
    display: block;
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.metric-meta {
    margin-top: 4px;
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.metric > span:first-child {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.metric > strong {
    margin-top: 6px;
    display: block;
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.metric > small {
    margin-top: 4px;
    display: block;
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.field {
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    margin-bottom: 4px;
    display: block;
    font-size: 12px;
    font-weight: 600;
}

.form-grid > label {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.field small {
    margin-top: 4px;
    display: block;
    color: var(--muted);
    font-size: 12px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    color: var(--ink);
    border: 1px solid var(--control-border);
    outline: 0;
    background: rgba(255, 255, 255, 0.48);
    border-radius: var(--radius-small);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), var(--shadow-small);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
    min-height: 104px;
    resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(17, 17, 17, 0.38);
    background: rgba(255, 255, 255, 0.68);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--focus-ring);
}

input::placeholder,
textarea::placeholder {
    color: #687585;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 1000px #f5f7f9 inset, var(--focus-ring);
}

.form-actions,
.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.result-download-header {
    align-items: center;
}

.result-download-header > div {
    min-width: 0;
}

.certificate-download-actions {
    justify-content: flex-end;
}

.form-actions {
    margin-top: 14px;
}

.form-action {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.button {
    min-height: 40px;
    padding: 9px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    border: 1px solid var(--brand);
    background: var(--brand);
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.button:not(:disabled):hover {
    color: #fff;
    border-color: var(--brand-dark);
    background: var(--brand-dark);
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26);
}

.button:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.18);
    outline-offset: 2px;
}

.button:not(:disabled):active {
    transform: translateY(1px);
}

.button-secondary {
    color: var(--ink);
    border-color: var(--control-border);
    background: rgba(255, 255, 255, 0.44);
    box-shadow: var(--shadow-small);
}

.button.secondary {
    color: var(--ink);
    border-color: var(--control-border);
    background: rgba(255, 255, 255, 0.44);
    box-shadow: var(--shadow-small);
}

.button.primary {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.button.small {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
}

.button.danger {
    color: var(--danger-text);
    border-color: rgba(223, 27, 65, 0.28);
    background: rgba(255, 255, 255, 0.44);
}

.button.warning {
    color: var(--warning-text);
    border-color: rgba(173, 123, 0, 0.28);
    background: rgba(255, 255, 255, 0.44);
}

.button-secondary:not(:disabled):hover,
.button.secondary:not(:disabled):hover {
    color: var(--ink);
    border-color: rgba(17, 17, 17, 0.38);
    background: rgba(255, 255, 255, 0.78);
    filter: none;
    box-shadow: var(--shadow-small);
}

.button.danger:not(:disabled):hover {
    color: var(--danger-text);
    border-color: rgba(223, 27, 65, 0.38);
    background: var(--danger-soft);
    filter: none;
    box-shadow: 0 2px 12px rgba(223, 27, 65, 0.12);
}

.button.warning:not(:disabled):hover {
    color: var(--warning-text);
    border-color: rgba(173, 123, 0, 0.38);
    background: var(--warning-soft);
    filter: none;
    box-shadow: 0 2px 12px rgba(173, 123, 0, 0.12);
}

.button-quiet {
    color: var(--muted);
    border-color: var(--control-border);
    background: rgba(255, 255, 255, 0.44);
    box-shadow: none;
}

.button-quiet:not(:disabled):hover {
    color: var(--ink);
    border-color: var(--control-border);
    background: rgba(255, 255, 255, 0.78);
    filter: none;
    box-shadow: none;
}

.button-small {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
}

.flash,
.notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid;
    border-left-width: 3px;
    border-radius: 0;
    font-weight: 500;
}

.flash-success,
.notice-success {
    color: #087654;
    border-color: rgba(14, 159, 110, 0.28);
    background: rgba(231, 247, 240, 0.88);
}

.flash-error,
.notice-error {
    color: #a30b27;
    border-color: rgba(223, 27, 65, 0.28);
    background: rgba(255, 240, 243, 0.9);
}

.flash-warning,
.notice-warning {
    color: #805b00;
    border-color: rgba(173, 123, 0, 0.28);
    background: rgba(255, 247, 223, 0.9);
}

.flash-info,
.notice-info {
    color: var(--info);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.68);
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid;
    border-left-width: 3px;
    border-radius: 0;
    font-weight: 500;
}

.alert-error {
    color: #a30b27;
    border-color: rgba(223, 27, 65, 0.28);
    background: rgba(255, 240, 243, 0.9);
}

.alert-success {
    color: #087654;
    border-color: rgba(14, 159, 110, 0.28);
    background: rgba(231, 247, 240, 0.88);
}

.alert-warning {
    color: #805b00;
    border-color: rgba(173, 123, 0, 0.28);
    background: rgba(255, 247, 223, 0.9);
}

.alert-info {
    color: var(--info);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.68);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.34);
    border-radius: 0;
    box-shadow: var(--shadow-small);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.history-table .history-cpuid-column,
.history-table .history-cpuid-cell {
    width: 24ch;
}

.history-table .history-cpuid-cell {
    max-width: 24ch;
    white-space: normal;
}

.history-table .history-cpuid-value {
    display: block;
    max-width: 24ch;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-height: 1.4;
}

@media (min-width: 921px) {
    .history-table {
        table-layout: fixed;
    }

    .history-table th,
    .history-table td {
        white-space: normal;
    }

    .history-table td {
        overflow-wrap: anywhere;
    }
}

.certificate-table {
    min-width: 1500px;
}

.certificate-table th,
.certificate-table td {
    white-space: normal;
}

.certificate-table .certificate-reference {
    min-width: 300px;
}

.certificate-table .certificate-identifiers {
    min-width: 430px;
}

.certificate-table .certificate-version {
    min-width: 190px;
}

.certificate-table code {
    overflow-wrap: anywhere;
    word-break: break-all;
    font-size: 11.5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 12px;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

th {
    color: var(--muted);
    border-bottom-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover td {
    color: var(--ink);
    background: rgba(0, 0, 0, 0.035);
}

.status {
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
}

.status-success {
    color: var(--success-text);
    border-color: rgba(14, 159, 110, 0.16);
    background: var(--success-soft);
}

.status-error {
    color: var(--danger-text);
    border-color: rgba(223, 27, 65, 0.16);
    background: var(--danger-soft);
}

.status-warning {
    color: var(--warning-text);
    border-color: rgba(173, 123, 0, 0.18);
    background: var(--warning-soft);
}

.status-unknown {
    color: var(--info);
    border-color: var(--line);
    background: var(--info-soft);
}

.status-info {
    color: var(--info);
    border-color: var(--line);
    background: var(--info-soft);
}

.status-neutral {
    color: var(--muted);
    border-color: var(--line);
    background: var(--surface-active);
}

.price-list,
.detail-list {
    margin: 0;
}

.price-row,
.detail-row {
    padding: 8px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}

.price-row:last-child,
.detail-row:last-child {
    border-bottom: 0;
}

.price-row dt,
.detail-row dt {
    color: var(--muted);
}

.price-row dd,
.detail-row dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.result-box {
    max-height: 520px;
    margin: 0;
    padding: 14px;
    overflow: auto;
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, 0.88);
    border-radius: 0;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-all;
}

.login-layout {
    min-height: calc(100vh - 190px);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.7fr);
    align-items: center;
    gap: clamp(30px, 7vw, 90px);
}

.login-layout-single {
    grid-template-columns: minmax(0, 360px);
    justify-content: center;
    gap: 0;
}

.login-panel {
    padding: 38px 34px;
    border-color: rgba(255, 255, 255, 0.76);
    background: var(--surface);
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), var(--shadow-elevated);
}

.login-panel h1 {
    margin-bottom: 6px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.18;
}

.login-panel h2 {
    margin-bottom: 5px;
}

.login-panel .field {
    margin-top: 12px;
}

.login-panel .button {
    width: 100%;
}

.view-guest .site-header,
.view-guest .site-footer {
    display: none;
}

.view-guest .page {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.view-guest .page::before {
    content: "";
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--brand);
}

.view-guest .login-layout {
    width: 100%;
    min-height: 0;
}

.view-guest .login-layout-single {
    grid-template-columns: minmax(0, 360px);
}

.view-guest .login-panel {
    width: 100%;
}

.view-guest .login-panel .eyebrow {
    display: none;
}

.view-guest .login-panel h1 {
    margin-bottom: 5px;
    text-align: center;
}

.view-guest .login-panel .panel-intro {
    margin: 0 0 22px;
    text-align: center;
}

.view-guest .login-panel .field label {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.view-guest .login-panel input {
    min-height: 40px;
    padding: 9px 12px;
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.48);
    border-radius: 0;
    font-size: 13px;
}

.view-guest .login-panel input:focus {
    background: rgba(255, 255, 255, 0.84);
}

.view-guest .login-panel .form-actions {
    margin-top: 8px;
}

.view-guest .login-panel .button {
    min-height: 0;
    padding: 10px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.view-guest .page > .flash {
    position: relative;
    z-index: 2;
    width: min(360px, calc(100vw - 48px));
    margin: 0;
}

.filter-bar {
    margin-bottom: 12px;
    padding: 10px;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.36);
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), var(--shadow-small);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.filter-bar .field {
    min-width: 170px;
    flex: 1;
}

.filter-bar .field label {
    margin-bottom: 4px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    align-items: end;
    gap: 8px;
}

.certificate-filter-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.filter-grid > label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.tabs {
    margin-bottom: 12px;
    padding: 3px;
    display: inline-flex;
    gap: 2px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.36);
    border-radius: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.tabs a {
    padding: 6px 10px;
    color: var(--muted);
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
}

.tabs a.active,
.tabs a[aria-current="page"] {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.detail-grid {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.details {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
    gap: 0 14px;
}

.details dt,
.details dd {
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.details dt {
    color: var(--muted);
}

.details dd {
    text-align: right;
    overflow-wrap: anywhere;
}

.danger-zone {
    border-color: rgba(223, 27, 65, 0.2);
    background: rgba(223, 27, 65, 0.055);
}

.result-block {
    max-height: 520px;
    margin: 0;
    padding: 14px;
    overflow: auto;
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, 0.88);
    border-radius: 0;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-all;
}

.break-all {
    word-break: break-all;
}

.pagination {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pagination-links {
    display: flex;
    gap: 8px;
}

.empty-state {
    padding: 28px 16px;
    color: var(--muted);
    text-align: center;
}

.empty {
    padding: 24px 14px;
    color: var(--muted);
    text-align: center;
}

.compact-form {
    min-width: 210px;
    margin: 0 0 9px;
    display: grid;
    gap: 7px;
}

.compact-form:last-child {
    margin-bottom: 0;
}

.compact-form input,
.compact-form select {
    min-height: 34px;
    padding: 7px 10px;
}

.pricing-table {
    min-width: 860px;
}

.pricing-inline-form {
    min-width: 250px;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.pricing-inline-form input {
    min-height: 32px;
    padding: 6px 9px;
}

.security-status-line {
    margin: 0 0 9px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.security-status-line small {
    color: var(--muted);
}

input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--brand);
}

.check-field,
.form-grid > .check-field {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
}

.check-field span {
    min-width: 0;
}

.prominent-check {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    border-radius: 0;
}

.odm-search-panel {
    margin-bottom: 12px;
}

.odm-user-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.odm-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.odm-search-form + p {
    margin: 14px 0 0;
}

.odm-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.odm-device-card h2 {
    margin: 14px 0 10px;
}

.odm-device-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}

.odm-facts {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.odm-facts div {
    min-width: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.odm-facts dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.odm-facts dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.chip-list {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip-list span {
    padding: 4px 8px;
    color: var(--brand-dark);
    border: 1px solid var(--line);
    background: var(--brand-soft);
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
}

.compact-heading {
    margin-top: 20px;
    margin-bottom: 12px;
}

.compact-heading h2 {
    margin: 0;
}

.metric-code {
    font-size: clamp(14px, 1.8vw, 18px) !important;
    overflow-wrap: anywhere;
}

.odm-editor .form-grid {
    margin-bottom: 18px;
}

.odm-flags {
    margin: 0;
    padding: 17px;
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    border-radius: 0;
}

.odm-flags legend {
    padding: 0 7px;
    font-size: 13px;
    font-weight: 600;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px 14px;
}

.error-state {
    max-width: 660px;
    margin: 60px auto;
    text-align: center;
}

.error-state .actions {
    margin-top: 22px;
    justify-content: center;
}

.security-note {
    margin-top: 14px;
    padding: 11px;
    color: var(--muted);
    border-left: 3px solid var(--brand);
    background: var(--brand-soft);
    border-radius: 0;
    font-size: 12px;
}

.secondary-login-action,
.secondary-security-action {
    margin-top: 8px;
}

.secondary-login-action .button {
    width: 100%;
}

.two-factor-panel {
    margin-top: 12px;
}

.two-factor-panel > p {
    max-width: 760px;
}

.security-inline-form {
    max-width: 520px;
    margin-top: 14px;
}

.two-factor-setup,
.two-factor-management {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.two-factor-setup > div,
.security-action-card {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.42);
    border-radius: 0;
}

.two-factor-setup h3,
.security-action-card h3,
.recovery-code-display h3 {
    margin: 0 0 5px;
}

.two-factor-setup p,
.security-action-card p,
.recovery-code-display p {
    margin: 0 0 12px;
    color: var(--muted);
}

.setup-key {
    width: 100%;
    padding: 11px 12px;
    display: block;
    overflow-wrap: anywhere;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.62);
    border-radius: 0;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.08em;
}

.two-factor-summary {
    max-width: 560px;
    margin-top: 12px;
}

.security-action-card .field + .field {
    margin-top: 10px;
}

.security-action-danger {
    border-color: rgba(223, 27, 65, 0.28);
    background: rgba(255, 240, 243, 0.9);
}

.recovery-code-display {
    margin-top: 8px;
}

.recovery-code-grid {
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    list-style: none;
}

.recovery-code-grid li {
    min-width: 0;
}

.recovery-code-grid code {
    padding: 7px 9px;
    display: block;
    overflow-wrap: anywhere;
    color: var(--ink);
    border: 1px solid rgba(161, 98, 7, 0.22);
    background: rgba(255, 255, 255, 0.62);
    border-radius: 0;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.installer-page {
    max-width: 980px;
}

.installer-page > form > .panel + .panel,
.installer-requirements + form > .panel:first-child {
    margin-top: 22px;
}

.installer-unlock {
    min-height: calc(100vh - 250px);
}

.installer-success {
    max-width: 720px;
    margin: 60px auto;
}

.installer-success h1 {
    margin-bottom: 12px;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.requirement-item {
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    border-radius: 0;
    font-size: 12px;
}

.requirement-item > span {
    margin-right: 6px;
    font-weight: 700;
}

.requirement-ok > span {
    color: var(--success);
}

.requirement-bad > span {
    color: var(--danger);
}

.installer-prices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.check-field input:disabled + span {
    color: var(--muted);
}

.site-footer {
    color: var(--muted);
    border-top: 0;
    background: transparent;
    font-size: 12px;
}

.footer-inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner code {
    color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
    .panel:not(.login-panel):hover,
    .card:hover {
        border-color: var(--line-strong);
        background: var(--surface-hover);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 16px 40px rgba(0, 0, 0, 0.1);
    }

    .metric:hover {
        border-color: var(--line-strong);
        background: var(--surface-hover);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 16px 40px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 1120px) {
    .header-inner {
        padding-top: 8px;
        padding-bottom: 8px;
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }

    .account-nav {
        margin-left: auto;
    }

}

@media (max-width: 920px) {

    .grid-main,
    .login-layout,
    .detail-grid,
    .odm-result-grid,
    .two-factor-setup,
    .two-factor-management {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkbox-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .requirements-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-layout {
        min-height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
        align-items: start;
    }

}

@media (max-width: 620px) {
    .requirements-grid,
    .installer-prices {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    :root {
        --gutter: 14px;
    }

    .site-header {
        top: 0;
    }

    .page {
        padding-top: 16px;
        padding-bottom: 28px;
    }

    .view-guest .page {
        padding: 18px;
    }

    input,
    select,
    textarea {
        min-height: 44px;
    }

    .button {
        min-height: 40px;
    }

    .view-guest .login-panel input {
        min-height: 44px;
    }

    .view-guest .login-panel .button {
        min-height: 40px;
    }

    .account-name {
        display: none;
    }

    .main-nav a {
        padding: 6px 9px;
        font-size: 12px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .result-download-header {
        align-items: stretch;
        flex-direction: column;
    }

    .certificate-download-actions {
        justify-content: flex-start;
    }

    .metrics,
    .metric-grid,
    .form-grid,
    .filter-grid,
    .odm-search-form,
    .odm-facts,
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .recovery-code-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .panel,
    .card,
    .login-panel {
        padding: 14px;
        border-radius: 0;
    }

    .view-guest .login-panel {
        padding: 24px 18px;
        border-radius: 0;
    }

    .metric {
        min-height: 88px;
    }

    .footer-inner,
    .pagination {
        padding: 14px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    th,
    td {
        padding: 8px;
    }
}

@media (max-width: 400px) {
    .header-inner {
        gap: 8px 12px;
    }

    .account-nav {
        gap: 6px;
    }

    .login-panel {
        padding: 22px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media (forced-colors: active) {
    .site-header,
    .panel,
    .card,
    .metric,
    .table-wrap,
    input,
    select,
    textarea,
    .button {
        border: 1px solid CanvasText;
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid Highlight;
        outline-offset: 2px;
    }
}
