:root {
    color-scheme: light;
    --green-950: #082f20;
    --green-900: #0b3b28;
    --green-800: #105137;
    --green-700: #176b47;
    --green-600: #1c7b50;
    --green-100: #e9f4ed;
    --green-50: #f3f8f4;
    --ink: #19241e;
    --muted: #68766e;
    --line: #dce4de;
    --line-strong: #cbd7cf;
    --surface: #fff;
    --background: #f4f6f3;
    --warning: #9a661f;
    --warning-soft: #fbf3e2;
    --danger: #a33a3a;
    --danger-soft: #fcecec;
    --shadow: 0 12px 36px rgba(21, 55, 38, .06);
    font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--background); }
a { color: var(--green-700); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button-link { transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
button:active, .button-link:active { transform: translateY(1px); }
img { display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 38px); line-height: 1.14; letter-spacing: -.025em; }
h2 { margin-bottom: 0; font-size: 20px; letter-spacing: -.01em; }
h3 { margin-bottom: 8px; font-size: 16px; }
small, .muted { color: var(--muted); }
.muted { line-height: 1.55; }
.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;
}

/* Application shell */
.admin-app { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar {
    position: sticky; top: 0; height: 100vh; z-index: 10;
    display: flex; flex-direction: column; padding: 24px 18px;
    color: rgba(255, 255, 255, .82); background: var(--green-950);
}
.admin-brand {
    display: flex; align-items: center; gap: 12px; padding: 4px 8px 24px;
    color: #fff;
}
.admin-brand__mark, .mobile-admin-bar__brand, .login-story__mark {
    display: grid; width: 38px; height: 38px; place-items: center;
    flex: 0 0 auto; border-radius: 11px; overflow: hidden; background: #fff;
    object-fit: cover;
}
.mobile-admin-bar__brand img { width: 100%; height: 100%; object-fit: cover; }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand strong { font-size: 16px; }
.admin-brand small { margin-top: 2px; color: rgba(255, 255, 255, .58); font-size: 11px; }
.admin-nav { display: grid; gap: 5px; }
.admin-nav a {
    display: flex; align-items: center; gap: 12px; min-height: 46px;
    padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .68);
    font-size: 14px; font-weight: 650;
}
.admin-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.admin-nav a.is-active { color: #fff; background: rgba(255, 255, 255, .12); }
.admin-nav img, .sidebar-logout img {
    width: 18px; height: 18px; filter: brightness(0) invert(1); opacity: .74;
}
.admin-nav a.is-active img { opacity: 1; }
.admin-sidebar__footer { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.admin-sidebar__footer p { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: rgba(255, 255, 255, .56); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #78c995; box-shadow: 0 0 0 3px rgba(120, 201, 149, .12); }
.sidebar-logout {
    display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px;
    padding: 8px 0; border: 0; color: rgba(255, 255, 255, .68);
    background: transparent; font-size: 13px; cursor: pointer;
}
.admin-main { min-width: 0; }
.admin-content { width: min(1440px, 100%); margin: 0 auto; padding: 38px 40px 72px; }
.admin-content.narrow, .narrow-content { width: min(900px, 100%); }
.mobile-admin-bar { display: none; }

.page-title-row, .heading-row, .section-heading-row, .panel-heading {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.page-title-row { align-items: flex-end; margin-bottom: 26px; }
.page-title-row p:last-child { margin-bottom: 0; }
.page-kicker, .panel-eyebrow {
    margin-bottom: 7px; color: var(--green-700); font-size: 10px;
    font-weight: 850; letter-spacing: .14em;
}
.panel-eyebrow { margin-bottom: 5px; color: #789184; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; font-size: 13px; font-weight: 700; }
.back-link img { width: 15px; height: 15px; }

/* Surfaces, controls and status */
.panel {
    margin: 0; padding: 22px; border: 1px solid var(--line);
    border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 18px; }
.panel-heading { margin-bottom: 18px; }
.panel-heading > a { font-size: 13px; font-weight: 750; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid { display: grid; gap: 15px; }
.form-grid label, .rom-field, .search label {
    display: grid; gap: 7px; min-width: 0; color: #3e4c44; font-size: 13px; font-weight: 700;
}
.form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-columns label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
input, select, textarea {
    width: 100%; min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--line-strong); border-radius: 9px;
    outline: none; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(28, 123, 80, .11);
}
button, .button-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 9px 16px; border: 1px solid var(--green-700);
    border-radius: 9px; color: #fff; background: var(--green-700);
    font-weight: 750; cursor: pointer;
}
button:hover, .button-link:hover { background: var(--green-800); }
.button-link img { width: 15px; height: 15px; filter: brightness(0) invert(1); }
.quiet { color: var(--green-700); background: transparent; }
.quiet-link { color: var(--green-700); border-color: transparent; background: var(--green-100); }
.danger-button { border-color: var(--danger); background: var(--danger); }
.danger-button:hover { background: #8b3030; }
.form-submit { justify-self: start; min-width: 230px; }
.badge {
    display: inline-flex; width: max-content; align-items: center; justify-content: center;
    min-height: 26px; padding: 4px 9px; border-radius: 999px;
    color: #536159; background: #eef1ef; font-size: 11px; font-weight: 850;
}
.badge.ok { color: #0d6743; background: #e4f3e9; }
.badge.warning { color: var(--warning); background: var(--warning-soft); }
.badge.danger, .error { color: #923434; background: var(--danger-soft); }
.badge--large { min-height: 32px; padding: 6px 12px; }
.error { padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.compact-empty { margin: 0; padding: 16px 0; text-align: center; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 18px; align-items: start; }
.dashboard-side { display: grid; gap: 18px; }
.trust-panel { padding-bottom: 14px; }
.trust-chain { display: grid; }
.trust-step {
    display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 18px;
    align-items: center; gap: 12px; min-height: 74px; padding: 10px 4px;
    border-top: 1px solid #edf1ee; color: inherit;
}
.trust-step:first-child { border-top: 0; }
.trust-step:hover .trust-step__copy strong { color: var(--green-700); }
.trust-step__icon {
    display: grid; width: 32px; height: 32px; place-items: center;
    border-radius: 10px; background: var(--green-100);
}
.trust-step.is-warning .trust-step__icon { background: var(--warning-soft); }
.trust-step__icon img { width: 17px; height: 17px; }
.trust-step.is-ok .trust-step__icon img { filter: invert(34%) sepia(22%) saturate(1489%) hue-rotate(100deg); }
.trust-step.is-warning .trust-step__icon img { filter: invert(45%) sepia(39%) saturate(1003%) hue-rotate(356deg); }
.trust-step__copy strong, .trust-step__copy small { display: block; }
.trust-step__copy strong { margin-bottom: 4px; font-size: 15px; }
.trust-step__copy small { font-size: 12px; }
.trust-step__state { color: var(--green-700); font-size: 12px; font-weight: 800; }
.trust-step.is-warning .trust-step__state { color: var(--warning); }
.trust-step__enter { width: 14px; height: 14px; opacity: .45; }
.trust-panel__action {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 12px; padding: 14px 15px; border: 1px solid #bcd8c6;
    border-radius: 10px; color: inherit; background: var(--green-50);
}
.trust-panel__action strong, .trust-panel__action small { display: block; }
.trust-panel__action small { margin-top: 3px; font-size: 11px; }
.trust-panel__action > span:last-child {
    flex: 0 0 auto; padding: 9px 12px; border-radius: 8px;
    color: #fff; background: var(--green-700); font-size: 12px; font-weight: 800;
}
.attention-count {
    display: grid; min-width: 32px; height: 32px; place-items: center;
    border-radius: 10px; color: var(--warning); background: var(--warning-soft); font-weight: 850;
}
.attention-list { display: grid; }
.attention-list a {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 0; border-top: 1px solid #edf1ee; color: inherit;
}
.attention-list a:first-child { border-top: 0; }
.attention-list strong, .attention-list small { display: block; }
.attention-list strong { margin-bottom: 3px; font-size: 13px; }
.attention-list small { font-size: 11px; }
.attention-list b { color: var(--warning); font-size: 15px; }
.attention-empty { display: flex; align-items: center; gap: 12px; padding: 8px 0 4px; }
.attention-empty img { width: 28px; height: 28px; filter: invert(34%) sepia(22%) saturate(1489%) hue-rotate(100deg); }
.attention-empty strong, .attention-empty small { display: block; }
.attention-empty small { margin-top: 3px; font-size: 11px; }
.audit-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.audit-timeline li {
    display: grid; grid-template-columns: 10px minmax(0, 1fr);
    align-items: start; gap: 10px; padding: 10px 0; border-top: 1px solid #edf1ee;
}
.audit-timeline li:first-child { border-top: 0; }
.audit-timeline__marker { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--green-600); }
.audit-timeline strong, .audit-timeline small { display: block; }
.audit-timeline strong { margin-bottom: 3px; font-size: 12px; overflow-wrap: anywhere; }
.audit-timeline small, .audit-timeline time { color: var(--muted); font-size: 10px; }
.audit-timeline time { grid-column: 2; margin-top: -5px; white-space: normal; }

/* Account list and tables */
.accounts-section { margin-top: 34px; scroll-margin-top: 20px; }
.section-heading-row { align-items: flex-end; margin-bottom: 14px; }
.section-heading-row h2 { margin-bottom: 4px; font-size: 24px; }
.section-heading-row p { margin-bottom: 0; }
.search { display: flex; align-items: end; gap: 9px; margin: 0; }
.header-search { width: min(360px, 32vw); margin-left: auto; }
.header-search .search-field { width: 100%; }
.search-field { position: relative; width: min(320px, 45vw); }
.search-field img { position: absolute; left: 12px; bottom: 14px; width: 15px; height: 15px; opacity: .5; }
.search-field input { padding-left: 36px; }
.table-scroll { overflow-x: auto; }
.account-table { padding: 4px 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 10px; border-bottom: 1px solid #edf1ee; text-align: left; vertical-align: middle; }
th { color: #77837c; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td small { margin-top: 4px; font-size: 10px; overflow-wrap: anywhere; }
.row-link { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12px; font-weight: 800; }
.row-link img { width: 12px; height: 12px; opacity: .55; }

/* Account detail */
.account-title { margin-bottom: 18px; }
.account-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.trust-metric {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.trust-metric img {
    width: 20px; height: 20px; padding: 0;
    filter: invert(34%) sepia(22%) saturate(1489%) hue-rotate(100deg);
}
.trust-metric.is-warning img { filter: invert(45%) sepia(39%) saturate(1003%) hue-rotate(356deg); }
.trust-metric span, .trust-metric small, .trust-metric strong { display: block; min-width: 0; }
.trust-metric small { margin-bottom: 4px; font-size: 10px; }
.trust-metric strong { font-size: 14px; overflow-wrap: anywhere; }
.section-tabs {
    position: sticky; top: 0; z-index: 4; display: flex; gap: 5px; margin-bottom: 18px;
    padding: 7px; border: 1px solid var(--line); border-radius: 11px;
    background: rgba(255, 255, 255, .94); box-shadow: 0 8px 24px rgba(21, 55, 38, .06);
    backdrop-filter: blur(12px);
}
.section-tabs a { padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.section-tabs a:hover { color: var(--green-700); background: var(--green-50); }
.authorization-form, #devices, #sessions, #account-audits, #risk { scroll-margin-top: 70px; }
.authorization-form .capability-tree { margin-top: 2px; }
.device {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(90px, auto);
    gap: 16px; align-items: center; padding: 15px 0; border-top: 1px solid #edf1ee;
}
.device:first-of-type { border-top: 0; }
.device__identity strong, .device__identity small { display: block; }
.device__identity small { margin-top: 4px; font-size: 11px; overflow-wrap: anywhere; }
.inline-risk { position: relative; }
.inline-risk > summary { color: var(--danger); font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.inline-risk > summary::-webkit-details-marker { display: none; }
.inline-risk form {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 5;
    display: grid; gap: 8px; width: min(340px, 70vw); padding: 12px;
    border: 1px solid #efcaca; border-radius: 10px; background: #fff; box-shadow: 0 16px 38px rgba(58, 27, 27, .16);
}
.risk-zone { border-color: #eccfcf; background: #fffafa; }
.risk-zone > summary, .create-disclosure > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    list-style: none; cursor: pointer;
}
.risk-zone > summary::-webkit-details-marker, .create-disclosure > summary::-webkit-details-marker { display: none; }
.risk-zone > summary strong, .risk-zone > summary small,
.create-disclosure > summary strong, .create-disclosure > summary small { display: block; }
.risk-zone > summary small, .create-disclosure > summary small { margin-top: 4px; font-size: 11px; }
.risk-zone[open] > summary, .create-disclosure[open] > summary { margin-bottom: 18px; }
.risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.risk-grid > form { padding: 15px; border: 1px solid #efdada; border-radius: 10px; background: #fff; }

/* Capability tree */
fieldset { display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 11px; padding: 14px; }
legend { padding: 0 6px; font-weight: 800; }
.check { grid-template-columns: 22px 1fr !important; align-items: start; font-weight: 400 !important; }
.check input { width: 18px; min-height: 18px; }
.check span, .check small { display: block; }
.capability-tree { gap: 12px; background: #fafcfb; }
.capability-tree > .muted { margin: -2px 0 2px; }
.capability-tree__all, .capability-tree__group-toggle {
    display: grid !important; grid-template-columns: 22px 1fr; gap: 8px !important;
    align-items: start; font-weight: 700 !important;
}
.capability-tree input[type="checkbox"] {
    width: 18px; min-height: 18px; margin: 1px 0 0; padding: 0; accent-color: var(--green-700);
}
.capability-tree__all { padding: 11px 12px; border: 1px solid #bad4c4; border-radius: 9px; background: var(--green-50); }
.capability-tree__group { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.capability-tree__leaves { display: grid; gap: 7px; margin-left: 12px; padding-left: 14px; border-left: 2px solid #d6e6dc; }
.capability-tree__leaf { margin-left: 8px; }
.capability-tree__all span, .capability-tree__group-toggle span, .capability-tree__leaf span { min-width: 0; }
.capability-tree__all small, .capability-tree__group-toggle small, .capability-tree__leaf small { display: block; margin-top: 2px; }

/* ROM delivery */
.rom-release-list { display: grid; gap: 14px; margin-top: 18px; }
.rom-card, .rom-enrollment { display: grid; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.rom-card__header, .rom-enrollment__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rom-card__identity, .rom-enrollment__identity { min-width: 0; }
.rom-card__identity strong, .rom-enrollment__identity strong { display: block; margin-bottom: 5px; overflow-wrap: anywhere; }
.rom-card__identity small, .rom-enrollment__identity small { display: block; margin-top: 3px; line-height: 1.5; overflow-wrap: anywhere; }
.rom-claim-form {
    display: grid; grid-template-columns: minmax(0, 1fr) 150px auto;
    gap: 12px; align-items: end;
}
.rom-field > span { color: var(--muted); font-size: 12px; }
.rom-claim-form button, .rom-review-form button { white-space: nowrap; }
.rom-advanced { padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rom-advanced summary { color: var(--green-700); font-weight: 750; cursor: pointer; }
.rom-advanced[open] summary { margin-bottom: 12px; }
.rom-advanced p { margin-bottom: 12px; }
.rom-identity-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr); gap: 12px; }
.rom-identity-form__reason, .rom-identity-form__submit { grid-column: 1 / -1; }
.rom-identity-form__submit { justify-self: start; }
.rom-enrollment { margin-top: 13px; background: #fff; }
.rom-review-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.rom-enrollment > small { line-height: 1.5; }
.rom-release-create { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rom-release-create > h2, .rom-release-create > button { grid-column: 1 / -1; }
.rom-release-create > button { justify-self: start; }

/* Create account */
.create-account-form { gap: 16px; }
.form-step { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid #edf1ee; }
.form-step:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-step > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: #fff; background: var(--green-700); font-size: 12px; font-weight: 850; }
.form-step strong, .form-step small { display: block; }
.form-step small { margin-top: 3px; font-size: 11px; }

/* Login and security continuation screens */
.login-body { min-height: 100vh; padding: 20px; background: #eaf0eb; }
.login-layout { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); width: min(1040px, 100%); min-height: min(680px, calc(100vh - 40px)); margin: 0 auto; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 28px 80px rgba(13, 55, 35, .15); }
.login-story { display: flex; flex-direction: column; padding: 44px; color: #fff; background: var(--green-950); }
.login-story__brand { display: flex; align-items: center; gap: 12px; }
.login-story__mark { width: 40px; height: 40px; }
.login-story__copy { margin: auto 0; }
.login-story__copy .page-kicker { color: #91c2a2; }
.login-story__copy h1 { margin-bottom: 18px; font-size: clamp(34px, 4vw, 48px); }
.login-story__copy p:last-child { max-width: 440px; color: rgba(255, 255, 255, .62); line-height: 1.7; }
.login-trust-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.login-trust-list li { display: flex; align-items: center; gap: 12px; }
.login-trust-list img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .76; }
.login-trust-list strong, .login-trust-list small { display: block; }
.login-trust-list strong { font-size: 13px; }
.login-trust-list small { margin-top: 3px; color: rgba(255, 255, 255, .54); font-size: 10px; }
.login-card { align-self: center; width: min(440px, calc(100% - 64px)); margin: 0 auto; padding: 38px 0; }
.login-body > .login-card {
    margin: max(40px, 10vh) auto; padding: 34px;
    border: 1px solid var(--line); border-radius: 16px;
    background: #fff; box-shadow: var(--shadow);
}
.login-card h2 { margin-bottom: 9px; font-size: 30px; }
.login-card form { display: grid; gap: 16px; margin-top: 26px; }
.login-card label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.login-card button { width: 100%; min-height: 48px; margin-top: 4px; }
.login-footnote { margin: 20px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.eyebrow { color: var(--green-700); font-weight: 800; letter-spacing: .12em; }
.claim-code { padding: 16px; border: 1px dashed var(--green-700); border-radius: 10px; overflow-wrap: anywhere; white-space: pre-wrap; background: var(--green-50); font-size: 16px; }
.mfa-qr { display: block; width: min(280px, 100%); margin: 16px auto; image-rendering: pixelated; }
.mfa-secret { display: block; margin-top: 10px; padding: 10px; overflow-wrap: anywhere; background: var(--green-50); border-radius: 8px; user-select: all; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; padding-left: 24px; }
.recovery-codes code { user-select: all; }

/* Legacy shell retained for MFA/passkey/claim continuation templates. */
.admin-bar {
    min-height: 64px; padding: 12px max(24px, calc((100% - 1180px)/2));
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border-bottom: 1px solid var(--line);
}
.admin-bar div { display: grid; gap: 2px; }
.admin-bar span { color: var(--muted); }
.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 30px auto 60px; }
.admin-shell.narrow { width: min(720px, calc(100% - 32px)); }

@media (max-width: 1160px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .admin-app { display: block; }
    .admin-sidebar { display: none; }
    .mobile-admin-bar {
        position: sticky; top: 0; z-index: 10; display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center;
        min-height: 60px; padding: 8px 18px; border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
    }
    .mobile-admin-bar strong { text-align: center; font-size: 14px; }
    .mobile-admin-bar__brand { width: 34px; height: 34px; }
    .mobile-admin-bar form { margin: 0; }
    .icon-button { width: 40px; min-height: 40px; padding: 10px; border: 0; background: transparent; }
    .icon-button:hover { background: var(--green-50); }
    .icon-button img { width: 18px; height: 18px; }
    .admin-content { padding: 28px 22px 60px; }
    .section-tabs { top: 68px; }
}

@media (max-width: 760px) {
    .page-title-row, .section-heading-row, .heading-row { align-items: stretch; flex-direction: column; }
    .page-title-row .button-link { width: 100%; }
    .header-search { width: 100%; margin-left: 0; }
    .dashboard-side, .split, .form-columns, .account-trust-grid { grid-template-columns: 1fr; }
    .search { width: 100%; }
    .search-field { width: 100%; }
    .section-tabs { gap: 2px; overflow-x: auto; }
    .section-tabs a { flex: 0 0 auto; }
    .trust-step { grid-template-columns: 34px minmax(0, 1fr) 16px; }
    .trust-step__state { grid-column: 2; }
    .trust-step__enter { grid-column: 3; grid-row: 1 / span 2; }
    .trust-panel__action { align-items: stretch; flex-direction: column; }
    .trust-panel__action > span:last-child { text-align: center; }
    .device { grid-template-columns: minmax(0, 1fr) auto; }
    .device .inline-risk { grid-column: 1 / -1; justify-self: start; }
    .inline-risk form { left: 0; right: auto; }
    .rom-claim-form,
    .rom-identity-form,
    .rom-review-form,
    .rom-release-create { grid-template-columns: 1fr; }
    .rom-identity-form__reason,
    .rom-identity-form__submit,
    .rom-release-create > h2,
    .rom-release-create > button { grid-column: 1; }
    .rom-claim-form button,
    .rom-review-form button,
    .rom-identity-form__submit,
    .rom-release-create > button { width: 100%; }
    .rom-card, .rom-enrollment { padding: 14px; }
    .login-body { padding: 0; background: #fff; }
    .login-layout { display: block; min-height: 100vh; border-radius: 0; box-shadow: none; }
    .login-story { min-height: 230px; padding: 28px 24px; }
    .login-story__copy { margin: 34px 0 0; }
    .login-story__copy h1 { margin-bottom: 10px; font-size: 32px; }
    .login-story__copy p:last-child, .login-trust-list { display: none; }
    .login-card { width: 100%; padding: 34px 24px 48px; }
}

@media (max-width: 520px) {
    .admin-content { padding: 24px 14px 48px; }
    .panel { padding: 17px; border-radius: 12px; }
    .trust-panel { padding-bottom: 10px; }
    .panel-heading { align-items: flex-start; }
    .account-table { padding: 2px 8px; }
    .recovery-codes { grid-template-columns: 1fr; }
}
