:root {
    --navy-950: #0b2131;
    --navy-900: #12344d;
    --navy-800: #174966;
    --blue-600: #1479b8;
    --blue-500: #2497d1;
    --cyan-400: #41c7c7;
    --green-600: #17865f;
    --green-100: #dff5eb;
    --amber-600: #a85e0b;
    --amber-100: #fff0d5;
    --red-600: #c33d48;
    --red-100: #fde7e9;
    --ink-900: #172733;
    --ink-700: #405360;
    --ink-500: #70818c;
    --line: #dce5ea;
    --surface: #ffffff;
    --canvas: #f4f7f9;
    --shadow-sm: 0 1px 2px rgba(11, 33, 49, .06), 0 4px 14px rgba(11, 33, 49, .04);
    --shadow-md: 0 14px 35px rgba(11, 33, 49, .12);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --sidebar-width: 248px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink-900);
    background: var(--canvas);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue-600);
    text-decoration: none;
}

a:hover {
    color: var(--navy-900);
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(36, 151, 209, .3);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    transform: translateY(-150%);
    padding: 10px 14px;
    color: #fff;
    border-radius: var(--radius-sm);
    background: var(--navy-900);
}

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

.app-shell {
    min-height: 100vh;
    padding-left: var(--sidebar-width);
}

.sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-y: auto;
    color: #e5f0f5;
    background:
            radial-gradient(circle at 20% 0, rgba(65, 199, 199, .17), transparent 36%),
            linear-gradient(165deg, var(--navy-900), var(--navy-950));
    box-shadow: 10px 0 30px rgba(11, 33, 49, .08);
}

.brand {
    display: flex;
    min-height: 92px;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.brand:hover {
    color: #fff;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--cyan-400);
}

.brand-mark svg {
    width: 42px;
    height: 42px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 15px;
    letter-spacing: .04em;
}

.brand small {
    margin-top: 2px;
    color: #93adbc;
    font-size: 11px;
    letter-spacing: .08em;
}

.side-nav {
    padding: 22px 12px 8px;
}

.nav-label {
    margin: 0 12px 9px;
    color: #7895a6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
}

.side-nav a {
    display: flex;
    height: 44px;
    align-items: center;
    gap: 11px;
    margin: 3px 0;
    padding: 0 12px;
    color: #b9ccd6;
    border-radius: 10px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
    transform: translateX(2px);
}

.side-nav a.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(36, 151, 209, .4), rgba(65, 199, 199, .17));
    box-shadow: inset 3px 0 var(--cyan-400);
}

.nav-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--cyan-400);
    font-size: 18px;
}

.sidebar-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 20px 24px;
    color: #8da7b5;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #51d497;
    box-shadow: 0 0 0 4px rgba(81, 212, 151, .12);
}

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 18px;
    padding: 12px clamp(20px, 3vw, 42px);
    border-bottom: 1px solid rgba(220, 229, 234, .9);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
}

.topbar-heading {
    min-width: 0;
}

.topbar-heading p,
.topbar-heading h1 {
    margin: 0;
}

.topbar-heading p {
    color: var(--ink-500);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.topbar-heading h1 {
    overflow: hidden;
    font-size: 21px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.avatar {
    display: grid;
    width: 36px;
    height: 36px;
    overflow: hidden;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--blue-600), var(--cyan-400));
    font-size: 12px;
    font-weight: 800;
}

.user-meta strong,
.user-meta small {
    display: block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta small {
    color: var(--ink-500);
    font-size: 11px;
}

.menu-toggle {
    display: none !important;
}

.app-content {
    width: min(1440px, 100%);
    min-height: calc(100vh - 124px);
    margin: 0 auto;
    padding: 28px clamp(20px, 3vw, 42px) 42px;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-head h2,
.page-head p {
    margin: 0;
}

.page-head h2 {
    font-size: 25px;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.page-head p {
    max-width: 760px;
    margin-top: 7px;
    color: var(--ink-500);
}

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

.alerts:empty {
    display: none;
}

.alert {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid;
    border-radius: var(--radius-sm);
}

.alert-success {
    color: #116a4b;
    border-color: #a9dfc9;
    background: var(--green-100);
}

.alert-danger {
    color: #a32d37;
    border-color: #f2b7bc;
    background: var(--red-100);
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    cursor: pointer;
    color: #fff;
    border: 1px solid var(--navy-900);
    border-radius: var(--radius-sm);
    background: var(--navy-900);
    font-weight: 700;
    line-height: 1.15;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.button:hover {
    color: #fff;
    background: var(--navy-800);
    box-shadow: 0 6px 16px rgba(18, 52, 77, .17);
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button-primary {
    border-color: var(--blue-600);
    background: var(--blue-600);
}

.button-secondary {
    color: var(--navy-900);
    border-color: var(--line);
    background: #fff;
}

.button-secondary:hover,
.button-ghost:hover {
    color: var(--navy-900);
    border-color: #b7c7d0;
    background: #eef4f7;
    box-shadow: none;
}

.button-danger {
    color: var(--red-600);
    border-color: #efc7ca;
    background: #fff;
}

.button-danger:hover {
    color: #fff;
    border-color: var(--red-600);
    background: var(--red-600);
}

.button-ghost {
    color: var(--ink-700);
    border-color: transparent;
    background: transparent;
}

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

.button[disabled] {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
    transform: none;
}

.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    cursor: pointer;
    place-items: center;
    color: var(--ink-700);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card + .card {
    margin-top: 20px;
}

.card-head {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.card-head h3,
.card-head p {
    margin: 0;
}

.card-head h3 {
    font-size: 16px;
}

.card-head p {
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 12px;
}

.card-body {
    padding: 20px;
}

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

.metric-card {
    position: relative;
    min-height: 126px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.metric-card::after {
    position: absolute;
    right: -24px;
    bottom: -36px;
    width: 100px;
    height: 100px;
    content: "";
    border-radius: 50%;
    background: rgba(36, 151, 209, .07);
}

.metric-label {
    color: var(--ink-500);
    font-size: 12px;
    font-weight: 700;
}

.metric-value {
    display: block;
    margin-top: 9px;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.metric-note {
    display: block;
    margin-top: 7px;
    color: var(--ink-500);
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
    gap: 20px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #e9eff2;
}

.data-table th {
    color: var(--ink-500);
    background: #f8fafb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #f9fbfc;
}

.cell-main,
.cell-sub {
    display: block;
}

.cell-main {
    color: var(--ink-900);
    font-weight: 700;
}

.cell-sub {
    max-width: 360px;
    overflow: hidden;
    margin-top: 2px;
    color: var(--ink-500);
    font-size: 12px;
    text-overflow: ellipsis;
}

.code,
code,
pre,
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.code {
    padding: 3px 7px;
    color: #145273;
    border-radius: 5px;
    background: #eaf4f8;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--ink-700);
    background: #eaf0f3;
    font-size: 11px;
    font-weight: 800;
}

.badge::before {
    width: 6px;
    height: 6px;
    content: "";
    border-radius: 50%;
    background: currentColor;
}

.badge-success {
    color: var(--green-600);
    background: var(--green-100);
}

.badge-warning {
    color: var(--amber-600);
    background: var(--amber-100);
}

.badge-danger {
    color: var(--red-600);
    background: var(--red-100);
}

.badge-info {
    color: var(--blue-600);
    background: #e2f2fa;
}

.badge-neutral {
    color: var(--ink-500);
    background: #edf1f3;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfd;
}

.field {
    min-width: 0;
}

.field-grow {
    flex: 1 1 260px;
}

.field label,
.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 800;
}

.required::after {
    margin-left: 3px;
    content: "*";
    color: var(--red-600);
}

.input,
.select,
.textarea {
    width: 100%;
    color: var(--ink-900);
    border: 1px solid #cbd7de;
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border .15s ease, box-shadow .15s ease;
}

.input,
.select {
    height: 42px;
    padding: 0 12px;
}

.textarea {
    min-height: 118px;
    padding: 11px 12px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(36, 151, 209, .12);
}

.input[readonly],
.textarea[readonly] {
    color: var(--ink-700);
    background: #f5f8f9;
}

.field-help,
.field-error {
    display: block;
    margin-top: 5px;
    font-size: 11px;
}

.field-help {
    color: var(--ink-500);
}

.field-error {
    color: var(--red-600);
}

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

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

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    min-height: 42px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--ink-700);
    font-weight: 600;
}

.checkbox input {
    width: 17px;
    height: 17px;
    accent-color: var(--blue-600);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

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

.detail-item {
    min-width: 0;
    padding: 15px 0;
    border-bottom: 1px solid #edf1f3;
}

.detail-item dt {
    margin-bottom: 5px;
    color: var(--ink-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

.detail-item dd {
    overflow-wrap: anywhere;
    margin: 0;
    font-weight: 600;
}

.secret-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.secret-box .input {
    flex: 1;
}

.empty-state {
    padding: 52px 20px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 13px;
    place-items: center;
    color: var(--blue-600);
    border-radius: 18px;
    background: #e7f4fa;
    font-size: 27px;
}

.empty-state h3,
.empty-state p {
    margin: 0;
}

.empty-state p {
    margin-top: 6px;
    color: var(--ink-500);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    color: var(--ink-500);
    border-top: 1px solid var(--line);
    font-size: 12px;
}

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

.distribution-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.distribution-list li {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #edf1f3;
}

.distribution-list li:last-child {
    border-bottom: 0;
}

.distribution-key {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.distribution-key::before {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    content: "";
    border-radius: 3px;
    background: var(--blue-500);
}

.callout {
    padding: 14px 16px;
    color: #30546a;
    border: 1px solid #c8e2ee;
    border-radius: var(--radius-sm);
    background: #edf8fc;
}

.callout strong {
    color: var(--navy-900);
}

.callout-warning {
    color: #744b12;
    border-color: #eed39b;
    background: #fff8e9;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 20px;
    align-items: start;
}

.sticky-card {
    position: sticky;
    top: 96px;
}

.code-block {
    overflow: auto;
    max-height: 420px;
    margin: 0;
    padding: 16px;
    color: #d7e8ef;
    border-radius: var(--radius-sm);
    background: var(--navy-950);
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.api-method {
    display: inline-flex;
    min-width: 48px;
    justify-content: center;
    padding: 3px 7px;
    color: #fff;
    border-radius: 5px;
    background: var(--green-600);
    font-size: 10px;
    font-weight: 900;
}

.api-list {
    display: grid;
    gap: 12px;
}

.api-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 17px;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border .15s ease, box-shadow .15s ease, transform .15s ease;
}

.api-item:hover {
    color: inherit;
    border-color: #a8c8d8;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.api-item h3,
.api-item p {
    margin: 0;
}

.api-item h3 {
    font-size: 14px;
}

.api-item p {
    overflow: hidden;
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.debug-output {
    min-height: 220px;
}

.step-number {
    display: inline-grid;
    width: 26px;
    height: 26px;
    margin-right: 7px;
    place-items: center;
    color: #fff;
    border-radius: 8px;
    background: var(--blue-600);
    font-size: 12px;
}

.inline-status {
    min-height: 20px;
    margin-top: 8px;
    color: var(--ink-500);
    font-size: 12px;
}

.inline-status.is-success {
    color: var(--green-600);
}

.inline-status.is-error {
    color: var(--red-600);
}

.login-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(360px, .95fr) minmax(480px, 1.2fr);
    background: #fff;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 6vw, 78px);
}

.login-card {
    width: min(420px, 100%);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 52px;
    color: var(--navy-900);
}

.login-brand .brand-mark {
    color: var(--blue-600);
}

.login-card h1,
.login-card > p {
    margin: 0;
}

.login-card h1 {
    margin-bottom: 9px;
    font-size: 30px;
    letter-spacing: -.03em;
}

.login-card > p {
    margin-bottom: 32px;
    color: var(--ink-500);
}

.login-card .field {
    margin-bottom: 18px;
}

.login-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 8px;
}

.login-aside {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: flex-end;
    padding: clamp(44px, 7vw, 100px);
    color: #fff;
    background:
            radial-gradient(circle at 85% 14%, rgba(65, 199, 199, .36), transparent 28%),
            radial-gradient(circle at 15% 80%, rgba(36, 151, 209, .25), transparent 30%),
            linear-gradient(150deg, var(--navy-800), var(--navy-950));
}

.login-aside::before,
.login-aside::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
}

.login-aside::before {
    top: -120px;
    right: -100px;
    width: 420px;
    height: 420px;
}

.login-aside::after {
    top: -40px;
    right: -20px;
    width: 260px;
    height: 260px;
}

.login-promise {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.login-promise .eyebrow {
    color: var(--cyan-400);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
}

.login-promise h2 {
    max-width: 540px;
    margin: 15px 0;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.12;
    letter-spacing: -.04em;
}

.login-promise p {
    max-width: 520px;
    color: #b8cbd6;
    font-size: 16px;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.trust-row span {
    padding: 7px 11px;
    color: #d5e5ec;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    font-size: 11px;
}

.error-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
            radial-gradient(circle at 15% 10%, rgba(36, 151, 209, .13), transparent 30%),
            var(--canvas);
}

.error-card {
    width: min(620px, 100%);
    padding: clamp(28px, 5vw, 52px);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-md);
}

.error-code {
    display: block;
    color: var(--blue-600);
    font-size: clamp(60px, 12vw, 100px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.08em;
}

.error-card h1 {
    margin: 18px 0 8px;
}

.error-card p {
    margin: 0 auto 24px;
    color: var(--ink-500);
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    padding: 0 clamp(20px, 3vw, 42px);
    color: var(--ink-500);
    border-top: 1px solid var(--line);
    background: #fff;
    font-size: 11px;
}

.sidebar-scrim {
    display: none;
}

.text-success { color: var(--green-600); }
.text-danger { color: var(--red-600); }
.text-muted { color: var(--ink-500); }
.text-right { text-align: right !important; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 12px !important; }
.mb-0 { margin-bottom: 0 !important; }

@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .app-shell {
        padding-left: 0;
    }

    .sidebar {
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-scrim {
        position: fixed;
        z-index: 40;
        inset: 0;
        background: rgba(7, 25, 37, .48);
    }

    body.menu-open .sidebar-scrim {
        display: block;
    }

    .menu-toggle {
        display: inline-grid !important;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-aside {
        display: none;
    }
}

/* Final layout polish: align the form and message as one intentional composition. */
@media (min-width: 821px) {
    .login-page {
        grid-template-columns: minmax(460px, .92fr) minmax(460px, 1.08fr);
        column-gap: clamp(24px, 4vw, 72px);
        padding: 0 clamp(28px, 6vw, 120px);
    }

    .login-panel {
        justify-content: flex-end;
        padding: 72px clamp(24px, 3vw, 56px) 72px 0;
    }

    .login-card { margin: 0; }

    .login-aside {
        justify-content: flex-start;
        padding: 72px 0 72px clamp(8px, 2vw, 28px);
    }

    .login-hero-title {
        max-width: 620px;
        font-size: clamp(52px, 5.2vw, 78px);
    }
}

@media (min-width: 821px) and (max-width: 1080px) {
    .login-page {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 28px;
        padding: 0 36px;
    }
    .login-panel { padding-right: 24px; }
    .login-aside { padding-left: 12px; }
    .login-hero-title { font-size: clamp(46px, 6vw, 64px); }
}

@media (max-width: 620px) {
    .topbar {
        min-height: 68px;
        gap: 10px;
    }

    .topbar-heading p,
    .user-meta {
        display: none;
    }

    .topbar-heading h1 {
        font-size: 17px;
    }

    .topbar-user {
        gap: 5px;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

    .page-head {
        flex-direction: column;
    }

    .page-actions,
    .page-actions .button {
        width: 100%;
    }

    .metric-grid,
    .form-grid,
    .detail-grid,
    .debug-grid {
        grid-template-columns: 1fr;
    }

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

    .metric-card {
        min-height: 110px;
    }

    .filter-bar > .field,
    .filter-bar > .button {
        width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .button {
        width: 100%;
    }

    .footer {
        flex-direction: column;
        justify-content: center;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Apple-inspired visual refresh: quiet surfaces, generous rhythm, precise hierarchy. */
:root {
    --navy-950: #111113;
    --navy-900: #1d1d1f;
    --navy-800: #2c2c2e;
    --blue-600: #0071e3;
    --blue-500: #147ce5;
    --cyan-400: #5ac8fa;
    --green-600: #248a3d;
    --green-100: #e8f5e9;
    --amber-600: #9a6700;
    --amber-100: #fff4d6;
    --red-600: #d70015;
    --red-100: #fff0f0;
    --ink-900: #1d1d1f;
    --ink-700: #424245;
    --ink-500: #86868b;
    --line: #d2d2d7;
    --surface: #fff;
    --canvas: #f5f5f7;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .045), 0 12px 28px rgba(0, 0, 0, .035);
    --shadow-md: 0 20px 50px rgba(0, 0, 0, .12);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
}

body {
    background: var(--canvas);
    letter-spacing: -.01em;
}

a { color: var(--blue-600); }
a:hover { color: #005bb5; }

.sidebar {
    color: var(--ink-700);
    background: rgba(250, 250, 252, .92);
    border-right: 1px solid rgba(210, 210, 215, .8);
    box-shadow: none;
    backdrop-filter: blur(22px);
}

.brand {
    min-height: 86px;
    color: var(--ink-900);
    border-bottom-color: rgba(210, 210, 215, .72);
}
.brand:hover { color: var(--ink-900); }
.brand-mark { color: var(--blue-600); }
.brand small { color: var(--ink-500); }
.nav-label { color: var(--ink-500); }
.side-nav a { color: var(--ink-700); font-weight: 600; }
.side-nav a:hover { color: var(--ink-900); background: rgba(0, 0, 0, .045); transform: none; }
.side-nav a.active {
    color: var(--blue-600);
    background: rgba(0, 113, 227, .1);
    box-shadow: none;
}
.nav-icon { color: currentColor; }
.sidebar-foot { color: var(--ink-500); border-top-color: rgba(210, 210, 215, .72); }
.status-dot { background: #34c759; box-shadow: 0 0 0 4px rgba(52, 199, 89, .12); }

.topbar {
    min-height: 72px;
    border-bottom-color: rgba(210, 210, 215, .8);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(20px);
}
.topbar-heading p { color: var(--ink-500); letter-spacing: .1em; }
.topbar-heading h1 { font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
.avatar { background: var(--ink-900); }

.app-content { padding-top: 36px; }
.page-head { margin-bottom: 28px; }
.page-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -.04em; }
.page-head p { color: var(--ink-500); }

.button {
    min-height: 40px;
    padding: 10px 17px;
    border: 0;
    border-radius: 999px;
    background: var(--navy-900);
    box-shadow: none;
    font-weight: 600;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.button:hover { background: var(--navy-900); filter: brightness(1.16); box-shadow: 0 5px 14px rgba(0, 0, 0, .12); transform: translateY(-1px); }
.button-primary { border: 0; background: var(--blue-600); }
.button-primary:hover { background: var(--blue-600); }
.button-secondary { color: var(--ink-900); border: 1px solid var(--line); background: rgba(255, 255, 255, .7); }
.button-secondary:hover, .button-ghost:hover { color: var(--ink-900); border-color: var(--line); background: #fff; box-shadow: none; }
.button-danger { color: var(--red-600); border: 1px solid #f0c5c9; background: #fff; }
.button-danger:hover { color: #fff; background: var(--red-600); }
.button-ghost { color: var(--ink-700); }
.button-small { min-height: 32px; padding: 7px 13px; font-size: 12px; }

/* Dark buttons must retain WCAG-readable white labels in every interaction state. */
.button-ghost,
.button-ghost:visited,
.button-ghost:hover,
.button-ghost:focus,
.button-ghost:active {
    color: #fff;
    border-color: transparent;
    background: var(--navy-900);
}

.button-ghost:hover {
    color: #fff;
    background: var(--navy-900);
    filter: brightness(1.16);
    box-shadow: 0 5px 14px rgba(0, 0, 0, .12);
}

.button-primary,
.button-primary:visited,
.button-primary:hover,
.button-primary:focus,
.button-primary:active {
    color: #fff;
}
.icon-button { border-color: var(--line); border-radius: 50%; background: rgba(255, 255, 255, .75); }

.card, .metric-card, .api-item {
    border-color: rgba(210, 210, 215, .9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-head { min-height: 70px; padding: 18px 22px; border-bottom-color: #e5e5ea; }
.card-head h3 { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.card-body { padding: 22px; }
.metric-card { min-height: 132px; padding: 22px; }
.metric-card::after { background: rgba(0, 113, 227, .06); }
.portal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-label { color: var(--ink-500); letter-spacing: .01em; }
.metric-value { font-size: 32px; font-weight: 700; }
.data-table th { color: var(--ink-500); background: #fbfbfd; }
.data-table tbody tr:hover { background: #f5f5f7; }

.input, .select, .textarea {
    border-color: #c7c7cc;
    border-radius: 11px;
    background: rgba(255, 255, 255, .9);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(0, 113, 227, .13); }
.input[readonly], .textarea[readonly] { background: #f5f5f7; }
.filter-bar { border-bottom-color: #e5e5ea; background: #fbfbfd; }
.form-actions { border-top-color: #e5e5ea; }
.badge { min-height: 23px; padding: 3px 9px; font-weight: 650; }
.code { color: #005bb5; background: #eaf3ff; }
.callout { border-color: #c7e0ff; background: #f0f7ff; }
.callout-warning { border-color: #f0d58d; background: #fff9e8; }
.code-block { border-radius: 12px; background: #1d1d1f; }

.login-page { background: #fff; }
.login-panel { background: #fff; }
.login-brand { color: var(--ink-900); }
.login-brand .brand-mark { color: var(--blue-600); }
.login-card h1 { font-size: 34px; font-weight: 700; }
.login-card > p { color: var(--ink-500); }
.login-submit { min-height: 48px; }
.login-aside {
    align-items: center;
    padding: clamp(44px, 8vw, 120px);
    background: linear-gradient(145deg, #0b1f3a 0%, #102e5d 55%, #0071e3 150%);
}
.login-aside::before, .login-aside::after { border-color: rgba(255, 255, 255, .15); }
.login-promise h2 { font-weight: 700; }
.trust-row span { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); }
.error-page { background: var(--canvas); }
.error-card { border-color: #e5e5ea; box-shadow: var(--shadow-md); }
.footer { border-top-color: #e5e5ea; background: rgba(255, 255, 255, .7); }

.sidebar-account {
    position: relative;
    margin-top: auto;
    padding: 14px 12px;
    border-top: 1px solid rgba(210, 210, 215, .72);
}

.account-trigger {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    cursor: pointer;
    color: var(--ink-900);
    border: 0;
    border-radius: 13px;
    background: transparent;
    text-align: left;
    transition: background .16s ease;
}

.account-trigger:hover,
.sidebar-account.is-open .account-trigger {
    background: rgba(0, 0, 0, .05);
}

.account-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--ink-900);
}

.account-avatar svg {
    width: 21px;
    height: 21px;
}

.account-copy {
    min-width: 0;
    flex: 1;
}

.account-copy strong,
.account-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy strong { font-size: 13px; font-weight: 650; }
.account-copy small { margin-top: 1px; color: var(--ink-500); font-size: 11px; }
.account-chevron { color: var(--ink-500); font-size: 13px; transition: transform .16s ease; }
.sidebar-account.is-open .account-chevron { transform: rotate(180deg); }

.account-menu {
    position: absolute;
    right: 12px;
    bottom: calc(100% + 7px);
    left: 12px;
    z-index: 70;
    padding: 6px;
    visibility: hidden;
    opacity: 0;
    border: 1px solid rgba(210, 210, 215, .9);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .14);
    transform: translateY(6px) scale(.98);
    transform-origin: bottom center;
    pointer-events: none;
    backdrop-filter: saturate(180%) blur(20px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.sidebar-account.is-open .account-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.account-menu form { margin: 0; }

.account-menu-item {
    display: flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    cursor: pointer;
    color: var(--ink-900);
    border: 0;
    border-radius: 9px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.account-menu-item:hover { color: var(--ink-900); background: #f2f2f7; }
.account-menu-danger { color: var(--red-600); }
.account-menu-danger:hover { color: var(--red-600); background: var(--red-100); }

/* Unified action language: every operation button uses black with white text. */
.button,
.button:visited,
.button:hover,
.button:focus,
.button:active,
.button-primary,
.button-primary:hover,
.button-primary:focus,
.button-primary:active,
.button-secondary,
.button-secondary:hover,
.button-secondary:focus,
.button-secondary:active,
.button-ghost,
.button-ghost:hover,
.button-ghost:focus,
.button-ghost:active,
.button-danger,
.button-danger:hover,
.button-danger:focus,
.button-danger:active {
    color: #fff;
    border-color: var(--navy-900);
    background: var(--navy-900);
    box-shadow: none;
}

.button:hover,
.button-primary:hover,
.button-secondary:hover,
.button-ghost:hover,
.button-danger:hover {
    filter: brightness(1.18);
    box-shadow: 0 5px 14px rgba(0, 0, 0, .14);
}

.button:focus-visible {
    box-shadow: 0 0 0 4px rgba(0, 113, 227, .2);
}

.button[disabled] {
    color: #fff;
    background: var(--navy-900);
}

/* Client RSA key generator dialog. The generated private key never leaves the page. */
.key-generator-modal {
    width: min(760px, calc(100vw - 32px));
    max-height: min(88vh, 820px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--ink-900);
    border: 1px solid rgba(210, 210, 215, .95);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .23);
}

.key-generator-modal[open] {
    display: flex;
    flex-direction: column;
}

.key-generator-modal::backdrop {
    background: rgba(17, 17, 19, .42);
    backdrop-filter: blur(4px);
}

.key-generator-modal-head,
.key-generator-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
}

.key-generator-modal-head {
    border-bottom: 1px solid #e5e5ea;
}

.key-generator-modal-head h3,
.key-generator-modal-head p {
    margin: 0;
}

.key-generator-modal-head h3 {
    font-size: 18px;
    letter-spacing: -.02em;
}

.key-generator-modal-head p {
    margin-top: 4px;
    color: var(--ink-500);
    font-size: 12px;
}

.key-generator-modal-body {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    gap: 16px;
    padding: 20px 22px;
    overflow-y: auto;
}

.key-generator-modal-body .callout {
    font-size: 12px;
    line-height: 1.7;
}

.key-generator-modal-body .textarea {
    min-height: 130px;
    resize: vertical;
}

.key-generator-modal-body .field:last-child .textarea {
    min-height: 170px;
}

.key-generator-modal-foot {
    justify-content: flex-end;
    border-top: 1px solid #e5e5ea;
    background: #fbfbfd;
}

@media (max-width: 620px) {
    .key-generator-modal-head,
    .key-generator-modal-foot {
        align-items: stretch;
        flex-direction: column;
    }

    .key-generator-modal-foot .button,
    .key-generator-modal-body .row-actions .button {
        width: 100%;
    }
}

/* Focused sign-in screen: a fluid light field keeps the form in focus. */
.login-page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    grid-template-columns: 1fr;
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 113, 227, .12), transparent 27%),
        radial-gradient(circle at 86% 78%, rgba(90, 200, 250, .16), transparent 30%),
        radial-gradient(circle at 70% 10%, rgba(175, 82, 222, .09), transparent 24%),
        #fff;
}

.login-page::before,
.login-page::after {
    position: absolute;
    z-index: -1;
    width: 48vw;
    height: 48vw;
    content: "";
    border-radius: 48% 52% 63% 37% / 42% 39% 61% 58%;
    filter: blur(34px);
    opacity: .55;
    pointer-events: none;
}

.login-page::before {
    top: -22vw;
    left: -12vw;
    background: linear-gradient(135deg, rgba(0, 113, 227, .2), rgba(90, 200, 250, .08));
    animation: login-fluid-a 18s ease-in-out infinite alternate;
}

.login-page::after {
    right: -13vw;
    bottom: -24vw;
    background: linear-gradient(135deg, rgba(175, 82, 222, .12), rgba(0, 113, 227, .15));
    animation: login-fluid-b 22s ease-in-out infinite alternate;
}

@keyframes login-fluid-a {
    from { transform: translate3d(0, 0, 0) rotate(-12deg) scale(1); }
    to { transform: translate3d(8vw, 5vh, 0) rotate(18deg) scale(1.15); }
}

@keyframes login-fluid-b {
    from { transform: translate3d(0, 0, 0) rotate(12deg) scale(1.05); }
    to { transform: translate3d(-7vw, -6vh, 0) rotate(-16deg) scale(1.18); }
}

.login-panel {
    width: min(100%, 560px);
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(28px, 7vw, 76px) 28px;
    background: transparent;
}

.login-card {
    position: relative;
    z-index: 1;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid #e5e5ea;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.login-brand { margin-bottom: 42px; }
.login-tagline {
    margin: 0 0 30px;
    color: var(--ink-900);
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1.18;
}
.login-aside { display: none; }

@media (prefers-reduced-motion: reduce) {
    .login-page::before,
    .login-page::after { animation: none; }
}

/* Refined sign-in composition: restrained type, compact measure, quiet depth. */
.login-page {
    background:
        radial-gradient(ellipse 60% 46% at 8% 8%, rgba(0, 113, 227, .08), transparent 70%),
        radial-gradient(ellipse 55% 48% at 94% 92%, rgba(90, 200, 250, .1), transparent 72%),
        #fff;
}

.login-panel {
    width: min(100%, 500px);
    padding: 32px 24px;
}

.login-card {
    padding: 42px 40px 40px;
    border: 1px solid rgba(210, 210, 215, .72);
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .09), 0 3px 12px rgba(0, 0, 0, .035);
    backdrop-filter: blur(24px) saturate(135%);
}

.login-brand {
    gap: 11px;
    margin-bottom: 50px;
}

.login-brand .brand-mark,
.login-brand .brand-mark svg {
    width: 36px;
    height: 36px;
}

.login-brand strong {
    font-size: 16px;
    letter-spacing: -.02em;
}

.login-tagline {
    margin-bottom: 36px;
    font-size: clamp(28px, 5vw, 36px);
    letter-spacing: -.055em;
}

.login-card .field { margin-bottom: 20px; }
.login-card .field label { margin-bottom: 8px; color: var(--ink-700); font-size: 12px; }
.login-card .input { height: 48px; padding: 0 14px; border-color: #d2d2d7; border-radius: 12px; }
.login-card .input::placeholder { color: #a1a1a6; }
.login-submit { min-height: 48px; margin-top: 10px; font-size: 14px; }
.login-card .alert { margin-bottom: 22px; border-radius: 11px; }

@media (max-width: 520px) {
    .login-panel { padding: 18px; }
    .login-card { padding: 32px 24px 28px; border-radius: 18px; }
    .login-brand { margin-bottom: 40px; }
}

/* Balanced authentication stage: message left, borderless form right. */
.login-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-aside {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: clamp(48px, 8vw, 128px);
    color: var(--ink-900);
    background: transparent;
}

.login-aside::before,
.login-aside::after { display: none; }

.login-hero-title {
    width: min(560px, 100%);
    margin: 0;
    font-size: clamp(48px, 5.6vw, 84px);
    font-weight: 700;
    letter-spacing: -.065em;
    line-height: .98;
}

.login-hero-title > span { display: block; }
.login-hero-title > span + span {
    display: flex;
    gap: .42em;
    margin-top: .24em;
}
.login-hero-title b { font: inherit; }
.login-hero-title b:first-child { color: var(--green-600); }
.login-hero-title b:last-child { color: var(--blue-600); }

.login-panel {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    padding: clamp(36px, 7vw, 96px);
}

.login-card {
    width: min(420px, 100%);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.login-card .login-brand .brand-mark,
.login-card .login-brand .brand-mark svg {
    width: 43px;
    height: 43px;
}

.login-card .login-brand strong { font-size: 19px; }

@media (max-width: 820px) {
    .login-page {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: 100vh;
    }
    .login-aside {
        display: flex;
        grid-column: 1;
        grid-row: 2;
        min-height: auto;
        justify-content: flex-start;
        padding: 44px 28px 10px;
    }
    .login-hero-title { width: 100%; font-size: clamp(38px, 12vw, 58px); }
    .login-panel {
        grid-column: 1;
        grid-row: 1;
        min-height: auto;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 40px 28px 56px;
    }
    .login-card { width: 100%; }
}

/* Keep header, body and footer on one shared content rail. */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    padding-left: 0;
}
.sidebar { grid-column: 1; }
.topbar, .footer { display: none !important; }
.app-content { grid-column: 2; min-width: 0; width: 100%; min-height: 100vh; margin: 0; padding-top: 42px; }

@media (max-width: 820px) {
    .app-shell { display: block; }
    .app-content { width: 100%; min-height: 100vh; padding-top: 28px; }
    .sidebar { background: rgba(250, 250, 252, .98); box-shadow: 14px 0 40px rgba(0, 0, 0, .12); }
}

.callback-debug-list {
    display: grid;
}

.callback-debug-item {
    border-bottom: 1px solid #e5e5ea;
}

.callback-debug-item:last-child {
    border-bottom: 0;
}

.callback-debug-item > summary {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 22px;
    cursor: pointer;
    list-style: none;
}

.callback-debug-item > summary::-webkit-details-marker {
    display: none;
}

.callback-debug-item > summary::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--ink-500);
    font-size: 20px;
}

.callback-debug-item[open] > summary::after {
    content: "−";
}

.callback-debug-item > summary:hover {
    background: #fbfbfd;
}

.callback-debug-summary-main,
.callback-debug-summary-meta,
.callback-debug-target,
.callback-debug-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.callback-debug-summary-meta {
    margin-left: auto;
    color: var(--ink-500);
    font-size: 12px;
    white-space: nowrap;
}

.callback-debug-content {
    padding: 0 22px 22px;
}

.callback-debug-target {
    min-width: 0;
    margin-bottom: 14px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f5f5f7;
}

.callback-debug-target code {
    overflow: hidden;
    color: var(--ink-700);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.callback-debug-error {
    margin-bottom: 14px;
}

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

.callback-debug-grid > section {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    background: #fbfbfd;
}

.callback-debug-panel-head {
    justify-content: space-between;
    margin-bottom: 10px;
}

.callback-debug-panel-head h4 {
    margin: 0;
    font-size: 14px;
}

.callback-debug-panel-head span {
    color: var(--ink-500);
    font-size: 11px;
}

.callback-debug-headers {
    max-height: 92px;
    margin-bottom: 8px;
    padding: 10px 12px;
    color: #a8d6ff;
}

.callback-debug-body {
    min-height: 120px;
    max-height: 360px;
}

@media (max-width: 980px) {
    .callback-debug-grid { grid-template-columns: 1fr; }
    .callback-debug-item > summary { align-items: flex-start; flex-wrap: wrap; }
    .callback-debug-summary-meta { width: 100%; margin-left: 0; white-space: normal; }
}
