:root {
    --admin-bg: #ffffff;
    --admin-surface: #f7f8fa;
    --admin-surface-subtle: #fbfcfd;
    --admin-text: #20242a;
    --admin-muted: #69727d;
    --admin-border: #dfe3e8;
    --admin-border-strong: #c9cfd6;
    --admin-accent: #315f8f;
    --admin-accent-dark: #24496e;
    --admin-success: #2e6b4d;
    --admin-danger: #a13f3f;
    --admin-warning: #8a641f;
    --admin-radius: 5px;
    --admin-space-1: 4px;
    --admin-space-2: 8px;
    --admin-space-3: 12px;
    --admin-space-4: 16px;
    --admin-space-6: 24px;
    --admin-space-8: 32px;
    --admin-content-width: 1120px;
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--admin-bg);
    color: var(--admin-text);
}

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

.admin-shell { min-height: 100vh; }
.admin-main {
    width: min(100% - 40px, var(--admin-content-width));
    margin: 0 auto;
}
.admin-nav { display: flex; align-items: center; gap: var(--admin-space-4); margin-left: auto; }
.admin-nav a { font-size: 14px; text-decoration: none; }
.admin-main { padding: 48px 0 64px; }
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--admin-space-6);
    margin-bottom: 32px;
}
.page-header h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -0.025em; }
.page-header p { margin: 8px 0 0; color: var(--admin-muted); }
.app-detail-header { align-items: center; margin: 0 -24px 40px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface); padding: 20px 24px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--admin-space-2); }

.section { margin-top: 40px; }
.section:first-child { margin-top: 0; }
.console-stack { display: flex; flex-direction: column; gap: var(--admin-space-8); }
.console-stack > .section { margin-top: 0; }
.console-stack--compact { gap: var(--admin-space-4); }
.console-form { display: flex; flex-direction: column; gap: var(--admin-space-4); }
.console-form--compact { gap: var(--admin-space-3); }
.console-field { display: flex; flex-direction: column; gap: 6px; }
.console-form-group { margin: 0; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); padding: 16px; }
.console-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.console-actions--inline { margin-top: 0; }
.console-actions--compact { gap: 8px; margin-top: 0; }
.console-actions > form { margin: 0; }
.console-choice-group { display: flex; flex-wrap: wrap; gap: 16px; }
.console-form-group > legend { margin-bottom: 10px; }
.console-form-group > .choice + .choice { margin-top: 8px; }
.console-form-group > .console-choice-group { margin-top: 8px; }
.table-wrap + .console-actions { margin-top: 20px; }
.section-header { border-bottom: 1px solid var(--admin-border); margin-bottom: 20px; padding-bottom: 10px; }
.section-header h2 { margin: 0; font-size: 17px; line-height: 1.3; }
.section-header p { margin: 5px 0 0; color: var(--admin-muted); font-size: 14px; }
.section-note { color: var(--admin-muted); font-size: 14px; }
.ses-component { display: grid; gap: 24px; }
.ses-component > * { margin-top: 0; }
.ses-component > .notice { order: 20; }
.ses-component > .ses-action-panel,
.ses-component > .ses-cloudflare-next,
.ses-component > [data-domain-verification-poll] { order: 40; }
.ses-component > .ses-resource-summary { order: 50; }
.ses-component > .ses-recovery { order: 60; }
.ses-component > .ses-next-step { order: 70; }
.ses-component-slot { margin: 0; }
.ses-component-slot--status { order: 20; }
.ses-component-slot--checklist { order: 30; }
.ses-component-slot--action { order: 40; }
.ses-component-slot--details { order: 50; }
.ses-component-slot--recovery { order: 60; }
.ses-component-slot--next { order: 70; }
.ses-component-slot > *:first-child { margin-top: 0; }
.ses-component-slot > *:last-child { margin-bottom: 0; }
.ses-component .section-header { margin-bottom: 0; }
.ses-action-panel {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface-subtle);
    padding: 20px 24px;
}
.ses-action-panel { background: #fff; }
.ses-action-panel > * { margin-top: 0; margin-bottom: 0; }
.ses-action-panel > * + * { margin-top: 16px; }
.ses-action-panel form { margin: 0; }
.ses-action-panel .button { margin-top: 4px; }
.ses-live-activity { border: 1px solid var(--admin-border); padding: 16px; background: #fafafa; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.ses-live-activity h3 { position: sticky; top: -16px; z-index: 1; margin: -16px -16px 12px; padding: 16px 16px 12px; background: #fafafa; font-size: 15px; }
.ses-live-activity ul, .ses-live-activity ol { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ses-live-step { color: var(--admin-muted); }
.ses-live-step--running { color: #8a5a00; font-weight: 600; }
.ses-live-step--waiting { color: #5c4d8a; font-weight: 600; }
.ses-live-step--complete { color: #236b45; font-weight: 600; }
.ses-live-step--failed { color: #9b2c2c; font-weight: 600; }
.ses-live-activity[hidden] { display: none; }
.ses-standalone-page { display: grid; gap: 20px; }
.ses-standalone-nav { display: flex; flex-wrap: wrap; gap: 14px; border-bottom: 1px solid var(--admin-border); padding: 0 0 10px; }
.ses-standalone-nav a { color: var(--admin-muted); font-size: 14px; text-decoration: none; }
.ses-standalone-nav a:hover, .ses-standalone-nav a.is-active { color: var(--admin-primary); font-weight: 600; }
.ses-standalone-status { display: flex; align-items: baseline; gap: 10px; border: 1px solid var(--admin-border); border-left: 4px solid var(--admin-border-strong); border-radius: 6px; background: var(--admin-surface); padding: 13px 16px; }
.ses-standalone-status--complete { border-left-color: var(--admin-success); }
.ses-standalone-status--running, .ses-standalone-status--waiting { border-left-color: #b58220; }
.ses-standalone-status--failed { border-left-color: #9b2c2c; }
.ses-standalone-status--action { border-left-color: var(--admin-primary); }
.ses-standalone-status span { color: var(--admin-muted); }
.ses-standalone-activity { border: 1px solid var(--admin-border); border-radius: 6px; background: #fafafa; padding: 14px 16px; }
.ses-standalone-activity h2 { margin: 0 0 10px; font-size: 15px; }
.ses-standalone-activity ul { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ses-standalone-activity li { display: flex; justify-content: space-between; gap: 16px; color: var(--admin-muted); font-size: 14px; }
.ses-standalone-activity li strong { font-weight: 600; }
.ses-standalone-activity .ses-live-step--complete strong { color: var(--admin-success); }
.ses-standalone-activity .ses-live-step--failed strong { color: #9b2c2c; }
.ses-standalone-page > .ses-component { margin: 0; }
.ses-readiness-steps { display: grid; gap: 16px; }
.ses-readiness-step { padding: 20px; }
.ses-readiness-step__heading { display: flex; align-items: flex-start; gap: 12px; }
.ses-readiness-step__heading h3 { margin: 0; font-size: 16px; }
.ses-readiness-step__heading p { margin: 5px 0 0; color: var(--admin-muted); }
.ses-readiness-step__number { display: inline-grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border: 1px solid var(--admin-border-strong); border-radius: 50%; color: var(--admin-primary); font-weight: 700; }
.ses-readiness-step .field { max-width: 620px; }
.ses-readiness-step .section-header { margin-bottom: 16px; }
.ses-readiness-step .notice, .ses-readiness-step .section-note { margin-left: 38px; }
.ses-readiness-step form { margin-left: 38px; }
.ses-readiness-step form + form { margin-top: 12px; }
.ses-readiness-step .button { margin-top: 4px; }
.ses-next-step { margin-top: 20px; border-top: 1px solid var(--admin-border); padding-top: 20px; }
.ses-next-step .notice { margin-bottom: 10px; }
.ses-poll-indicator { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: ses-poll-spin .8s linear infinite; }
@keyframes ses-poll-spin { to { transform: rotate(360deg); } }
.ses-preview-screen { display: grid; gap: 10px; margin: 28px 0 0; }
.ses-preview-state { margin: 0; color: var(--admin-muted); font-size: 13px; }
.ses-recovery { border-top: 1px solid var(--admin-border); padding-top: 16px; }
.ses-recovery > summary { cursor: pointer; color: var(--admin-muted); font-size: 14px; font-weight: 600; }
.ses-recovery[open] > summary { margin-bottom: 16px; }
.ses-recovery-context { display: grid; gap: 16px; margin-bottom: 24px; padding: 20px 24px; border: 1px solid var(--admin-border); border-radius: 8px; background: var(--admin-surface-subtle); }
.ses-recovery-context__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ses-recovery-context__header h2 { margin: 0; font-size: 17px; }
.ses-recovery-context__header p { margin: 5px 0 0; color: var(--admin-muted); font-size: 14px; }
.ses-recovery-context__state { margin: 0; color: var(--admin-muted); font-size: 14px; }
.ses-recovery-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.ses-recovery-nav__link { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 12px; border: 1px solid var(--admin-border); border-radius: 6px; color: var(--admin-text); background: #fff; text-decoration: none; font-size: 14px; }
.ses-recovery-nav__link:hover, .ses-recovery-nav__link--active { border-color: var(--admin-primary); color: var(--admin-primary); }
.ses-recovery-nav__link--active { box-shadow: inset 0 -2px 0 var(--admin-primary); font-weight: 600; }
.ses-recovery-activity { margin: 0; background: #fff; }
.ses-verification-poll-form { display: none; }
.ses-verification-title { display: flex; align-items: center; gap: 10px; }
.ses-activity-indicator { width: 10px; height: 10px; flex: 0 0 10px; border: 2px solid #b58220; border-top-color: transparent; border-radius: 50%; animation: ses-verification-spin 1s linear infinite; }
@keyframes ses-verification-spin { to { transform: rotate(360deg); } }
.ses-unified-running .ses-preparation-form, .ses-unified-running .setup-instructions { display: none; }
.ses-next-step {
    border-top: 1px solid var(--admin-border);
    padding-top: 24px;
}
.ses-next-step > * { margin-top: 0; margin-bottom: 0; }
.ses-next-step > * + * { margin-top: 14px; }
.ses-production-request { border-top: 1px solid var(--admin-border); padding-top: 20px; }
.ses-production-request .button { margin-top: 0; }
.ses-production-acknowledgement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 22px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-surface-subtle);
    cursor: pointer;
    line-height: 1.45;
}
.ses-production-acknowledgement input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: var(--admin-accent);
}
.ses-production-acknowledgement span { flex: 1; }
.ses-resource-summary { display: grid; gap: 8px; }
.ses-resource-summary p { margin: 0; }
.ses-support-summary > summary { padding: 2px 0; }
.ses-support-summary__body {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    border-top: 1px solid var(--admin-border);
    padding: 18px 20px;
    background: var(--admin-surface-subtle);
}
.ses-support-summary__body .ses-resource-summary { gap: 12px; }
.ses-support-summary__actions { margin: 0; }
.ses-preparation-form .form-grid { margin-bottom: 20px; }
.ses-preparation-form .field-full { grid-column: 1 / -1; }
.ses-unified-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ses-unified-steps li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--admin-border); padding: 10px 0; }
.ses-unified-steps strong { color: var(--admin-muted); font-weight: 600; }
.ses-unified-steps .ses-step-complete { color: var(--admin-success); }

.notice {
    border-left: 3px solid var(--admin-border-strong);
    background: var(--admin-surface);
    margin: var(--admin-space-3) 0 var(--admin-space-6);
    padding: 10px 14px;
}
.notice-success { border-left-color: var(--admin-success); }
.notice-error { border-left-color: var(--admin-danger); }
.notice-info { border-left-color: var(--admin-accent); background: #f4f8fc; }
.notice-warning { border-left-color: var(--admin-warning); background: #fff9ed; }

html.admin-scroll-restore-pending body { visibility: hidden; }

.notice-flash {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
    width: min(420px, calc(100vw - 48px));
    margin: 0;
    border: 1px solid var(--admin-border);
    border-left: 4px solid var(--admin-success);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(23, 32, 42, .18);
    padding: 14px 44px 14px 16px;
    animation: admin-toast-in .18s ease-out;
    transition: opacity .18s ease, transform .18s ease;
}
.notice-flash.is-dismissing { opacity: 0; transform: translateY(8px); }
.notice-dismiss {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 30px;
    min-height: 30px;
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    padding: 0;
    transform: translateY(-50%);
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}
.notice-dismiss:hover { border: 0; background: var(--admin-surface); color: var(--admin-text); }

@keyframes admin-toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .notice-flash { animation: none; transition: none; }
}

@media (max-width: 520px) {
    .notice-flash { right: 14px; bottom: 14px; width: calc(100vw - 28px); }
}


.data-table { width: 100%; border-collapse: collapse; }
.data-table th,
.data-table td { border-bottom: 1px solid var(--admin-border); padding: 13px 12px; text-align: left; vertical-align: top; }
.data-table th { color: var(--admin-muted); font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.data-table td { font-size: 14px; }
.data-table th:first-child,
.data-table td:first-child { padding-left: 0; }
.data-table th:last-child,
.data-table td:last-child { padding-right: 0; }
.data-table tr:last-child td { border-bottom: 0; }
.row-disabled { opacity: .72; }
.table-wrap { overflow-x: auto; }
.table-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 12px; white-space: nowrap; }
.table-actions__main { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 12px; }
.table-actions__danger { flex: 0 0 auto; border-left: 1px solid var(--admin-border); padding-left: 12px; }
.table-icon-action { display: inline-grid; width: 32px; height: 32px; box-sizing: border-box; place-items: center; border: 1px solid transparent; border-radius: 5px; color: var(--admin-accent); }
.table-icon-action:hover { border-color: #b8c9da; background: #eaf1f7; color: var(--admin-accent-dark); }
.table-icon-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.table-icon-action.action-danger { color: var(--admin-danger); }
.table-icon-action.action-danger:hover { border-color: #d5a7a7; background: #fff1f1; color: var(--admin-danger); }
.app-secret-count, .app-updated { white-space: nowrap; }
.button-link { min-height: auto; border: 0; background: transparent; color: var(--admin-accent); padding: 0; }
.button-link:hover { border: 0; background: transparent; color: var(--admin-accent-dark); }
.button-link.table-icon-action:not(.action-danger):hover { border: 1px solid #6f97bd; background: #d9e7f3; box-shadow: 0 0 0 2px rgba(49, 95, 143, .12); color: var(--admin-accent-dark); }
.button-link.table-icon-action.action-danger:hover { border: 1px solid #b66b6b; background: #f3d5d5; box-shadow: 0 0 0 2px rgba(161, 63, 63, .12); color: var(--admin-danger); }
.action-danger { color: var(--admin-danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.empty-state { margin-top: 40px; padding: 56px 24px; border-top: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); text-align: center; }
.empty-state h2 { margin: 0; font-size: 20px; }
.empty-state p { margin: 8px 0 20px; color: var(--admin-muted); }

.mailbox-workspace { border: 1px solid var(--admin-border); background: #fff; }
.mail-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; border-bottom: 1px solid var(--admin-border); padding: 12px 16px; }
.mail-toolbar select { width: auto; min-width: 180px; }
.mail-toolbar input { width: min(520px, 44vw); }
.mail-inbox { display: grid; grid-template-columns: minmax(360px, 400px) minmax(0, 1fr); gap: 0; height: 100%; min-height: 0; align-items: stretch; }
.mail-inbox-list { min-width: 0; min-height: 0; overflow: auto; border-right: 1px solid var(--admin-border); }
.mail-list { display: grid; }
.mail-item { display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid var(--admin-border); padding: 14px 12px; color: var(--admin-text); text-decoration: none; }
.mail-item:hover, .mail-item.is-selected { background: var(--admin-surface); color: var(--admin-text); }
.mail-item.is-selected { border-left: 3px solid var(--admin-accent); padding-left: 9px; }
.mail-item-subject { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-meta, .mail-item-address { color: var(--admin-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-inbox-detail { min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.mail-preview { display: flex; width: 100%; height: 100%; min-width: 0; min-height: 0; flex-direction: column; background: #fff; }
.mail-preview-header { position: relative; padding: 16px 72px 12px 24px; }
.mail-preview-header h2 { margin: 0 0 12px; padding-right: 12px; font-size: 22px; overflow-wrap: anywhere; }
.mail-meta { display: grid; grid-template-columns: 74px 1fr; margin: 0; }
.mail-meta dt, .mail-meta dd { margin: 0; padding: 2px 0; overflow-wrap: anywhere; }
.mail-meta dt { color: var(--admin-muted); font-size: 13px; }
.mail-meta dd { font-size: 14px; }
.mail-meta-actions { position: absolute; top: 14px; right: 20px; }
.mail-delete-form { margin: 0; }
.mail-delete-button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--admin-danger); padding: 0; cursor: pointer; }
.mail-delete-button svg { width: 18px; height: 18px; fill: currentColor; }
.mail-delete-button:hover { border-color: #e7b8b8; background: #fff3f3; color: #a82424; }
.mail-delete-button:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: 2px; }
.mail-tabs { display: flex; gap: 18px; border-top: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); padding: 0 24px; background: #fff; }
.mail-tab { border-bottom: 2px solid transparent; padding: 11px 0 9px; color: var(--admin-muted); font-size: 14px; text-decoration: none; }
.mail-tab:hover, .mail-tab.is-active { border-bottom-color: var(--admin-accent); color: var(--admin-accent-dark); }
.mail-preview-canvas { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; border-bottom: 1px solid var(--admin-border); background: #eef1f4; padding: 16px 24px 10px; }
.mail-html-preview { display: block; width: 100%; height: 100%; min-height: 0; flex: 1 1 auto; border: 0; background: #fff; }
.mail-text-preview { min-height: 220px; max-height: 600px; margin: 0; background: #fff; }
.mail-empty, .mail-empty-body { padding: 40px 20px; color: var(--admin-muted); text-align: center; }
.mail-empty h2 { margin: 0; color: var(--admin-text); font-size: 18px; }
.mail-empty p { margin: 8px 0 0; }
.mail-empty-detail { border: 1px solid var(--admin-border); }
.sms-item .mail-item-address { color: var(--admin-muted); }
.sms-preview-header { padding-top: 14px; padding-bottom: 12px; }
.sms-preview-header h2 { margin-bottom: 3px; font-size: 18px; }
.sms-identity-time { margin: 0; color: var(--admin-muted); font-size: 13px; }
.sms-preview-canvas { display: flex; min-height: 0; flex: 1 1 auto; align-items: center; justify-content: center; overflow: auto; border-bottom: 1px solid var(--admin-border); background: #eef1f4; padding: 20px 24px 24px; }
.sms-phone { width: min(300px, 100%); min-height: 540px; border: 10px solid #17283b; border-radius: 34px; background: #17283b; box-shadow: 0 12px 28px rgba(10, 31, 52, .2); }
.sms-phone-speaker { width: 76px; height: 6px; margin: 4px auto 8px; border-radius: 99px; background: #506276; }
.sms-phone-screen { display: flex; min-height: 500px; flex-direction: column; border-radius: 24px; background: #f8fafc; padding: 18px 14px 16px; }
.sms-phone-sender { margin-bottom: auto; color: var(--admin-muted); font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.sms-bubble { align-self: flex-start; max-width: 92%; margin-top: 24px; border: 1px solid #cbd8e5; border-radius: 17px 17px 17px 5px; background: #e4f0fb; padding: 11px 13px; color: var(--admin-text); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.sms-phone-time { margin-top: 10px; color: var(--admin-muted); font-size: 11px; text-align: center; }
.sms-native-details { flex: 0 0 auto; border-top: 1px solid var(--admin-border); padding: 14px 24px 18px; }
.sms-native-details summary { color: var(--admin-accent); cursor: pointer; font-weight: 600; }
.sms-details-meta { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 16px 0 18px; }
.sms-details-meta dt, .sms-details-meta dd { margin: 0; padding: 3px 0; overflow-wrap: anywhere; }
.sms-details-meta dt { color: var(--admin-muted); font-size: 13px; }
.sms-details-meta dd { font-size: 14px; }
.sms-native-details h3 { margin: 0 0 8px; font-size: 14px; }
.sms-native-details .mail-text-preview { max-height: 280px; min-height: 0; margin-top: 12px; overflow: auto; }
.mail-attachments { border-top: 1px solid var(--admin-border); padding: 18px 24px; }
.mail-attachments h3 { margin: 0 0 10px; font-size: 15px; }
.attachment-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.attachment-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--admin-border); padding: 8px 0; }
.attachment-list li:last-child { border-bottom: 0; }
.attachment-list span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attachment-list small { color: var(--admin-muted); }

.mono, code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.mono, code { font-size: .92em; }
.code-block {
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-surface);
    margin: 20px 0;
    padding: 16px;
}
.setup-instructions { display: grid; gap: 16px; margin: 20px 0; padding-left: 22px; }
.setup-instructions li { padding-left: 4px; }
.setup-policy { margin-top: 12px; }
.setup-policy summary { color: var(--admin-accent); cursor: pointer; font-weight: 600; }
.setup-policy .code-block { margin: 12px 0 0; }
.s3-step { border-top: 1px solid var(--admin-border); margin-top: 24px; padding-top: 24px; }
.s3-step:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.s3-location { border: 1px solid var(--admin-border); border-radius: 8px; margin: 16px 0; padding: 18px; }
.s3-location__header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 14px; }
.s3-location__header h3 { margin: 0; }
.s3-permissions { border: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 16px 0 0; padding: 0; }
.s3-permissions legend { font-weight: 650; margin-bottom: 10px; width: 100%; }
.s3-ready-card, .s3-provisioning-card { background: #fff; border: 1px solid var(--admin-border); border-radius: 8px; padding: 24px; }
.s3-ready-card .section-header { margin-bottom: 18px; }
.s3-ready-card .setup-policy { border-top: 1px solid var(--admin-border); margin-top: 18px; padding-top: 18px; }
.s3-summary { border-top: 1px solid var(--admin-border); margin: 18px 0 0; }
.s3-summary > div { border-bottom: 1px solid var(--admin-border); display: grid; gap: 16px; grid-template-columns: 180px 1fr; padding: 14px 0; }
.s3-summary dt { color: var(--admin-muted); }
.s3-summary dd { margin: 0; }
.s3-review { background: var(--admin-surface-subtle); border-radius: 8px; padding: 18px; }
.s3-review-row { border-bottom: 1px solid var(--admin-border); display: flex; gap: 16px; justify-content: space-between; padding: 10px 0; }
.s3-review-row:last-child { border-bottom: 0; }
.s3-review-row span { color: var(--admin-muted); }
.s3-recovery-options { display: grid; gap: 8px; margin: 12px 0 20px; padding-left: 22px; }
.s3-recovery form > .button { margin-top: 20px; }
.s3-management-actions { margin-top: 24px; }
.setup-credential-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.setup-credential-form .field { margin-bottom: 0; }
.setup-credential-form > .button { grid-column: 1 / -1; justify-self: start; }

.badge {
    display: inline-block;
    border: 1px solid var(--admin-border-strong);
    border-radius: 999px;
    padding: 2px 8px;
    color: var(--admin-muted);
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-active { border-color: #9bc4ac; color: var(--admin-success); }
.badge-trial { border-color: #b8c9dd; color: var(--admin-accent-dark); }
.badge-warning { border-color: #e8d4a4; color: #765b20; }
.badge-error { border-color: #e2aaaa; color: var(--admin-danger); }
.badge-muted { border-color: var(--admin-border); color: var(--admin-muted); }
.badge-disabled { border-color: #d5a7a7; color: var(--admin-danger); }
.badge-ed25519 { border-color: #a9bfd7; color: var(--admin-accent-dark); }

.operations-catalog { margin-top: 32px; }
.operations-catalog > .section-header > .button,
.operations-addons > .section-header > .button { margin-top: 16px; }
.operations-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.operations-detail-grid div { display: grid; gap: 5px; border-bottom: 1px solid var(--admin-border); padding-bottom: 12px; }
.operations-detail-grid strong { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.operations-detail-grid span { color: var(--admin-muted); font-size: 13px; }
.operations-plan-groups { display: grid; gap: 30px; }
.operations-plan-group { border: 1px solid var(--admin-border); border-radius: 10px; background: var(--admin-surface-subtle); padding: 22px; }
.operations-plan-group__heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.operations-plan-group__heading h3 { margin: 2px 0 0; font-size: 20px; line-height: 1.2; }
.operations-plan-group__heading > span { color: var(--admin-muted); font-size: 13px; }
.operations-eyebrow { color: var(--admin-accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.operations-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.operations-plan-card { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; padding: 18px; box-shadow: 0 2px 8px rgba(32, 36, 42, .04); }
.operations-plan-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.operations-plan-card h3 { margin: 0 0 5px; font-size: 16px; line-height: 1.25; }
.operations-plan-card code { color: var(--admin-muted); font-size: 12px; }
.operations-status { border: 1px solid var(--admin-border-strong); border-radius: 999px; padding: 3px 8px; color: var(--admin-muted); font-size: 11px; line-height: 1.2; white-space: nowrap; }
.operations-status--active { border-color: #9bc4ac; background: #f4fbf6; color: var(--admin-success); }
.operations-status--error { border-color: #d5a7a7; background: #fff8f8; color: var(--admin-danger); }
.operations-plan-card__price { display: flex; align-items: baseline; gap: 6px; margin: 22px 0 16px; }
.operations-plan-card__price strong { font-size: 25px; letter-spacing: -.025em; }
.operations-plan-card__price span { color: var(--admin-muted); font-size: 13px; }
.operations-plan-card__stats { display: grid; gap: 10px; border-top: 1px solid var(--admin-border); padding-top: 14px; }
.operations-plan-card__stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.operations-plan-card__stats strong { font-size: 14px; }
.operations-plan-card__stats span { color: var(--admin-muted); font-size: 12px; text-align: right; }
.operations-plan-card__provider-row { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.operations-plan-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.operations-plan-card__actions form { margin: 0; }
.operations-plan-card__actions form,
.operations-detail-grid + .console-actions > form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.operations-account-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.operations-account-search label { display: grid; flex: 1 1 420px; gap: 6px; color: var(--admin-text); font-weight: 600; }
.operations-account-search button { flex: 0 0 auto; }
.operations-apps-page-header { align-items: end; }
.operations-apps-page-header .operations-account-search { flex: 0 1 560px; }
.operations-apps-table td { vertical-align: middle; }
.operations-app-id { font-weight: 650; overflow-wrap: anywhere; }
.operations-app-secondary { display: block; margin-top: 4px; color: var(--admin-muted); font-size: 12px; line-height: 1.35; }
.operations-app-muted { color: var(--admin-muted); }
.operations-app-detail-header { display: block; margin-bottom: 20px; }
.operations-app-detail-header h1 { overflow-wrap: anywhere; }
.operations-app-detail-status { display: flex; align-items: center; gap: 6px; margin-top: 10px !important; }
.operations-app-detail-header > div > p:last-child { margin-top: 14px; font-size: 16px; font-weight: 650; }
.operations-app-summary { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 18px; margin-bottom: 34px; border-top: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); padding: 16px 0; }
.operations-app-summary div { display: grid; gap: 4px; min-width: 0; }
.operations-app-summary span { color: var(--admin-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.operations-app-summary strong { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.operations-app-section { margin-top: 32px; border-top: 1px solid var(--admin-border); padding-top: 22px; }
.operations-app-section h2 { margin: 0 0 14px; font-size: 18px; line-height: 1.3; }
.operations-app-section p { margin: 0 0 10px; }
.operations-app-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.operations-app-chip { border: 1px solid var(--admin-border-strong); border-radius: 999px; background: var(--admin-surface-subtle); padding: 4px 9px; color: var(--admin-text); font-size: 12px; line-height: 1.25; }
.operations-usage-summary { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 18px; margin: 0 0 16px; }
.operations-usage-summary div { display: grid; gap: 3px; }
.operations-usage-summary dt { color: var(--admin-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.operations-usage-summary dd { margin: 0; font-size: 15px; }
.operations-usage-summary__primary dd { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.operations-app-period { color: var(--admin-muted); font-size: 13px; }
.operations-app-period strong { color: var(--admin-text); margin-right: 8px; }
.operations-provider-table td:nth-child(2) { white-space: nowrap; }
.operations-technical-details { margin-top: 32px; border-top: 1px solid var(--admin-border); padding-top: 18px; }
.operations-technical-details summary { cursor: pointer; color: var(--admin-accent-dark); font-size: 14px; font-weight: 700; }
.operations-technical-details .operations-detail-grid { margin-top: 18px; }
.operations-overview-section { margin-top: 36px; }
.operations-overview-section:first-of-type { margin-top: 0; }
.operations-overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--admin-border); }
.operations-overview-metric { display: grid; gap: 3px; min-width: 0; border-bottom: 1px solid var(--admin-border); padding: 15px 0 16px; }
.operations-overview-metric > span { color: var(--admin-muted); font-size: 12px; }
.operations-overview-metric strong { font-size: 24px; letter-spacing: -.025em; line-height: 1.15; }
.operations-overview-metric a { color: var(--admin-text); text-decoration: none; }
.operations-overview-metric a:hover { color: var(--admin-accent-dark); }
.operations-overview-metric small { color: var(--admin-muted); font-size: 11px; }
.operations-overview-attention-list { border-top: 1px solid var(--admin-border); }
.operations-overview-attention-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--admin-border); padding: 13px 0; }
.operations-overview-attention-row div { display: grid; gap: 2px; min-width: 0; }
.operations-overview-attention-row div strong { font-size: 14px; }
.operations-overview-attention-row span { color: var(--admin-muted); font-size: 12px; }
.operations-overview-attention-row > strong,
.operations-overview-attention-row > a { color: var(--admin-text); font-size: 18px; line-height: 1; text-decoration: none; }
.operations-overview-attention-row > a:hover { color: var(--admin-accent-dark); }
.operations-overview-clear { margin: 0; border-top: 1px solid var(--admin-border); padding: 16px 0; color: var(--admin-muted); }
.operations-audit-filters { display: grid; grid-template-columns: minmax(150px, 180px) minmax(260px, 1fr) minmax(150px, 180px) auto; align-items: end; gap: 12px; margin-bottom: 24px; }
.operations-audit-filters label { display: grid; gap: 6px; color: var(--admin-muted); font-size: 12px; font-weight: 700; }
.operations-audit-filters select, .operations-audit-filters input { min-width: 0; width: 100%; }
.operations-audit-table td { vertical-align: middle; }
.operations-audit-table td:first-child { white-space: nowrap; }
.operations-audit-pagination { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.operations-search-results { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.operations-search-results li { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 14px; border: 1px solid var(--admin-border); border-radius: 6px; background: #fff; padding: 12px 14px; }
.operations-search-results li strong { min-width: 0; }
.operations-search-results li span { min-width: 0; overflow-wrap: anywhere; color: var(--admin-muted); font-size: 12px; }
.operations-search-results li .button { justify-self: end; }
.operations-account-secondary { display: block; margin-top: 5px; color: var(--admin-muted); font-size: 12px; }
.operations-subheading { margin: 24px 0 12px; font-size: 16px; }
.operations-accounts-table td { vertical-align: middle; }
.operations-plan-card__provider { color: var(--admin-muted); font-size: 12px; }
.operations-stripe-details { color: var(--admin-accent-dark); font-size: 11px; }
.operations-stripe-details summary { cursor: pointer; font-weight: 700; }
.operations-provider-ids { display: block; margin-top: 8px; color: var(--admin-muted); font-size: 10px; line-height: 1.5; }
.operations-current { color: var(--admin-success); font-size: 12px; font-weight: 700; white-space: nowrap; }
.operations-subscriber-summary { margin-top: 16px; border-top: 1px solid var(--admin-border); padding-top: 12px; }
.operations-subscriber-link, .operations-back-link { color: var(--admin-accent-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.operations-subscriber-link:hover, .operations-back-link:hover { text-decoration: underline; }
.operations-migration-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.operations-migration-panel form { display: flex; align-items: end; gap: 10px; min-width: min(100%, 560px); }
.operations-migration-panel label, .operations-migration-form label { display: grid; gap: 5px; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.operations-migration-panel select, .operations-migration-form select { min-width: 280px; border: 1px solid var(--admin-border); border-radius: 4px; padding: 9px 10px; background: #fff; color: var(--admin-text); font: inherit; font-size: 12px; }
.operations-subscriber-list { display: grid; gap: 12px; }
.operations-subscriber-card { border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; padding: 18px; }
.operations-subscriber-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.operations-subscriber-card__header h3 { margin: 0 0 5px; font-size: 16px; }
.operations-subscriber-card__header p { margin: 0; color: var(--admin-muted); font-size: 12px; }
.operations-subscriber-card__header-right { display: flex; align-items: center; gap: 12px; }
.operations-subscriber-select { display: flex; align-items: center; gap: 6px; color: var(--admin-muted); font-size: 11px; white-space: nowrap; }
.operations-subscriber-card__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; border-top: 1px solid var(--admin-border); padding-top: 16px; }
.operations-subscriber-card__grid div { display: grid; gap: 4px; min-width: 0; }
.operations-subscriber-card__grid strong { font-size: 11px; }
.operations-subscriber-card__grid span, .operations-subscriber-card__grid small { color: var(--admin-muted); font-size: 12px; }
.operations-migration-form { align-items: flex-end; flex-wrap: wrap; margin-top: 18px; border-top: 1px solid var(--admin-border); padding-top: 14px; }
.operations-pending-migration { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; border: 1px solid #e8d4a4; border-radius: 6px; background: #fffaf0; padding: 12px; color: #765b20; font-size: 12px; }
.operations-pending-migration form { margin: 0; }
.operations-subscriber-card .operations-stripe-details { margin-top: 14px; border-top: 1px solid var(--admin-border); padding-top: 12px; }
.operations-plan-card__error { margin: 14px 0 0; color: var(--admin-danger); font-size: 12px; }
.operations-plan-edit { margin-top: 14px; border-top: 1px solid var(--admin-border); padding-top: 12px; }
.operations-plan-edit summary { cursor: pointer; color: var(--admin-accent-dark); font-size: 12px; font-weight: 700; }
.operations-plan-edit form { margin-top: 12px; }
.operations-plan-edit__grid { display: grid; gap: 10px; }
.operations-plan-edit label { display: grid; gap: 5px; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.operations-plan-edit input, .operations-plan-edit select { box-sizing: border-box; width: 100%; border: 1px solid var(--admin-border); border-radius: 4px; padding: 7px 8px; background: #fff; color: var(--admin-text); font: inherit; font-size: 12px; }
.operations-plan-edit button { margin-top: 12px; }
.billing-current, .billing-additional-apps, .billing-invoices { margin-top: 22px; }
.billing-current__top, .billing-additional-apps, .billing-invoices .section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.billing-current__top h2, .billing-additional-apps h2, .billing-invoices h2 { margin: 4px 0 10px; }
.billing-current__top h2 { font-size: 24px; line-height: 1.25; }
.billing-current__top .eyebrow, .billing-team-access__top .eyebrow { margin: 0 0 10px; color: var(--admin-text); font-size: 26px; line-height: 1.2; font-weight: 700; }
.billing-current__top .eyebrow { font-size: 30px; }
.billing-highlight { margin: 24px 0; font-size: 17px; font-weight: 600; }
.billing-current__stats { display: flex; gap: 48px; margin: 26px 0; padding: 20px 0; border-top: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }
.billing-current__stats div { display: flex; flex-direction: column; gap: 4px; }
.billing-current__stats strong { font-size: 24px; }
.billing-current h2 small { color: var(--admin-muted); font-size: 13px; font-weight: 500; }
.billing-summary-line { margin: 0 0 18px; color: var(--admin-muted); }
.billing-pending { margin: 20px 0; border: 1px solid #e8d4a4; border-radius: 6px; background: #fffaf0; padding: 16px; color: #765b20; }
.billing-pending--operator { border-color: var(--admin-border); background: #f6f8fa; color: var(--admin-text); }
.billing-pending p { margin: 6px 0 0; }
.billing-pending .billing-inline-form { margin-top: 12px; }
.billing-current__stats span, .billing-usage__heading span { color: var(--admin-muted); }
.billing-usage__heading { display: flex; align-items: baseline; gap: 8px; font-size: 16px; }
.billing-usage__heading strong:last-child { margin-left: auto; }
.billing-usage__track { height: 9px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: var(--admin-border); }
.billing-usage__track span { display: block; height: 100%; border-radius: inherit; background: var(--admin-accent); }
.billing-plans { width: max-content; max-width: none; margin: 38px 0 0; }
.billing-capacity-section > .section-header h2, .billing-invoices > .section-header h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.3; }
.billing-capacity-section > .section-header h3, .billing-invoices > .section-header h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.billing-invoices > .section-header { display: block; }
.billing-plan-layout { display: grid; grid-template-columns: 980px 320px; gap: 14px; align-items: stretch; }
.billing-plan-group { min-width: 0; }
.billing-add-on-column { min-width: 0; border-left: 1px solid var(--admin-border-strong); padding-left: 14px; }
.billing-app-choice { margin: 12px 0 14px; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; padding: 14px 16px; }
.billing-capacity-controls { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(220px, 1.3fr); gap: 18px; align-items: end; }
.billing-capacity-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: var(--admin-muted); font-size: 13px; font-weight: 650; }
.billing-capacity-field select, .billing-capacity-field input { box-sizing: border-box; width: 100%; min-height: 38px; }
.billing-capacity-field--custom[hidden] { display: none; }
.billing-capacity-total strong { display: block; min-height: 38px; color: var(--admin-accent-dark); font-size: 15px; line-height: 38px; }
.billing-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.billing-comparison-column { display: flex; min-width: 0; min-height: 265px; flex-direction: column; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; padding: 22px; }
.billing-comparison-column h3 { margin: 4px 0 6px; font-size: 24px; }
.billing-comparison-description { min-height: 40px; margin: 0; color: var(--admin-muted); }
.billing-comparison-details { display: grid; gap: 8px; margin: 24px 0; border-top: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); padding: 18px 0; }
.billing-comparison-details > span { color: var(--admin-muted); }
.billing-comparison-price { margin-top: 8px; font-size: 25px; }
.billing-comparison-price em { color: var(--admin-muted); font-size: 13px; font-style: normal; font-weight: 400; }
.billing-plan-features { display: grid; gap: 7px; min-height: 78px; margin: 0 0 22px; padding: 0 0 0 18px; color: var(--admin-muted); font-size: 13px; line-height: 1.4; }
.billing-plan-features li:first-child { color: var(--admin-text); font-weight: 650; }
.billing-comparison-column .button { align-self: flex-start; }
.billing-current-label { color: var(--admin-muted); font-weight: 600; }
.billing-usage__details { margin-top: 18px; border-top: 1px solid var(--admin-border); padding-top: 14px; }
.billing-usage__details summary { cursor: pointer; color: var(--admin-accent-dark); font-size: 13px; font-weight: 650; }
.billing-app-usage { display: grid; gap: 8px; margin-top: 12px; }
.billing-app-usage div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: baseline; border-bottom: 1px solid var(--admin-border); padding: 8px 0; }
.billing-app-usage span, .billing-app-usage small { color: var(--admin-muted); }
.billing-app-usage small { font-size: 12px; }
.billing-additional-apps__form { display: flex; align-items: end; gap: 10px; }
.billing-additional-apps__form label { display: flex; flex-direction: column; gap: 6px; color: var(--admin-muted); font-size: 13px; }
.billing-additional-apps__form input { width: 110px; }
.billing-team-access { box-sizing: border-box; width: 100%; margin-top: 22px; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; padding: 22px; }
.billing-team-access__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.billing-team-access h2 { margin: 4px 0 8px; font-size: 26px; }
.billing-team-access__actions { display: flex; gap: 10px; align-items: center; }
.billing-team-form { align-items: flex-end; margin-top: 16px; }
.billing-team-form label { display: flex; flex-direction: column; gap: 6px; color: var(--admin-muted); font-size: 13px; }
.billing-team-form input { width: 110px; }
.billing-invoices .table-wrap { margin-top: 8px; }
.billing-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.billing-settings-section > .billing-settings-grid { margin-top: 0; }
.billing-capacity-section { margin-top: 36px; }
.billing-invoices { margin-top: 30px; }
.billing-capacity-section > .billing-team-access { margin-top: 18px; }
.billing-add-on-column > .billing-team-access { margin-top: 12px; background: var(--admin-surface); }
.billing-team-access__footer { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-top: 18px; }
.billing-team-access__footer .billing-team-form { margin-top: 0; }
.billing-settings-card { display: flex; min-width: 0; align-items: flex-end; justify-content: space-between; gap: 20px; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; padding: 20px; }
.billing-settings-card h2 { margin: 4px 0 6px; font-size: 18px; }
.billing-settings-card h2 span { display: block; margin-top: 5px; color: var(--admin-muted); font-size: 12px; font-weight: 500; }
.billing-settings-card p { margin: 0; color: var(--admin-muted); font-size: 13px; line-height: 1.45; }
.billing-control-card { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.billing-control-card h2 { margin: 4px 0 6px; font-size: 18px; }
.billing-control-card p { margin: 0; color: var(--admin-muted); font-size: 13px; }
.billing-quantity-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.billing-quantity-form label { display: block; margin-bottom: 8px; color: var(--admin-muted); font-size: 12px; font-weight: 650; }
.billing-quantity { display: inline-flex; align-items: center; border: 1px solid var(--admin-border-strong); border-radius: 6px; overflow: hidden; background: #fff; }
.billing-quantity button { width: 34px; height: 36px; border: 0; background: #f5f7fa; color: var(--admin-accent-dark); font: inherit; font-size: 20px; cursor: pointer; }
.billing-quantity button:hover { background: #eaf0f7; }
.billing-quantity input { box-sizing: border-box; width: 48px; height: 36px; border: 0; border-right: 1px solid var(--admin-border); border-left: 1px solid var(--admin-border); text-align: center; font: inherit; }
.billing-quantity input:focus, .billing-quantity button:focus-visible { outline: 2px solid var(--admin-accent); outline-offset: -2px; }
.billing-comparison-details small { color: var(--admin-muted); font-size: 12px; }
.billing-modal.billing-invoice-modal { width: min(1100px, calc(100% - 2rem)); }
.billing-invoice-modal iframe { display: block; width: 100%; height: min(62vh, 680px); margin-top: 16px; border: 1px solid var(--admin-border); background: #f5f7fa; }
.billing-invoice-modal .billing-modal__actions { justify-content: flex-end; }
.billing-modal[data-payment-method-modal="1"] .billing-payment-element { min-height: 52px; margin-top: 1.25rem; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; padding: 14px 16px; }
.billing-app-usage div strong { color: var(--admin-text); }
@media (max-width: 900px) { .billing-plans { width: 100%; } .billing-capacity-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } .billing-capacity-total { grid-column: 1 / -1; } .billing-plan-layout { grid-template-columns: 1fr; } .billing-add-on-column { border-top: 1px solid var(--admin-border-strong); border-left: 0; padding-top: 18px; padding-left: 0; } .billing-comparison { grid-template-columns: 1fr; } .billing-current__top, .billing-team-access__top, .billing-additional-apps, .billing-invoices .section-header, .billing-control-card { flex-direction: column; align-items: flex-start; } .billing-current__actions { align-items: stretch; flex-wrap: wrap; } .billing-additional-apps__form, .billing-team-form { align-items: stretch; flex-wrap: wrap; } .billing-settings-grid { grid-template-columns: 1fr; } .billing-settings-card { align-items: flex-start; flex-direction: column; } }
@media (max-width: 560px) { .billing-capacity-controls { grid-template-columns: 1fr; gap: 14px; } .billing-capacity-total { grid-column: auto; } }

.identity-list { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; margin: 0; }
.identity-list dt,
.identity-list dd { border-bottom: 1px solid var(--admin-border); margin: 0; padding: 11px 0; }
.identity-list dt { color: var(--admin-muted); font-size: 13px; }
.identity-list dd { overflow-wrap: anywhere; }
.identity-list dd:last-child,
.identity-list dt:nth-last-of-type(1) { border-bottom: 0; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.app-settings-primary-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(180px, 1fr); gap: 20px; }
.app-settings-primary-grid > form { display: contents; }
.app-settings-name-field .button { align-self: flex-start; margin-top: 6px; }
.app-settings-primary-grid .app-settings-save { grid-column: 1 / -1; justify-self: start; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field fieldset { border: 0; margin: 0; padding: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field legend { color: var(--admin-text); font-size: 14px; font-weight: 600; }
.field-help { color: var(--admin-muted); font-size: 13px; font-weight: 400; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--admin-border-strong);
    border-radius: var(--admin-radius);
    background: #fff;
    color: var(--admin-text);
    font: inherit;
    padding: 9px 10px;
}
select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px;
    background-color: #fff;
    background-image: url("/assets/img/select-chevron.svg?v=1");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
}
input, select { min-height: 40px; }
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 2px solid rgba(49, 95, 143, .35);
    outline-offset: 2px;
    border-color: var(--admin-accent);
}
.choice-group { display: flex; flex-wrap: wrap; gap: 16px; }
.app-capabilities-fieldset .choice-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
.choice { display: flex; align-items: center; gap: 7px; font-weight: 400 !important; }
.choice input, .confirm input { width: auto; min-height: auto; }
.advanced-options { margin-top: 12px; color: var(--admin-muted); font-size: 13px; }
.advanced-options summary { cursor: pointer; }
.advanced-options .choice { margin-top: 10px; color: var(--admin-text); font-size: 14px; }
.additional-scopes { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.additional-scopes code { color: var(--admin-muted); }
.confirm { display: flex; align-items: center; gap: 7px; color: var(--admin-muted); font-size: 13px; }

.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--admin-border-strong);
    border-radius: 6px;
    background: #fff;
    color: var(--admin-text);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    padding: 9px 16px;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.button:hover, button:hover { border-color: var(--admin-accent); background: var(--admin-surface); color: var(--admin-accent-dark); }
.button-primary { border-color: var(--admin-accent); background: var(--admin-accent); color: #fff; }
.button-primary:hover { border-color: var(--admin-accent-dark); background: var(--admin-accent-dark); color: #fff; }
.button-secondary { border-color: var(--admin-border-strong); background: #fff; color: var(--admin-text); }
.button-secondary:hover { border-color: var(--admin-accent); background: var(--admin-surface); color: var(--admin-accent-dark); }
.button-danger { border-color: #d5a7a7; background: #fff; color: var(--admin-danger); }
.button-danger:hover { border-color: var(--admin-danger); background: #fff8f8; color: var(--admin-danger); }
.button-subtle { min-height: auto; border-color: transparent; background: transparent; color: var(--admin-muted); padding-left: 0; padding-right: 0; }
.button-subtle:hover { border-color: transparent; background: transparent; color: var(--admin-accent-dark); }
.button.is-submitting, button.is-submitting { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button.is-submitting::before, button.is-submitting::before { content: ''; width: 1em; height: 1em; flex: 0 0 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: admin-submit-spin .75s linear infinite; }
.button:disabled, button:disabled { cursor: not-allowed; opacity: .58; }

@keyframes admin-submit-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .button.is-submitting::before, button.is-submitting::before { animation-duration: 1.5s; }
}

.delete-app-page { width: 100%; margin: 0; }
.delete-app-page .notice-error { width: min(100%, 880px); margin: 0 auto 24px; }
.delete-app-page .delete-app-header { align-items: center; margin-bottom: 40px; }
.delete-app-page .delete-app-header--with-notice { margin-bottom: 24px; }
.delete-app-page .delete-app-header h1 { font-size: 26px; }
.delete-app-panel { width: min(100%, 880px); margin: 0 auto; border: 1px solid #d5a7a7; border-radius: 8px; background: #fff; padding: 28px 32px 32px; }
.delete-app-intro { margin: 0 0 28px; color: var(--admin-muted); }
.delete-app-form .field { margin-bottom: 24px; }
.delete-app-confirmation { margin: 4px 0 28px; border: 1px solid #ead5d5; border-radius: 6px; background: #fff8f8; padding: 14px 16px 12px; }
.delete-app-confirmation .confirm { align-items: flex-start; color: var(--admin-text); font-size: 14px; line-height: 1.45; }
.delete-app-confirmation .confirm input { flex: 0 0 auto; margin-top: 3px; }
.delete-app-confirmation .section-note { margin: 9px 0 0 25px; font-size: 13px; }
.delete-app-actions { display: flex; justify-content: flex-end; border-top: 1px solid var(--admin-border); padding-top: 24px; }
.delete-app-actions .button-danger { background: #fff8f8; }

.credential-group { border-top: 1px solid var(--admin-border); padding: 18px 0 4px; }
.credential-group__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.provider-retrieval-toggle { margin: -2px 0 6px; }
.provider-retrieval-toggle label { display: inline-flex; align-items: center; gap: 9px; color: var(--admin-muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.provider-retrieval-switch { position: relative; display: inline-flex; width: 34px; height: 20px; flex: 0 0 auto; }
.provider-retrieval-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.provider-retrieval-switch__track { display: block; width: 34px; height: 20px; border: 1px solid var(--admin-border-strong); border-radius: 999px; background: #e9edf1; transition: background .15s ease, border-color .15s ease; }
.provider-retrieval-switch__thumb { display: block; width: 14px; height: 14px; margin: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(16 38 63 / 25%); transition: transform .15s ease; }
.provider-retrieval-switch input:checked + .provider-retrieval-switch__track { border-color: var(--admin-accent); background: var(--admin-accent); }
.provider-retrieval-switch input:checked + .provider-retrieval-switch__track .provider-retrieval-switch__thumb { transform: translateX(14px); }
.provider-retrieval-switch input:focus-visible + .provider-retrieval-switch__track { outline: 2px solid color-mix(in srgb, var(--admin-accent) 35%, transparent); outline-offset: 2px; }
.provider-retrieval-help { position: relative; display: inline-flex; margin-left: 6px; }
.provider-retrieval-help__button { display: inline-grid; width: 16px; min-width: 16px; height: 16px; min-height: 16px; place-items: center; border: 1px solid var(--admin-border-strong); border-radius: 50%; background: #fff; padding: 0; color: var(--admin-muted); font-size: 11px; font-weight: 700; line-height: 1; cursor: help; }
.provider-retrieval-help__button:hover, .provider-retrieval-help__button:focus-visible { border-color: var(--admin-accent); color: var(--admin-accent-dark); outline: 2px solid color-mix(in srgb, var(--admin-accent) 22%, transparent); outline-offset: 2px; }
.provider-retrieval-help__tooltip { position: absolute; z-index: 5; top: calc(100% + 9px); right: 0; width: 260px; visibility: hidden; opacity: 0; transform: translateY(-3px); transition: opacity .15s ease, transform .15s ease, visibility .15s ease; border: 1px solid var(--admin-border-strong); border-radius: 6px; background: var(--admin-text); padding: 9px 11px; color: #fff; font-size: 12px; font-weight: 450; line-height: 1.4; white-space: normal; pointer-events: none; }
.provider-retrieval-help__tooltip::before { content: ''; position: absolute; top: -5px; right: 5px; width: 8px; height: 8px; border-top: 1px solid var(--admin-border-strong); border-left: 1px solid var(--admin-border-strong); background: var(--admin-text); transform: rotate(45deg); }
.provider-retrieval-help:hover .provider-retrieval-help__tooltip, .provider-retrieval-help__button:focus-visible + .provider-retrieval-help__tooltip { visibility: visible; opacity: 1; transform: translateY(0); }
.provider-retrieval-toggle input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--admin-accent); }
.credential-group__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.credential-group h3 { margin: 0 0 6px; font-size: 16px; }
.credential-group h4 { margin: 18px 0 2px; color: var(--admin-muted); font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.credential-label { display: grid; gap: 4px; margin-bottom: 8px; }
.credential-label code { overflow-wrap: anywhere; color: var(--admin-muted); font-size: 13px; font-weight: 650; }
.credential-form { display: grid; min-width: 0; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 14px 0 18px; }
.credential-form .credential-label { grid-column: 1; margin-bottom: 0; }
.credential-input-wrap { position: relative; min-width: 0; grid-column: 2; }
.credential-input-wrap > input { width: 100%; min-width: 0; padding-right: 42px; }
.credential-reveal { position: absolute; top: 50%; right: 6px; display: grid; width: 30px; height: 30px; min-height: 30px; transform: translateY(-50%); place-items: center; border-radius: 4px; color: var(--admin-muted); padding: 0; }
.credential-reveal:hover { background: var(--admin-surface); color: var(--admin-accent); }
.credential-reveal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.credential-form > .button { grid-column: 3; }
.secret-row--managed { display: block; }
.credential-managed { display: grid; min-width: 0; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 0 12px; padding: 14px 0 18px; }
.credential-managed .credential-label { margin: 10px 0 0; }
.credential-managed__value { min-width: 0; }
.credential-managed__value input { width: 100%; min-width: 0; }
.credential-managed__value .section-note { margin: 8px 0 0; }
.console-status-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) 84px; align-items: center; gap: 16px; border-bottom: 1px solid var(--admin-border); padding: 14px 0; }
.console-status-row--complete { grid-template-columns: minmax(0, 1fr) auto; }
.console-status-row__status { color: var(--admin-muted); }
.console-status-row__complete { display: inline-grid; width: 25px; height: 25px; box-sizing: border-box; place-items: center; border: 1px solid #a7d0b7; border-radius: 50%; background: #f1f8f3; color: #18794e; font-size: 15px; font-weight: 800; line-height: 1; }
.ses-intent-choice { padding: 0 0 2px; }
.ses-intent-choice__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.ses-intent-choice__option { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--admin-border); border-radius: 8px; padding: 18px; color: var(--admin-text); text-decoration: none; }
.ses-intent-choice__option:hover { border-color: var(--admin-accent); background: var(--admin-surface-subtle); }
.ses-intent-choice__option strong { color: var(--admin-accent); }
.ses-intent-choice__option span { color: var(--admin-muted); line-height: 1.5; }
.app-detail-top-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; margin-top: 40px; }
.app-detail-top-layout__application, .app-detail-top-layout__provisioning { min-width: 0; align-self: start; }
.app-detail-settings-layout { margin-top: 40px; }
.app-detail-single-column { max-width: 960px; margin: 0 auto; }
.app-subpage-header { margin-inline: 0; margin-bottom: 24px; }
.sending-protection-summary { margin-top: 32px; padding: 16px 20px; }
.sending-protection-summary__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sending-protection-summary__heading h2 { margin: 0; font-size: 18px; }
.sending-protection-summary__status { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; color: var(--admin-muted); font-size: 14px; }
.sending-protection-summary__status strong { color: var(--admin-text); }
.sending-protection-page__content { display: grid; gap: 24px; }
.sending-protection-selector { margin-bottom: 24px; }
.sending-protection-selector__form { display: flex; align-items: end; gap: 16px; }
.sending-protection-selector__form .field { flex: 1 1 auto; margin: 0; }
.sending-protection-selector__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.sending-protection-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.sending-protection-primary .app-card { min-width: 0; }
.notification-recipient-row__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.notification-recipient-row__actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.notification-recipient-row__actions .button { min-height: 36px; }
.notification-recipient-row__permission { min-width: 185px; color: var(--admin-muted); font-size: 13px; }
.notification-recipient-row__actions--editing select { min-width: 220px; width: auto; }
.app-provisioning-section { min-width: 0; }
.app-provisioning-section > .app-provisioning-panel + .app-provisioning-panel { margin-top: 32px; }
.app-provisioning-section > .section-header { margin-bottom: 16px; }
.app-provisioning-panel { margin-top: 0; }
.provisioning-upgrade-features { display: grid; gap: 9px; margin: 20px 0; padding-left: 20px; color: var(--admin-muted); line-height: 1.5; }
.app-provisioning-section > .section-header h2, .app-credentials-section > .section-header h2 { font-size: 20px; }
.app-provisioning-accordion { margin-top: 32px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface-subtle); padding: 20px 24px 24px; }
.app-provisioning-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.app-provisioning-accordion > summary::-webkit-details-marker { display: none; }
.app-provisioning-accordion__summary-text { display: flex; flex-direction: column; gap: 2px; }
.app-provisioning-accordion > summary strong { font-size: 18px; }
.app-provisioning-accordion__summary-text > span { color: var(--admin-muted); font-size: 13px; }
.app-provisioning-accordion__chevron { width: 10px; height: 10px; flex: 0 0 10px; margin-right: 4px; border-right: 2px solid var(--admin-muted); border-bottom: 2px solid var(--admin-muted); transform: rotate(45deg) translateY(-3px); transition: transform .15s ease; }
.app-provisioning-accordion[open] .app-provisioning-accordion__chevron { transform: rotate(225deg) translate(-2px, -1px); }
.app-provisioning-accordion__content { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.app-provisioning-accordion__content > .app-provisioning-panel { margin-top: 0; }
.app-credentials-section { margin-top: 28px; }
.app-detail-bottom-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; align-items: start; }
.app-card { margin-top: 0; margin-bottom: 0; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-bg); padding: 20px; }
.app-card .section-header { margin-bottom: 16px; }
.app-card > form + form { margin-top: var(--admin-space-4); }
.sending-protection-detail .app-detail-list, .sending-protection-monitoring .app-detail-list, #sending-protection .app-detail-list { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); gap: 12px 24px; margin: 0; }
.sending-protection-detail .app-detail-list dt, .sending-protection-monitoring .app-detail-list dt, #sending-protection .app-detail-list dt { color: var(--admin-muted); }
.sending-protection-detail .app-detail-list dd, .sending-protection-monitoring .app-detail-list dd, #sending-protection .app-detail-list dd { min-width: 0; margin: 0; }
.sending-limit-usage .app-detail-list { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); gap: 12px 24px; margin: 0; }
.sending-limit-usage .app-detail-list dt { color: var(--admin-muted); }
.sending-limit-usage .app-detail-list dd { min-width: 0; margin: 0; }
.notification-recipient-list { display: grid; gap: var(--admin-space-4); margin-top: var(--admin-space-6); }
.notification-recipient-row { display: flex; justify-content: space-between; gap: var(--admin-space-4); padding-top: var(--admin-space-4); border-top: 1px solid var(--admin-border); }
.notification-recipient-row > div:last-child { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px 16px; }
.notification-recipient-row > div:last-child form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.notification-recipient-row > div:last-child select { width: auto; min-width: 220px; }
.sending-protection-records { margin-top: 0; }
.sending-protection-records .notification-recipient-list { max-height: 360px; overflow-y: auto; }
.sending-limit-form .field { margin-bottom: 16px; }
.sending-limit-form .sending-limit-guidance,
.sending-limit-form .sending-limit-history,
.sending-limit-form .sending-limit-explanation { border-top: 1px solid var(--admin-border); margin-top: 20px; padding-top: 16px; }
.sending-limit-form h3 { margin: 0 0 8px; font-size: 16px; }
.sending-limit-form .sending-limit-history .app-detail-list { margin-top: 12px; }
.sending-limit-form .notice { margin-bottom: 20px; }
.setup-material + .setup-material { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--admin-border); }
.setup-material__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setup-material__header h3 { margin: 0; }
.setup-material .code-block { margin-top: 12px; }
.setup-prompt summary { color: var(--admin-accent); cursor: pointer; font-weight: 600; }
.setup-prompt > p { margin-bottom: 0; }
.app-card.danger-zone { border-top: 1px solid #e3bcbc; padding-top: 20px; }
.app-detail-top-layout { position: relative; }
.app-detail-top-layout::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--admin-border); }
.app-settings-section { margin-top: 0; padding: 0; }
.app-settings-section > .section-header h2 { font-size: 20px; }
.app-settings-rotate-form { margin-top: var(--admin-space-4); }
.app-settings-section + #sending-protection, .app-settings-section + .sending-protection-summary { margin-top: 32px; }
.app-provisioning-panel > .section-header { margin-bottom: 12px; }
.app-credentials-section > .section-header + .credential-group { border-top: 0; }
.app-credentials-section > .app-credentials-section + .credential-group { margin-top: 28px; }
.ses-cloudflare-token, .ses-cloudflare-next { display: grid; gap: 16px; }
.ses-cloudflare-token { margin-top: 20px; margin-bottom: 36px; }
.ses-cloudflare-next { margin-top: 36px; border-top: 1px solid var(--admin-border); padding-top: 28px; }
.ses-cloudflare-action { margin: 0; }
.ses-cloudflare-action .button { margin-top: 4px; }
.ses-cloudflare-action:has(#cloudflare-domain), form:has(#cloudflare-domain) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ses-cloudflare-action:has(#cloudflare-domain) .field, form:has(#cloudflare-domain) .field { min-width: 0; margin-bottom: 0; }
.ses-cloudflare-action:has(#cloudflare-domain) .field, form:has(#cloudflare-domain) .field { display: grid; grid-template-rows: auto minmax(36px, auto) auto; align-content: start; }
.ses-cloudflare-action:has(#cloudflare-domain) .field-help, form:has(#cloudflare-domain) .field-help { min-height: 36px; }
.ses-cloudflare-action:has(#cloudflare-domain) > .button, form:has(#cloudflare-domain) > .button { grid-column: 1 / -1; justify-self: start; }
.danger-zone { border-top: 1px solid var(--admin-border); padding-top: 24px; }
.danger-zone .section-header { border-bottom-color: #e3bcbc; }
.production-preflight-step { border-top: 1px solid var(--admin-border); margin-top: 28px; padding-top: 24px; }
.production-preflight-step .section-header { margin-bottom: 16px; }
.production-preflight-step .field { max-width: 620px; }
@media (max-width: 900px) { .app-detail-top-layout, .app-detail-bottom-layout, .credential-group__fields, .ses-cloudflare-action:has(#cloudflare-domain), form:has(#cloudflare-domain) { grid-template-columns: minmax(0, 1fr); } .app-detail-top-layout::before { display: none; } .app-settings-section { padding-right: 0; } }
@media (max-width: 900px) { .app-settings-primary-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .console-status-row { grid-template-columns: 1fr auto; gap: 5px 12px; } .console-status-row > :last-child { grid-column: 2; grid-row: 1 / span 2; } .app-card { padding: 16px; } .sending-protection-primary { grid-template-columns: 1fr; } .sending-protection-detail .app-detail-list, .sending-protection-monitoring .app-detail-list, #sending-protection .app-detail-list, .sending-limit-usage .app-detail-list { grid-template-columns: 1fr; gap: 8px; } .sending-protection-detail .app-detail-list dt, .sending-protection-detail .app-detail-list dd, .sending-protection-monitoring .app-detail-list dt, .sending-protection-monitoring .app-detail-list dd, #sending-protection .app-detail-list dt, #sending-protection .app-detail-list dd, .sending-limit-usage .app-detail-list dt, .sending-limit-usage .app-detail-list dd { grid-column: 1; } .notification-recipient-row { display: grid; } .notification-recipient-row > div:last-child, .notification-recipient-row__actions { justify-content: flex-start; } .notification-recipient-row__permission { min-width: 0; width: 100%; } .sending-protection-selector__form { display: grid; align-items: stretch; } .sending-protection-selector__actions { align-items: stretch; } .ses-intent-choice__options, .app-capabilities-fieldset .choice-group { grid-template-columns: 1fr; } }
.secret-row { display: grid; align-self: start; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 0 12px; }
.secret-actions { display: flex; grid-column: 2; align-self: start; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 15px 0 0; }
.credential-delete { display: grid; width: 40px; height: 40px; min-height: 40px; box-sizing: border-box; place-items: center; border: 1px solid #d5a7a7; border-radius: 6px; background: #fff8f8; color: var(--admin-danger); font-size: 20px; font-weight: 700; line-height: 1; padding: 0; }
.credential-delete.is-submitting { font-size: 0; }
.credential-delete.is-submitting::before { width: 14px; height: 14px; flex: 0 0 14px; border-width: 2px; }
.credential-delete:hover { border-color: var(--admin-danger); background: #f3d5d5; color: var(--admin-danger); }
.add-credential { margin-top: 20px; border-top: 1px solid var(--admin-border); padding-top: 16px; }
.add-credential summary { color: var(--admin-accent); cursor: pointer; font-weight: 600; }
.add-credential .section-form { margin-top: 18px; }
.custom-secret-list { display: grid; gap: 0; }
.custom-secret-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto 40px minmax(0, 1fr) auto 40px; grid-template-rows: auto auto; align-items: center; gap: 0 12px; border-top: 1px solid var(--admin-border); padding: 18px 0; }
.custom-secret-name { grid-column: 1; grid-row: 2; min-width: 0; color: var(--admin-muted); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.custom-secret-heading { margin: 0 0 4px; color: var(--admin-muted); font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.custom-secret-heading--production { grid-column: 2 / 5; grid-row: 1; }
.custom-secret-heading--test { grid-column: 5 / 8; grid-row: 1; }
.custom-secret-form { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 0; }
.custom-secret-form--production { grid-column: 2 / 4; grid-row: 2; }
.custom-secret-form--test { grid-column: 5 / 7; grid-row: 2; }
.custom-secret-form > input:not([type="hidden"]) { grid-column: 1; width: 100%; min-width: 0; }
.custom-secret-form > .button { grid-column: 2; }
.custom-secret-actions { display: flex; grid-row: 2; align-self: center; align-items: center; justify-content: center; padding: 0; }
.custom-secret-actions--production { grid-column: 4; }
.custom-secret-actions--test { grid-column: 7; }
.custom-credential-form { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1fr) minmax(240px, 1fr) auto; align-items: end; gap: 0 16px; }
.custom-credential-form .field { margin-bottom: 0; }

.login-layout { width: min(100%, 420px); margin: 48px auto 0; }
.login-layout .page-header { margin-bottom: 24px; }
.login-layout form { border-top: 1px solid var(--admin-border); padding-top: 24px; }
.issuance-warning { color: var(--admin-warning); }

@media (max-width: 760px) {
    .admin-main { width: min(100% - 28px, var(--admin-content-width)); }
    .admin-nav { width: 100%; margin-left: 0; }
    .admin-main { padding-top: 32px; }
    .app-detail-header { margin-inline: -14px; padding-inline: 14px; }
    .page-header { display: block; }
    .delete-app-page .page-header { margin-bottom: 28px; }
    .delete-app-panel { padding: 22px 20px 24px; }
    .delete-app-actions { justify-content: stretch; }
    .delete-app-actions .button { width: 100%; }
    .page-actions { margin-top: 16px; }
    .apps-page-header { align-items: stretch; }
    .apps-page-header > .button { align-self: flex-start; margin-top: 16px; }
    .data-table { display: block; overflow-x: auto; white-space: nowrap; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .field-full { grid-column: auto; }
    .identity-list { grid-template-columns: 1fr; }
    .identity-list dt { border-bottom: 0; padding-bottom: 2px; }
    .identity-list dd { padding-top: 2px; }
    .credential-group__fields { gap: 0; }
    .credential-form { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0 8px; }
    .credential-form .credential-label { grid-column: 1 / -1; }
    .credential-input-wrap { grid-column: 1; }
    .credential-form > .button { grid-column: 2; }
    .credential-managed { grid-template-columns: 1fr; gap: 8px; padding: 14px 0 8px; }
    .credential-managed .credential-label { margin: 0; }
    .secret-row { grid-template-columns: minmax(0, 1fr) 32px; gap: 0 12px; }
    .secret-actions { justify-content: center; padding-top: 15px; padding-bottom: 0; }
    .custom-credential-form { grid-template-columns: 1fr; gap: 16px; }
    .custom-secret-row { grid-template-columns: minmax(0, 1fr) auto 40px; grid-template-rows: auto auto auto; gap: 8px 12px; }
    .custom-secret-name { grid-column: 1 / -1; grid-row: 1; }
    .custom-secret-heading--production, .custom-secret-heading--test { grid-column: 1 / -1; grid-row: auto; margin: 8px 0 0; }
    .custom-secret-form--production, .custom-secret-form--test { grid-column: 1 / 3; grid-row: auto; }
    .custom-secret-actions--production, .custom-secret-actions--test { grid-column: 3; grid-row: auto; }
    .setup-credential-form { grid-template-columns: 1fr; }
    .setup-credential-form > .button { grid-column: auto; }
    .operations-plan-group { padding: 16px; }
    .operations-plan-grid { grid-template-columns: 1fr; }
    .operations-search-results li { grid-template-columns: 1fr; gap: 8px; }
    .operations-search-results li .button { justify-self: start; }
    .operations-account-search { align-items: stretch; flex-direction: column; }
    .operations-account-search label { flex-basis: auto; }
    .operations-apps-page-header .operations-account-search { width: 100%; }
    .operations-app-summary, .operations-usage-summary { grid-template-columns: 1fr 1fr; }
    .operations-app-summary div:first-child, .operations-usage-summary__primary { grid-column: 1 / -1; }
    .operations-overview-metrics { grid-template-columns: 1fr 1fr; gap: 0 16px; }
    .operations-audit-filters { grid-template-columns: 1fr; align-items: stretch; }
    .operations-audit-filters .button { width: 100%; }
    .operations-plan-group__heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .operations-migration-panel { display: block; }
    .operations-migration-panel form { display: grid; min-width: 0; margin-top: 16px; }
    .operations-migration-panel select, .operations-migration-form select { width: 100%; min-width: 0; }
    .operations-subscriber-card__header { display: block; }
    .operations-subscriber-card__header-right { justify-content: space-between; margin-top: 12px; }
    .operations-subscriber-card__grid { grid-template-columns: 1fr 1fr; }
    .operations-pending-migration { align-items: flex-start; flex-direction: column; }
    .mailbox-workspace { border-left: 0; border-right: 0; }
    .mail-inbox { grid-template-columns: 1fr; height: auto; min-height: 0; gap: 24px; }
    .mail-inbox-list { border-right: 0; }
    .mail-toolbar { align-items: stretch; flex-direction: column; }
    .mail-toolbar select, .mail-toolbar input, .mail-toolbar .button { width: 100%; }
    .mail-preview-header { padding-right: 60px; }
    .mail-attachments { padding-left: 16px; padding-right: 16px; }
    .mail-tabs { padding-left: 16px; padding-right: 16px; }
    .mail-preview { height: auto; min-height: 0; }
    .mail-preview-canvas { display: block; min-height: 220px; overflow: visible; }
    .mail-html-preview { height: 520px; min-height: 520px; }
    .sms-preview-canvas { min-height: 420px; padding: 18px 16px 24px; }
    .sms-phone { min-height: 460px; }
    .sms-phone-screen { min-height: 420px; }
    .sms-native-details { padding-left: 16px; padding-right: 16px; }
}

/* Shell sizing overrides remain last so page-specific rules cannot recreate the frame. */
.admin-shell:not(.admin-auth-layout) { display: flex; min-height: 100vh; }
.admin-shell:not(.admin-auth-layout) .admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: 224px; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; border-right: 1px solid rgba(154, 214, 255, .18); background: #061a33; padding: 28px 16px 20px; }
.admin-shell:not(.admin-auth-layout) .admin-sidebar::before,
.admin-shell:not(.admin-auth-layout) .admin-sidebar::after { position: absolute; z-index: 0; inset: -18%; content: ''; pointer-events: none; }
.admin-shell:not(.admin-auth-layout) .admin-sidebar::before { background: radial-gradient(ellipse at 16% 18%, rgba(50, 116, 181, .48) 0, rgba(20, 66, 120, .2) 24%, transparent 50%), radial-gradient(ellipse at 84% 78%, rgba(20, 92, 158, .4) 0, rgba(10, 45, 87, .18) 28%, transparent 54%), linear-gradient(118deg, #06172d 0%, #0b2b50 45%, #071d38 70%, #041226 100%); background-size: 135% 135%; animation: auth-metal-drift 18s ease-in-out infinite alternate; }
.admin-shell:not(.admin-auth-layout) .admin-sidebar::after { inset: -70% -30%; background: linear-gradient(112deg, transparent 33%, rgba(154, 214, 255, .018) 41%, rgba(194, 231, 255, .105) 49%, rgba(112, 184, 235, .028) 57%, transparent 67%); transform: translateX(-42%) rotate(-7deg); animation: auth-light-sweep 12s ease-in-out infinite; filter: blur(16px); }
.admin-shell:not(.admin-auth-layout) .admin-sidebar__top,
.admin-shell:not(.admin-auth-layout) .admin-sidebar__account { position: relative; z-index: 1; }
.admin-shell:not(.admin-auth-layout) .admin-sidebar__top { display: grid; gap: 34px; }
.admin-shell:not(.admin-auth-layout) .admin-sidebar__brand { display: grid; gap: 3px; padding: 0 10px; color: #fff; text-decoration: none; }
.admin-sidebar__logo-box { display: inline-flex; width: 100%; align-items: center; border: 1px solid rgba(20, 52, 87, .2); border-radius: 9px; background: #fff; padding: 9px 10px; box-shadow: 0 4px 12px rgba(0, 13, 32, .18); }
.admin-sidebar__logo { display: block; width: min(100%, 180px); height: auto; }
.admin-shell:not(.admin-auth-layout) .admin-nav { display: grid; width: auto; gap: 3px; margin-left: 0; }
.admin-shell:not(.admin-auth-layout) .admin-nav__item { border-left: 2px solid transparent; padding: 10px 10px 10px 12px; color: rgba(232, 243, 254, .76); text-decoration: none; }
.admin-shell:not(.admin-auth-layout) .admin-nav__item:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.admin-shell:not(.admin-auth-layout) .admin-nav__item--active { border-left-color: #9ad6ff; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 650; }
.admin-shell:not(.admin-auth-layout) .admin-nav__group { display: grid; gap: 3px; }
.admin-shell:not(.admin-auth-layout) .admin-nav__subnav { display: grid; gap: 2px; margin: -1px 0 8px 14px; border-left: 1px solid var(--admin-border-strong); padding-left: 10px; }
.admin-shell:not(.admin-auth-layout) .admin-nav__subitem { overflow-wrap: anywhere; padding: 7px 8px; color: rgba(232, 243, 254, .68); font-size: 13px; line-height: 1.25; text-decoration: none; }
.admin-shell:not(.admin-auth-layout) .admin-nav__subitem:hover,
.admin-shell:not(.admin-auth-layout) .admin-nav__subitem--active { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-shell:not(.admin-auth-layout) .admin-nav__subitem--active { font-weight: 650; }
.admin-shell:not(.admin-auth-layout) .admin-sidebar__account { display: grid; gap: 12px; border-top: 1px solid rgba(154, 214, 255, .22); padding: 16px 10px 0; }
.admin-account-selector { min-width: 0; }
.admin-account-selector select { width: 100%; border-color: rgba(154, 214, 255, .34); background-color: rgba(255, 255, 255, .12); background-image: url("/assets/img/select-chevron.svg?v=1"); color: #fff; font-size: 13px; }
.admin-account-selector select option { background: #fff; color: var(--admin-text); }
.admin-profile-link { display: inline-flex; width: 100%; align-items: center; gap: 10px; border-radius: 7px; color: #fff; padding: 6px 8px; text-decoration: none; }
.admin-profile-link:focus-visible { outline-offset: 3px; }
.admin-avatar,
.profile-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 17px; font-weight: 700; line-height: 1; }
.admin-avatar { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid rgba(154, 214, 255, .35); background: rgba(255, 255, 255, .14); }
.profile-avatar { width: 82px; height: 82px; flex: 0 0 82px; border: 1px solid #9ad6ff; background: var(--admin-accent); }
.profile-avatar svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.admin-avatar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.admin-profile-name { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.admin-profile-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.admin-profile-link:hover .admin-avatar { background: rgba(255, 255, 255, .24); }
.admin-shell:not(.admin-auth-layout) .admin-logout { display: inline-flex; width: 100%; min-height: 40px; align-items: center; gap: 10px; justify-content: flex-start; border: 1px solid transparent; border-radius: 7px; background: transparent; color: rgba(232, 243, 254, .8); padding: 6px 8px; }
.admin-shell:not(.admin-auth-layout) .admin-logout:hover { border-color: rgba(154, 214, 255, .22); background: rgba(255, 255, 255, .12); color: #fff; }
.admin-logout__icon { display: inline-flex; width: 22px; height: 22px; flex: 0 0 22px; align-items: center; justify-content: center; }
.admin-logout__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.admin-main-wrap { width: calc(100% - 224px); margin-left: 224px; min-width: 0; }
.admin-auth-layout .admin-main-wrap { width: 100%; margin-left: 0; }
.admin-shell:not(.admin-auth-layout) .admin-main { width: min(calc(100% - 64px), var(--admin-content-width)); margin: 0 auto; padding: 32px 0 64px; }
.admin-shell:not(.admin-auth-layout) .admin-main.admin-page--workspace { width: min(calc(100% - 64px), 1600px); max-width: none; padding-top: 28px; padding-bottom: 32px; }
.admin-auth-layout .admin-main { width: min(calc(100% - 48px), var(--admin-content-width)); margin: 0 auto; }

@media (max-width: 760px) {
    .admin-shell:not(.admin-auth-layout) .admin-sidebar { width: min(224px, 84vw); transform: translateX(-100%); transition: transform .18s ease; box-shadow: 8px 0 24px rgba(23, 32, 42, .12); }
    .admin-shell.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-main-wrap { width: 100%; margin-left: 0; }
    .admin-sidebar-toggle { position: relative; z-index: 5; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin: 12px 14px 0; }
    .admin-shell:not(.admin-auth-layout) .admin-main { width: calc(100% - 28px); padding-top: 24px; }
    .admin-shell:not(.admin-auth-layout) .admin-main.admin-page--workspace { width: calc(100% - 28px); padding-top: 20px; }
    .admin-auth-layout .admin-main { width: calc(100% - 28px); }
}

/* Final shell alignment: every authenticated page starts at the same inset. */
.admin-shell:not(.admin-auth-layout) .admin-main {
    width: min(calc(100% - 64px), var(--admin-content-width));
    margin-left: 32px;
    margin-right: 32px;
}
.admin-shell:not(.admin-auth-layout) .admin-main.admin-page--workspace {
    width: calc(100% - 64px);
    max-width: none;
}
.admin-sidebar-toggle { display: none !important; }
@media (max-width: 760px) {
    .admin-shell:not(.admin-auth-layout) .admin-main {
        width: calc(100% - 28px);
        margin-left: 14px;
        margin-right: 14px;
    }
    .admin-shell:not(.admin-auth-layout) .admin-main.admin-page--workspace {
        width: calc(100% - 28px);
    }
    .admin-sidebar-toggle {
        display: inline-flex !important;
        width: 40px;
        height: 40px;
        margin: 12px 14px 0;
        padding: 0;
        border: 1px solid var(--admin-border-strong);
        border-radius: var(--admin-radius);
        background: #fff;
    }
    .admin-sidebar-toggle__icon,
    .admin-sidebar-toggle__icon::before,
    .admin-sidebar-toggle__icon::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 2px;
        background: var(--admin-text);
    }
    .admin-sidebar-toggle__icon { position: relative; }
    .admin-sidebar-toggle__icon::before,
    .admin-sidebar-toggle__icon::after { position: absolute; content: ''; left: 0; }
    .admin-sidebar-toggle__icon::before { top: -5px; }
    .admin-sidebar-toggle__icon::after { top: 5px; }
}

.profile-card { display: grid; gap: 28px; }
.profile-identity { display: flex; align-items: center; gap: 14px; }
.profile-identity h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.profile-identity p { margin: 5px 0 0; color: var(--admin-muted); }
.profile-details { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--admin-border); }
.profile-details > div { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 16px; border-bottom: 1px solid var(--admin-border); padding: 14px 0; }
.profile-details dt { color: var(--admin-muted); }
.profile-details dd { margin: 0; overflow-wrap: anywhere; }
.profile-actions .button { margin-top: 4px; }

@media (max-width: 520px) {
    .profile-details > div { grid-template-columns: 1fr; gap: 4px; }
}
.section-form input[name="secret_value"],
.section-form input[type="password"] { max-width: 520px; }

/* Canonical operator shell sizing. Keep these values in one place. */
:root {
    --admin-sidebar-width: 260px;
    --admin-main-gutter: 36px;
    --admin-standard-width: 1320px;
    --admin-workspace-width: 1560px;
}

@media (min-width: 761px) {
    .admin-shell:not(.admin-auth-layout) .admin-sidebar {
        width: var(--admin-sidebar-width);
    }

    .admin-shell:not(.admin-auth-layout) .admin-main-wrap {
        width: calc(100% - var(--admin-sidebar-width));
        margin-left: var(--admin-sidebar-width);
    }

    .admin-shell:not(.admin-auth-layout) .admin-main,
    .admin-shell:not(.admin-auth-layout) .admin-main.admin-page--workspace {
        width: min(calc(100% - (2 * var(--admin-main-gutter))), var(--admin-standard-width));
        max-width: var(--admin-standard-width);
        margin-inline: auto;
        padding: 32px 0 64px;
    }

.admin-shell:not(.admin-auth-layout) .admin-main.admin-page--workspace {
    width: min(calc(100% - (2 * var(--admin-main-gutter))), var(--admin-workspace-width));
    max-width: var(--admin-workspace-width);
    padding-top: 28px;
    padding-bottom: 32px;
    display: flex;
    height: calc(100vh - 28px);
    min-height: 0;
    flex-direction: column;
}
.admin-page--workspace .mailbox-workspace { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.admin-page--workspace .mail-inbox { min-height: 0; flex: 1 1 auto; }

    .admin-shell:not(.admin-auth-layout) .admin-main > .page-header h1 {
        display: block;
    }
}

@media (max-width: 760px) {
    .admin-shell:not(.admin-auth-layout) .admin-main,
    .admin-shell:not(.admin-auth-layout) .admin-main.admin-page--workspace {
        width: calc(100% - 28px);
        max-width: none;
        margin-inline: 14px;
        min-height: 0;
        height: auto;
        display: block;
    }

    .admin-page--workspace .mailbox-workspace { display: block; }
    .admin-page--workspace .mail-inbox { flex: none; }

    .admin-shell:not(.admin-auth-layout) .admin-sidebar__account {
        padding-bottom: 4px;
    }
}

/* Deliberate unauthenticated login layout. */
.admin-shell.admin-auth-layout {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    background: #061a33;
}
.admin-shell.admin-auth-layout::before,
.admin-shell.admin-auth-layout::after {
    position: absolute;
    z-index: -1;
    content: '';
    pointer-events: none;
}
.admin-shell.admin-auth-layout::before {
    inset: -18%;
    background:
        radial-gradient(ellipse at 16% 18%, rgba(50, 116, 181, .48) 0, rgba(20, 66, 120, .2) 24%, transparent 50%),
        radial-gradient(ellipse at 84% 78%, rgba(20, 92, 158, .4) 0, rgba(10, 45, 87, .18) 28%, transparent 54%),
        linear-gradient(118deg, #06172d 0%, #0b2b50 45%, #071d38 70%, #041226 100%);
    background-size: 135% 135%;
    animation: auth-metal-drift 18s ease-in-out infinite alternate;
}
.admin-shell.admin-auth-layout::after {
    inset: -70% -30%;
    background: linear-gradient(112deg, transparent 33%, rgba(154, 214, 255, .018) 41%, rgba(194, 231, 255, .105) 49%, rgba(112, 184, 235, .028) 57%, transparent 67%);
    transform: translateX(-42%) rotate(-7deg);
    animation: auth-light-sweep 12s ease-in-out infinite;
    filter: blur(16px);
}
.admin-auth-layout .admin-main-wrap {
    position: relative;
    z-index: 1;
}
.admin-auth-layout .admin-main-wrap {
    width: 100%;
    margin: 0;
}
.admin-auth-layout .admin-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 32px 24px;
}
.login-layout {
    display: grid;
    min-height: calc(100vh - 64px);
    width: 100%;
    margin: 0;
    place-items: center;
}
.login-panel {
    width: min(100%, 432px);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(1, 10, 24, .28), 0 0 0 1px rgba(167, 211, 244, .08);
    padding: 36px;
}
@keyframes auth-metal-drift {
    0% { background-position: 0% 12%; }
    100% { background-position: 100% 88%; }
}
@keyframes auth-light-sweep {
    0%, 18% { transform: translateX(-42%) rotate(-7deg); opacity: 0; }
    35% { opacity: .42; }
    62% { opacity: .42; }
    82%, 100% { transform: translateX(42%) rotate(-7deg); opacity: 0; }
}
.login-brand {
    margin-bottom: 38px;
}
.login-logo { display: block; width: min(100%, 196px); height: auto; }
.login-heading { margin-bottom: 28px; }
.login-heading h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
.login-heading p { margin: 8px 0 0; color: var(--admin-muted); }
.login-error { margin: 0 0 22px; }
.login-form { display: grid; gap: 6px; border: 0; padding: 0; }
.login-form .field { margin: 0; }
.login-submit { width: 100%; margin-top: 10px; }
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
    color: var(--admin-muted);
    font-size: 12px;
    text-align: center;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--admin-border);
}
.login-panel [data-passkey-login] {
    width: 100%;
}
.login-panel [data-passkey-message] {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.45;
}
.login-panel > p:last-child {
    margin: 18px 0 0;
    text-align: center;
}
.login-panel > p:last-child a { color: var(--admin-accent); }

@media (prefers-reduced-motion: reduce) {
    .admin-shell.admin-auth-layout::before,
    .admin-shell.admin-auth-layout::after { animation: none; }
    .admin-shell.admin-auth-layout::after { opacity: .18; transform: translateX(0) rotate(-7deg); }
}

button:disabled { cursor: wait; opacity: .65; }

.error-state { display: grid; grid-template-columns: minmax(120px, .34fr) minmax(0, 1fr); gap: clamp(28px, 7vw, 100px); align-items: start; max-width: 920px; margin: clamp(35px, 10vh, 110px) auto; padding: clamp(28px, 5vw, 64px); border: 1px solid var(--admin-border); border-radius: 9px; background: linear-gradient(135deg, #fff 0%, #f7f9fb 100%); box-shadow: 0 20px 50px rgba(22, 43, 67, .08); }
.error-state__code { color: var(--admin-accent); font: 700 clamp(70px, 11vw, 150px)/.8 Arial, Helvetica, sans-serif; letter-spacing: -.09em; }
.error-state__signal { display:flex; align-items:end; gap:5px; width:100px; height:30px; margin:30px 0 0 7px; }.error-state__signal span { display:block; width:15px; border:1px solid var(--admin-accent); background:rgba(49,95,143,.12); }.error-state__signal span:nth-child(1) { height:14px; }.error-state__signal span:nth-child(2) { height:23px; }.error-state__signal span:nth-child(3) { height:30px; background:var(--admin-accent); }.error-state__signal i { display:block; width:6px; height:6px; margin:0 0 0 4px; border-radius:50%; background:var(--admin-accent); }
.error-state__content h1 { margin: 0 0 12px; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -.045em; }
.error-state__eyebrow { margin: 0 0 15px; color: var(--admin-accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.error-state__description { max-width: 520px; margin: 0; color: var(--admin-muted); font-size: 17px; }
.error-state__detail { margin-top: 24px; color: var(--admin-muted); }
.error-state__detail h1 { display: none; }
.error-state__detail .page-header { margin: 0; }
.error-state__detail > :first-child { margin-top: 0; }
.error-state__detail > :last-child { margin-bottom: 0; }
.error-state__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.error-state__actions .button { text-decoration: none; }
@media (max-width: 640px) { .error-state { grid-template-columns: 1fr; gap: 34px; margin: 28px auto; padding: 28px 22px; } .error-state__code { font-size: 92px; } .error-state__actions { align-items: stretch; flex-direction: column; } .error-state__actions .button { justify-content: center; } }

@media (max-width: 520px) {
    .admin-auth-layout .admin-main { padding: 20px 16px; }
    .login-layout { min-height: calc(100vh - 40px); }
    .login-panel { padding: 28px 24px; }
    .login-brand { margin-bottom: 32px; }
}
.billing-modal {
    width: min(680px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    border-radius: 18px;
    color: #14213d;
    box-shadow: 0 24px 80px rgba(8, 29, 67, .28);
}
.billing-modal::backdrop { background: rgba(8, 29, 67, .58); }
.billing-modal__inner { padding: 2rem; overflow-y: auto; max-height: calc(100vh - 2rem); }
.billing-modal__inner > h2:first-child { margin-top: 0; }
.billing-modal__close { position: absolute; top: .65rem; right: .75rem; }
.billing-modal__close button { border: 0; background: transparent; font-size: 1.8rem; color: #52627d; cursor: pointer; }
.billing-modal label { display: grid; gap: .35rem; margin: .8rem 0; font-weight: 600; }
.billing-modal input { width: 100%; box-sizing: border-box; padding: .7rem .8rem; border: 1px solid #c8d1df; border-radius: 8px; font: inherit; }
.billing-modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.billing-modal__actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.25rem; }
.billing-summary { margin: 1rem 0; padding: 1rem; border-radius: 12px; background: #f3f6fb; }
.billing-summary:empty { display: none; }
.billing-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1rem; margin: 0; }
.billing-summary dt { color: #52627d; }
.billing-summary dd { margin: 0; font-weight: 700; text-align: right; }
.billing-existing-payment { margin: 1rem 0; padding: .8rem 1rem; background: #edf8f2; border-radius: 9px; color: #1d6840; }
.billing-payment-element { margin-top: 1rem; }
.operations-environment { margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--admin-border); border-radius: 8px; background: #f7f9fc; color: var(--admin-muted); font-size: 13px; }
.operations-publication-review { margin-top: 14px; border-top: 1px solid var(--admin-border); padding-top: 12px; color: var(--admin-muted); font-size: 12px; }
.operations-publication-review summary { color: var(--admin-link); cursor: pointer; font-weight: 700; }
.operations-publication-review p { line-height: 1.55; }
.operations-audit-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.operations-audit-list li { display: grid; grid-template-columns: 150px 190px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--admin-border); font-size: 13px; }
.operations-audit-list time { color: var(--admin-muted); }
.operations-audit-list span { color: var(--admin-muted); }
@media (max-width: 720px) { .operations-audit-list li { grid-template-columns: 1fr; gap: 4px; } }
@media (max-width: 560px) {
    .billing-modal__inner { padding: 1.4rem; }
    .billing-modal__grid, .billing-summary dl { grid-template-columns: 1fr; }
    .billing-summary dd { text-align: left; }
}

.signup-page { width: min(calc(100% - 48px), 720px); margin: 70px auto 110px; }
.signup-page h1 { margin: 0 0 28px; font-size: clamp(38px, 5vw, 62px); line-height: 1.02; letter-spacing: -.06em; }
.signup-lede { color: var(--admin-muted); font-size: 18px; }
.signup-form { display: grid; gap: 20px; margin-top: 38px; }
.signup-plan-picker { display: grid; gap: 14px; margin: 0; border: 0; padding: 0; }
.signup-plan-picker legend { display: block; margin-bottom: 4px; font-weight: 700; }
.signup-plan-card { position: relative; display: block; cursor: pointer; }
.signup-plan-card input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.signup-plan-card__body { display: flex; min-height: 250px; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; border: 1px solid var(--admin-border); background: var(--admin-surface); }
.signup-plan-card--premium .signup-plan-card__body { border: 2px solid var(--admin-accent); }
.signup-plan-card--trial .signup-plan-card__body { min-height: 0; }
.signup-plan-card input:focus-visible + .signup-plan-card__body, .signup-plan-card input:checked + .signup-plan-card__body { outline: 3px solid #9bbbd6; outline-offset: 2px; }
.signup-plan-card__eyebrow { color: var(--admin-accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.signup-plan-card strong { font-size: 27px; line-height: 1; letter-spacing: -.045em; }
.signup-plan-card small { min-height: 54px; color: var(--admin-muted); font-size: 14px; line-height: 1.5; }
.signup-plan-card b { margin-top: auto; font-size: 17px; }
.signup-plan-card em { font-size: 20px; font-style: normal; font-weight: 700; }
.signup-plan-card__action { margin-top: 4px; padding: 10px 12px; background: var(--admin-accent); color: #fff; font-size: 13px; font-weight: 700; }
.signup-plan-card--trial .signup-plan-card__action { background: #e9eef2; color: var(--admin-text); }
.signup-plan-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.signup-app-choice { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--admin-border); background: var(--admin-surface); }
.signup-app-choice label { font-weight: 700; }
.signup-app-choice select { min-width: 120px; }
.signup-app-choice span { color: var(--admin-muted); font-size: 13px; }
.signup-section-heading { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--admin-border); }
.signup-section-heading h2 { margin: 0; font-size: 23px; }
.signup-section-heading .section-kicker { margin-bottom: 6px; }
.signup-team-access-note { color: var(--admin-muted); font-size: 13px; }
.signup-existing { margin-top: 24px; color: var(--admin-muted); }
@media (max-width: 640px) { .signup-plan-cards { grid-template-columns: 1fr; } .signup-app-choice { flex-wrap: wrap; } }
