:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-muted: #f7fafc;
  --sidebar: #f6f9fb;
  --text: #17232d;
  --muted: #60717f;
  --border: #d8e2e9;
  --primary: #0f8f87;
  --primary-hover: #0b756f;
  --info: #2f6fed;
  --success: #1f8a5b;
  --warning: #b7791f;
  --danger: #c2413b;
  --focus: #2f6fed;
  --shadow: 0 12px 32px rgba(33, 53, 68, 0.12);
}

* { box-sizing: border-box; letter-spacing: 0; }
html, body { min-width: 320px; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, select { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; padding: 9px 12px; color: white; background: var(--primary); border-radius: 4px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.icon { display: block; flex: 0 0 auto; }
.boot { min-height: 100vh; display: grid; place-content: center; gap: 12px; text-align: center; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: #dff4f1; color: #08756f; border: 1px solid #b8e3de; border-radius: 6px; font-weight: 800; text-decoration: none; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-panel { width: min(100%, 920px); min-height: 560px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 24px 30px; border-bottom: 1px solid var(--border); }
.auth-brand > div { display: grid; gap: 2px; }
.auth-brand strong { font-size: 17px; }
.auth-brand span:last-child { color: var(--muted); font-size: 12px; }
.auth-copy { padding: 72px 54px; color: var(--text); background: var(--surface-muted); border-right: 1px solid var(--border); }
.auth-copy h1 { margin: 8px 0 16px; max-width: 420px; font-size: 34px; line-height: 1.15; }
.auth-copy p:last-child { max-width: 430px; color: var(--muted); line-height: 1.65; }
.eyebrow { margin: 0; color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.auth-panel > form { align-self: center; padding: 44px; }

.form-stack { display: grid; gap: 10px; }
.form-stack label, .settings-form label, .filter-bar label { color: #3c4854; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--text); background: white; border: 1px solid #bfc8d1; border-radius: 4px; }
textarea { resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #8493a1; }
input[readonly] { color: var(--muted); background: var(--surface-muted); }
.form-error { margin: 4px 0 0; color: var(--danger); font-size: 13px; }

.button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; color: #23303c; background: white; border: 1px solid #bfc8d1; border-radius: 4px; font-weight: 650; text-decoration: none; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
.button:hover { background: #edf2f6; border-color: #8493a1; }
.button-primary { color: white; background: var(--primary); border-color: var(--primary); }
.button-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button-danger { color: white; background: var(--danger); border-color: var(--danger); }
.button-quiet { background: transparent; }
.button-small { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; color: #40505f; background: white; border: 1px solid var(--border); border-radius: 4px; transition: background-color 180ms ease, color 180ms ease; }
.icon-button:hover { color: var(--text); background: #edf2f6; }

.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 30; top: 0; height: 100vh; display: flex; flex-direction: column; color: var(--text); background: var(--sidebar); border-right: 1px solid var(--border); }
.sidebar-brand { height: 64px; display: flex; align-items: center; gap: 11px; padding: 0 16px; border-bottom: 1px solid var(--border); text-decoration: none; }
.sidebar-brand-copy { min-width: 0; display: grid; gap: 1px; }
.sidebar-brand-copy strong { font-size: 15px; }
.sidebar-brand-copy small { color: var(--muted); font-size: 10px; font-weight: 600; }
.sidebar nav { display: grid; gap: 2px; padding: 16px 10px; overflow-y: auto; }
.sidebar nav a { min-height: 40px; display: flex; align-items: center; gap: 11px; padding: 8px 10px; color: #526571; border-left: 3px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 600; text-decoration: none; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
.sidebar nav a:hover { color: var(--text); background: #eaf1f4; }
.sidebar nav a.active { color: #08756f; background: #e1f3f1; border-left-color: var(--primary); }
.sidebar-user { display: grid; gap: 3px; margin-top: auto; padding: 17px 18px; border-top: 1px solid var(--border); overflow: hidden; }
.sidebar-user span { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; }
.sidebar-user small { color: var(--muted); }
.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 64px; display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--border); }
.topbar > div:nth-child(2) { min-width: 0; }
.topbar h1 { margin: 0; overflow: hidden; font-size: 18px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.topbar p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
.locale-control { display: inline-flex; align-items: center; padding: 2px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 4px; }
.locale-control button { min-width: 42px; height: 32px; padding: 0 9px; color: var(--muted); background: transparent; border: 0; border-radius: 3px; font-size: 11px; font-weight: 700; }
.locale-control button[aria-pressed="true"] { color: white; background: var(--primary); }
.auth-brand .locale-control { display: inline-flex; margin-left: auto; }
.mobile-menu, .mobile-scrim { display: none; }
.content { width: 100%; min-height: calc(100vh - 64px); padding: 24px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { min-height: 126px; display: grid; align-content: space-between; padding: 17px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid #6c7c8a; border-radius: 6px; }
.metric > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric strong { margin: 7px 0; font-size: 27px; line-height: 1; }
.metric small { color: var(--muted); }
.metric-money { border-top-color: var(--success); }
.metric-warning { border-top-color: var(--warning); }
.metric-attention { border-top-color: var(--primary); }
.section-band { margin-top: 30px; }
.section-heading { min-height: 42px; display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 15px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.queue-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); background: var(--surface); }
.queue-grid a { min-height: 105px; display: grid; align-content: center; gap: 8px; padding: 18px; border-right: 1px solid var(--border); text-decoration: none; transition: background-color 180ms ease; }
.queue-grid a:last-child { border-right: 0; }
.queue-grid a:hover { background: var(--surface-muted); }
.queue-grid strong { font-size: 23px; }
.queue-grid span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.filter-bar { display: flex; align-items: end; gap: 10px; margin-bottom: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--border); }
.list-command-bar { display: flex; justify-content: end; margin-bottom: 10px; }
.filter-bar label { min-width: min(240px, 40vw); display: grid; gap: 5px; }
.order-filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 170px 160px 160px auto; align-items: end; }
.order-filter-bar label { min-width: 0; }
.order-filter-bar .form-error { grid-column: 1 / -1; }
.filter-actions { display: flex; justify-content: end; gap: 7px; }
.result-summary { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 650; }
.user-table { min-width: 1120px; }
.order-table { min-width: 1460px; }
.table-shell { max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { height: 39px; padding: 8px 12px; color: #53606c; background: #f1f4f6; border-bottom: 1px solid var(--border); font-size: 11px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { min-height: 48px; padding: 10px 12px; border-bottom: 1px solid #e8ecef; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfd; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
td code { font-size: 11px; }
.clickable-row { cursor: pointer; }
.status { display: inline-flex; min-height: 24px; align-items: center; gap: 6px; padding: 3px 7px; color: #475b68; background: #f1f5f7; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status > span { width: 7px; height: 7px; background: #81909d; border-radius: 50%; }
.status-active > span, .status-paid > span, .status-published > span, .status-succeeded > span, .status-resolved > span, .status-normal > span { background: var(--success); }
.status-pending > span, .status-pending-verification > span, .status-in-progress > span, .status-partially-refunded > span, .status-cancel-at-period-end > span, .status-high > span { background: var(--warning); }
.status-payment-failed > span, .status-failed > span, .status-past-due > span, .status-suspended > span, .status-urgent > span, .status-repeat-free-candidate > span, .status-multi-account > span { background: var(--danger); }
.status-refunded > span, .status-canceled > span, .status-expired > span, .status-closed > span, .status-unpublished > span { background: #72808d; }
.status-active, .status-paid, .status-published, .status-succeeded, .status-resolved, .status-normal { color: #176b49; background: #e9f6ef; }
.status-pending, .status-pending-verification, .status-in-progress, .status-partially-refunded, .status-cancel-at-period-end, .status-high { color: #855a16; background: #fff6e5; }
.status-payment-failed, .status-failed, .status-past-due, .status-suspended, .status-urgent, .status-repeat-free-candidate, .status-multi-account { color: #a43834; background: #fceeed; }

.empty-state, .error-state, .loading-state { min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 30px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.loading-state > span { width: 24px; height: 24px; border: 3px solid #d5dde4; border-top-color: var(--primary); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.detail-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.user-command-toolbar { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.detail-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); }
.detail-summary > div { min-height: 86px; display: grid; align-content: center; gap: 7px; padding: 14px; border-right: 1px solid var(--border); }
.detail-summary > div:last-child { border-right: 0; }
.detail-summary span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.detail-summary strong { overflow-wrap: anywhere; }
.definition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.definition-grid > div { min-height: 72px; display: grid; align-content: center; gap: 5px; padding: 12px; background: var(--surface); }
.definition-grid span { color: var(--muted); font-size: 11px; }
.definition-grid strong { overflow-wrap: anywhere; font-size: 12px; }
.muted { color: var(--muted); }
.user-entitlement-policy { padding: 16px; background: var(--surface); border: 1px solid var(--border); }
.user-entitlement-list { border-top: 1px solid var(--border); }
.user-entitlement-row { min-height: 88px; display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(170px, .8fr) 130px minmax(190px, 1fr); align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.user-entitlement-row:last-child { border-bottom: 0; }
.user-entitlement-row > div { min-width: 0; }
.user-entitlement-row strong, .user-entitlement-row small { display: block; }
.user-entitlement-row small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.user-entitlement-row code { overflow-wrap: anywhere; color: #175f77; font-size: 11px; font-weight: 700; }
.user-entitlement-row > label:last-child { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }

.catalog-list { display: grid; gap: 12px; }
.catalog-row { display: grid; grid-template-columns: minmax(220px, .8fr) auto; gap: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.catalog-row h2 { margin: 4px 0; font-size: 17px; }
.catalog-row p { margin: 0; color: var(--muted); font-size: 12px; }
.plan-code { color: var(--primary); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.row-actions { display: flex; align-items: start; gap: 12px; }
.version-list { grid-column: 1 / -1; border-top: 1px solid var(--border); }
.version-list > div { min-height: 42px; display: grid; grid-template-columns: 60px 120px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f2; font-size: 12px; }
.version-list > div:last-child { border-bottom: 0; }

.catalog-workspace { min-width: 0; display: grid; grid-template-columns: 214px minmax(0, 1fr); align-items: start; gap: 16px; }
.catalog-plan-rail { position: sticky; top: 88px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.catalog-rail-heading { min-height: 45px; display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; background: var(--surface-muted); border-bottom: 1px solid var(--border); font-size: 12px; }
.catalog-rail-heading span { color: var(--muted); }
.catalog-plan-option { width: 100%; min-height: 96px; display: grid; align-content: center; gap: 6px; padding: 12px 13px; color: var(--text); background: white; border: 0; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; border-radius: 0; text-align: left; }
.catalog-plan-option:last-child { border-bottom: 0; }
.catalog-plan-option:hover { background: var(--surface-muted); }
.catalog-plan-option.active { background: #eef8f7; border-left-color: var(--primary); }
.catalog-plan-option > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.catalog-plan-option code { color: var(--primary); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.catalog-plan-option strong { overflow-wrap: anywhere; font-size: 14px; }
.catalog-plan-option small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.catalog-editor { min-width: 0; display: grid; gap: 28px; }
.catalog-commercial-form { padding: 18px; background: var(--surface); border: 1px solid var(--border); }
.catalog-editor-heading { margin-bottom: 18px; }
.heading-status { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.catalog-field-grid { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr)); gap: 12px; }
.catalog-field-grid label { display: grid; gap: 6px; color: #3c4854; font-size: 12px; font-weight: 650; }
.catalog-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.catalog-entitlements { min-width: 0; }
.entitlement-table { min-width: 1020px; }
.entitlement-table th:first-child { width: 24%; }
.entitlement-table th:nth-child(2) { width: 17%; }
.entitlement-table th:nth-child(3) { width: 18%; }
.entitlement-table td code { overflow-wrap: anywhere; color: #175f77; font-weight: 700; }
.entitlement-table td input, .entitlement-table td select { min-width: 132px; min-height: 34px; }
.entitlement-disabled { background: #fafbfc; }
.entitlement-disabled > td:first-child strong { color: var(--muted); }
.switch-control { min-width: 96px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.switch-control input { width: 16px; min-width: 16px !important; min-height: 16px !important; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dialog-copy { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.dialog-copy-danger { padding: 10px 12px; color: #8f2f2b; background: #fceeed; border-left: 3px solid var(--danger); }

.settings-form { max-width: 760px; padding: 20px; background: var(--surface); border: 1px solid var(--border); }
.settings-form form { display: grid; gap: 9px; }
.settings-form form > button { width: fit-content; margin-top: 8px; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.check-control { width: fit-content; display: inline-flex !important; align-items: center; gap: 8px; margin: 6px 0; }
.check-control input { width: 17px; min-height: 17px; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.role-grid article { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.role-grid h2 { margin: 0; font-size: 15px; }
.role-grid p { color: var(--muted); font-size: 12px; }
.role-grid article > div { display: flex; flex-wrap: wrap; gap: 5px; }
.role-grid code { padding: 4px 6px; color: #344453; background: #edf2f5; border-radius: 3px; font-size: 10px; }

.action-dialog { width: min(92vw, 520px); max-height: calc(100vh - 32px); overflow-y: auto; padding: 0; color: var(--text); background: var(--surface); border: 1px solid #aab5be; border-radius: 6px; box-shadow: 0 24px 70px rgba(13, 24, 35, 0.25); }
.action-dialog::backdrop { background: rgba(19, 29, 39, 0.55); }
.action-dialog form { padding: 18px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; font-size: 17px; }
.dialog-heading .icon-button { border: 0; font-size: 24px; }
.action-dialog .form-stack label { display: grid; gap: 6px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { max-width: min(360px, calc(100vw - 36px)); padding: 11px 14px; color: var(--text); background: white; border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 6px; box-shadow: var(--shadow); font-size: 13px; }
.toast-error { border-left-color: var(--danger); }

.sandbox-page { min-height: 100vh; background: var(--bg); }
.sandbox-header { position: sticky; z-index: 20; top: 0; min-height: 66px; display: flex; align-items: center; gap: 28px; padding: 10px max(20px, calc((100vw - 1240px) / 2)); background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--border); }
.sandbox-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sandbox-brand strong { font-size: 16px; }
.sandbox-header nav { display: flex; gap: 22px; }
.sandbox-header nav a { color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.sandbox-header nav a:hover { color: var(--primary); }
.sandbox-account { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.sandbox-account > span { max-width: 240px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sandbox-auth { display: block; }
.sandbox-auth-grid { width: min(100% - 32px, 980px); min-height: 590px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 48px auto; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sandbox-auth-grid > section { padding: 48px; }
.sandbox-auth-grid > section:first-child { color: var(--text); background: var(--surface-muted); }
.sandbox-auth-grid > section:first-child label { color: #3c4e5b; }
.sandbox-auth-grid > section:first-child input { color: var(--text); }
.sandbox-auth-grid > section + section { border-left: 1px solid var(--border); }
.sandbox-auth-grid h1, .verification-panel h1 { margin: 8px 0 28px; font-size: 25px; }
.inline-notice { margin-bottom: 18px; padding: 10px 12px; color: #155f3e; background: #e9f7f0; border-left: 3px solid var(--success); font-size: 12px; }
.verification-panel { width: min(100% - 32px, 560px); margin: 70px auto; padding: 34px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.mail-preview { display: grid; gap: 12px; margin: 20px 0; padding: 18px; background: var(--surface-muted); border: 1px solid var(--border); }
.mail-preview span { font-size: 13px; font-weight: 700; }
.mail-preview code { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.sandbox-content { width: min(100% - 32px, 1240px); margin: 26px auto 64px; }
.access-banner { min-height: 156px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 30px; padding: 24px 28px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--success); }
.access-banner.access-warning { background: #fffaf0; border-left-color: var(--warning); }
.access-banner.access-expired { background: #fff6f5; border-left-color: var(--danger); }
.access-banner.access-neutral { background: #f4f8ff; border-left-color: var(--info); }
.access-banner > div:first-child > span, .clock-panel > span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.access-banner h1 { margin: 7px 0 5px; font-size: 24px; }
.access-banner p { margin: 0; color: var(--muted); font-size: 13px; }
.clock-panel { min-width: 310px; display: grid; gap: 8px; padding-left: 26px; border-left: 1px solid var(--border); }
.clock-panel > strong { font-size: 14px; }
.clock-panel > div { display: flex; flex-wrap: wrap; gap: 6px; }
.clock-panel .button { color: var(--text); background: white; border-color: #b8c7d1; }
.clock-panel .button:hover { color: #08756f; background: #eef8f7; border-color: #8dc9c4; }
.upgrade-actions { display: flex; gap: 10px; padding: 14px 0; }
.sandbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.account-panel { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.account-panel dl { margin: 0; }
.account-panel dl > div { min-height: 41px; display: grid; grid-template-columns: 135px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid #edf0f2; }
.account-panel dl > div:last-child { border-bottom: 0; }
.account-panel dt { color: var(--muted); font-size: 11px; }
.account-panel dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 650; }
.account-panel > .button { margin-top: 14px; }
.sandbox-section { margin-top: 32px; scroll-margin-top: 84px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-option { min-height: 390px; display: flex; flex-direction: column; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid #758591; border-radius: 6px; }
.plan-option:nth-child(2) { border-top-color: var(--primary); }
.plan-option:nth-child(3) { border-top-color: #a55f09; }
.plan-option.selected { box-shadow: inset 0 0 0 2px var(--success); }
.plan-option > span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.plan-option h3 { margin: 8px 0 16px; font-size: 18px; }
.plan-option > strong { font-size: 26px; }
.plan-option > strong small { color: var(--muted); font-size: 12px; font-weight: 500; }
.plan-option ul { display: grid; gap: 8px; margin: 22px 0; padding: 0; list-style: none; }
.plan-option li { display: flex; gap: 8px; color: #465461; font-size: 11px; line-height: 1.4; }
.plan-option li > span { color: var(--success); font-weight: 800; }
.plan-option li > div { min-width: 0; display: grid; gap: 2px; }
.plan-option li strong { color: var(--text); font-size: 11px; }
.plan-option li small { color: var(--muted); font-size: 10px; }
.plan-option > .button, .plan-free-label { margin-top: auto; }
.plan-free-label { color: var(--muted); font-size: 11px; }
.entitlement-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--border); border: 1px solid var(--border); gap: 1px; }
.entitlement-list > div { min-height: 72px; display: grid; align-content: center; gap: 6px; padding: 12px; background: var(--surface); }
.entitlement-list span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.entitlement-list strong { overflow-wrap: anywhere; font-size: 12px; }
.feedback-layout { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr); gap: 28px; }
.feedback-layout > div:first-child { padding: 18px; background: var(--surface); border: 1px solid var(--border); }
.feedback-history { display: grid; gap: 8px; }
.feedback-history article { padding: 14px; background: var(--surface); border: 1px solid var(--border); }
.feedback-history article > div { display: flex; justify-content: space-between; gap: 12px; }
.feedback-history p { margin: 10px 0; color: #465461; font-size: 12px; line-height: 1.5; }
.feedback-history small { color: var(--muted); }
.checkout-dialog { width: min(92vw, 560px); padding: 0; color: var(--text); background: var(--surface); border: 1px solid #aab5be; border-radius: 6px; box-shadow: 0 24px 70px rgba(13, 24, 35, 0.25); }
.checkout-dialog::backdrop { background: rgba(19, 29, 39, 0.58); }
.checkout-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); font-weight: 700; }
.checkout-heading .icon-button { border: 0; font-size: 24px; }
.checkout-summary { display: grid; gap: 6px; padding: 22px 22px 12px; }
.checkout-summary h2 { margin: 0; font-size: 16px; }
.checkout-summary strong { font-size: 28px; }
.checkout-summary code { color: var(--muted); font-size: 10px; }
.mock-card { display: grid; gap: 10px; margin: 12px 22px; padding: 16px; background: #f0f3f5; border: 1px solid var(--border); }
.mock-card label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.mock-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkout-actions { display: flex; justify-content: end; gap: 8px; padding: 16px 22px 22px; }

@media (max-width: 1100px) {
  .metric-grid, .queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-grid a:nth-child(2) { border-right: 0; }
  .queue-grid a:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .detail-summary, .definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-summary > div:nth-child(2) { border-right: 0; }
  .detail-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .catalog-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-filter-bar .filter-actions { justify-content: start; }
  .user-entitlement-row { grid-template-columns: minmax(0, 1fr) minmax(160px, .7fr); }
  .user-entitlement-row > label { min-width: 0; }
  .topbar { padding-inline: 16px; }
  .content { padding: 16px; }
}

@media (max-width: 760px) {
  button { min-height: 44px; }
  input, select, textarea { min-height: 44px; }
  .button { min-height: 44px; }
  .icon-button { width: 44px; height: 44px; }
  .admin-layout { display: block; }
  .sidebar { position: fixed; left: 0; visibility: hidden; pointer-events: none; transform: translateX(-102%); width: 248px; transition: transform 200ms ease, visibility 0s linear 200ms; }
  .sidebar nav a { min-height: 44px; }
  .mobile-menu { display: grid; }
  .mobile-scrim { position: fixed; z-index: 25; inset: 0; background: rgba(17, 27, 36, 0.48); }
  .menu-open .sidebar { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
  .menu-open .mobile-scrim { display: block; }
  .topbar { min-height: 62px; }
  .topbar p { display: none; }
  .content { min-height: calc(100vh - 62px); padding: 16px; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar label { min-width: 0; }
  .filter-bar .button { width: fit-content; }
  .order-filter-bar { grid-template-columns: 1fr; }
  .order-filter-bar .filter-actions { justify-content: start; }
  .catalog-workspace { grid-template-columns: minmax(0, 1fr); }
  .catalog-plan-rail { position: static; display: flex; overflow-x: auto; }
  .catalog-rail-heading { min-width: 110px; border-right: 1px solid var(--border); border-bottom: 0; }
  .catalog-plan-option { min-width: 190px; border-right: 1px solid var(--border); border-bottom: 0; border-left: 0; border-top: 3px solid transparent; }
  .catalog-plan-option.active { border-top-color: var(--primary); border-left-color: transparent; }
  .auth-panel { max-width: 460px; min-height: auto; display: block; }
  .auth-copy { padding: 36px 30px; }
  .auth-copy h1 { font-size: 28px; }
  .auth-panel > form { padding: 30px; }
  .sandbox-header nav { display: none; }
  .sandbox-auth-grid { max-width: 560px; grid-template-columns: 1fr; }
  .sandbox-auth-grid > section + section { border-top: 1px solid var(--border); border-left: 0; }
  .access-banner { grid-template-columns: 1fr; }
  .clock-panel { min-width: 0; padding: 20px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-option { min-height: 0; }
  .entitlement-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .user-entitlement-row { grid-template-columns: 1fr; gap: 9px; padding: 14px 2px; }
  .user-entitlement-row .switch-control { width: 100%; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}

@media (max-width: 560px) {
  .auth-page { padding: 0; background: white; }
  .auth-panel { width: 100%; max-width: none; border: 0; box-shadow: none; }
  .auth-brand { padding: 18px 22px; }
  .auth-copy { padding: 30px 22px; }
  .auth-panel > form { padding: 28px 22px 40px; }
  .metric-grid, .queue-grid, .detail-summary, .definition-grid, .role-grid { grid-template-columns: 1fr; }
  .queue-grid a { border-right: 0; border-bottom: 1px solid var(--border); }
  .queue-grid a:last-child { border-bottom: 0; }
  .detail-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .detail-summary > div:last-child { border-bottom: 0; }
  .catalog-row { grid-template-columns: 1fr; }
  .row-actions, .version-list { grid-column: 1; }
  .row-actions { justify-content: space-between; }
  .version-list > div { grid-template-columns: 34px minmax(56px, auto) minmax(70px, 1fr) auto; gap: 7px; }
  .detail-toolbar { align-items: stretch; flex-direction: column; }
  .user-command-toolbar { justify-content: start; }
  .user-command-toolbar .button { flex: 1 1 145px; }
  .user-entitlement-policy { padding: 12px; }
  .copy-field { grid-template-columns: 1fr; }
  .copy-field .button { width: fit-content; }
  .topbar { padding: 9px 12px; }
  .topbar h1 { font-size: 16px; }
  .topbar-actions { gap: 5px; }
  .topbar .locale-control button { min-width: 36px; padding-inline: 6px; }
  .content { padding: 12px; }
  .catalog-field-grid { grid-template-columns: 1fr; }
  .toast-region { right: 12px; bottom: 12px; }
  .sandbox-header { padding: 9px 12px; }
  .sandbox-account > span { display: none; }
  .sandbox-content { width: calc(100% - 24px); margin-top: 12px; }
  .sandbox-auth-grid { width: 100%; margin: 0; border: 0; box-shadow: none; }
  .sandbox-auth-grid > section { padding: 30px 22px; }
  .verification-panel { width: calc(100% - 24px); margin: 30px auto; padding: 24px; }
  .access-banner { padding: 22px 18px; }
  .access-banner h1 { font-size: 20px; }
  .upgrade-actions { align-items: stretch; flex-direction: column; }
  .sandbox-grid, .feedback-layout { grid-template-columns: 1fr; }
  .account-panel dl > div { grid-template-columns: 105px minmax(0, 1fr); }
  .entitlement-list { grid-template-columns: 1fr; }
  .checkout-actions { align-items: stretch; flex-direction: column; }
  .checkout-actions .button { width: 100%; }
}

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