:root {
  color-scheme: dark;
  --color-canvas: #0c1118;
  --color-surface: #111923;
  --color-surface-soft: #17222d;
  --color-surface-raised: #1e2a37;
  --color-border: #283644;
  --color-border-strong: #3a4b5d;
  --color-ink: #e8edf4;
  --color-muted: #9aa9b9;
  --color-primary: #8998ff;
  --color-primary-hover: #a5b1ff;
  --color-primary-soft: rgba(137, 152, 255, 0.14);
  --color-danger: #ff7c86;
  --color-danger-soft: rgba(255, 124, 134, 0.12);
  --color-success: #5cdaa7;
  --color-success-soft: rgba(44, 176, 125, 0.12);
  --color-field: #0d141d;
  --color-code: #c5d2e0;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 8px;
  --shadow-panel: 0 18px 50px rgba(0, 0, 0, 0.42), 0 2px 8px rgba(0, 0, 0, 0.24);
  font-family: var(--font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  background: var(--color-canvas);
  color: var(--color-ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; scrollbar-color: #3a4b5d var(--color-canvas); scrollbar-width: thin; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--color-canvas); color: var(--color-ink); }
body, button, input, select { font-family: var(--font-ui); }
button, input, select { font-size: inherit; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: 0.65; }
[hidden] { display: none !important; }
::selection { color: #fff; background: #4654a8; }
:focus-visible { outline: 2px solid var(--color-primary-hover); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
.muted { color: var(--color-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-layout { display: grid; min-height: 100vh; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; min-height: 560px; flex-direction: column; padding: 22px 14px 16px; border-right: 1px solid var(--color-border); background: var(--color-surface); }
.brand { display: inline-flex; min-width: 0; align-items: center; gap: 10px; color: var(--color-ink); text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: var(--color-primary); color: #111827; font-size: 13px; font-weight: 750; letter-spacing: -0.06em; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 14px; font-weight: 650; letter-spacing: -0.02em; }
.brand-copy small { color: var(--color-muted); font-size: 12px; }
.nav-heading { margin: 38px 10px 9px; color: #78899c; font-size: 12px; font-weight: 700; letter-spacing: 0.085em; }
.primary-nav { display: grid; gap: 4px; }
.nav-link { display: flex; min-height: 40px; align-items: center; gap: 10px; padding: 0 10px; border-radius: 6px; color: #b2becb; font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-link:hover { background: var(--color-surface-soft); color: var(--color-ink); }
.nav-link-active, .nav-link-active:hover { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 620; }
.nav-icon { width: 17px; color: currentColor; font-size: 14px; text-align: center; }
.nav-count { min-width: 22px; margin-left: auto; padding: 2px 6px; border-radius: 10px; background: var(--color-primary-soft); color: inherit; font-size: 12px; text-align: center; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 9px 4px; border-top: 1px solid var(--color-border); }
.sidebar-footer-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--color-border); border-radius: 7px; color: var(--color-muted); font-size: 14px; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 12px; font-weight: 600; }
.sidebar-footer small { margin-top: 3px; color: var(--color-muted); font-size: 12px; }

.main-column { min-width: 0; }
.topbar { display: flex; height: 60px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 34px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: var(--color-muted); font-size: 13px; }
.breadcrumbs strong { color: var(--color-ink); font-weight: 550; }
.breadcrumb-divider { color: #718095; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.admin-identity { display: flex; align-items: center; gap: 8px; color: #c0cad6; font-size: 13px; }
.admin-avatar { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #454b75; border-radius: 50%; background: #252a43; color: #bdc5ff; font-size: 12px; font-weight: 650; }
.topbar-divider { width: 1px; height: 23px; background: var(--color-border); }
.topbar form { margin: 0; }
.logout-button { min-height: 34px; padding: 0 4px; border: 0; background: none; color: #a2afbf; cursor: pointer; font-size: 13px; }
.logout-button:hover { color: var(--color-primary); }
.page-content { width: min(100%, 1400px); margin: 0 auto; padding: 34px 38px 22px; }

.eyebrow { margin-bottom: 7px; color: #91a0b2; font-size: 12px; font-weight: 650; letter-spacing: 0.085em; text-transform: uppercase; }
.page-heading { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 31px; }
.page-heading h1 { margin: 0; font-size: 30px; font-weight: 650; letter-spacing: -0.045em; line-height: 1.15; }
.page-description { margin: 7px 0 0; color: var(--color-muted); font-size: 14px; line-height: 1.5; }
.create-disclosure { position: relative; flex: 0 0 auto; }
.create-disclosure > summary { list-style: none; }
.create-disclosure > summary::-webkit-details-marker { display: none; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
.button:disabled { cursor: wait; }
.button-primary { border-color: var(--color-primary); background: var(--color-primary); color: #111827; }
.button-primary:hover { border-color: var(--color-primary-hover); background: var(--color-primary-hover); }
.button-secondary { border-color: var(--color-border-strong); background: var(--color-surface-soft); color: var(--color-ink); }
.button-secondary:hover { border-color: #566a7f; background: var(--color-surface-raised); }
.button-danger { border-color: var(--color-danger); background: var(--color-danger); color: #231013; }
.button-danger:hover { border-color: #ff9ba2; background: #ff9ba2; }
.button-plus { font-size: 17px; font-weight: 400; line-height: 0.8; }
.button-full { width: 100%; min-height: 42px; }

.create-panel { position: absolute; z-index: 50; top: calc(100% + 10px); right: 0; width: min(720px, calc(100vw - 280px)); max-height: calc(100vh - 105px); overflow: auto; padding: 22px; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); box-shadow: var(--shadow-panel); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 18px; font-weight: 630; letter-spacing: -0.025em; }
.panel-heading p { margin: 5px 0 0; color: var(--color-muted); font-size: 13px; }
.panel-step { color: #a1a7b1; font-family: var(--font-mono); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; min-width: 0; gap: 8px; color: #d1dae5; font-size: 14px; font-weight: 550; }
.field small { display: block; margin-top: 3px; color: var(--color-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.field input, .field select { width: 100%; min-width: 0; height: 44px; padding: 0 13px; border: 1px solid #354658; border-radius: 7px; background: var(--color-field); color: var(--color-ink); font-size: 14px; font-weight: 400; }
.field input::placeholder { color: #748499; }
.field input:focus, .field select:focus { border-color: #8797ff; outline: 2px solid rgba(137, 152, 255, 0.18); outline-offset: 0; }
.field input[readonly] { background: #141e29; color: #aab7c6; }
.field input[aria-invalid="true"] { border-color: var(--color-danger); }
.field-wide { grid-column: 1 / -1; }
.advanced-settings { margin-top: 17px; border-top: 1px solid var(--color-border); }
.advanced-settings > summary { padding: 13px 0 5px; color: #bfcbda; cursor: pointer; font-size: 14px; font-weight: 550; list-style-position: inside; }
.advanced-settings > summary:hover { color: var(--color-primary); }
.advanced-fields { display: grid; gap: 15px; padding: 12px 0 3px; }
.auth-fields { grid-template-columns: 1fr 1fr; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--color-border); }
.form-hint { margin: 0; color: var(--color-muted); font-size: 12px; line-height: 1.45; }
.edit-footer { justify-content: flex-end; }
.edit-form { display: grid; gap: 15px; }
.edit-form > .form-footer { margin-top: 0; }

.notice { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 20px; padding: 12px 14px; border: 1px solid; border-radius: 6px; font-size: 13px; line-height: 1.5; }
.notice-success { border-color: #28644f; background: var(--color-success-soft); color: var(--color-success); }
.notice-error { border-color: #704049; background: var(--color-danger-soft); color: var(--color-danger); }
.notice-mark { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; font-weight: 700; }
.created-result { margin: -12px 0 26px; padding: 22px; border: 1px solid #34464c; border-top: 2px solid var(--color-success); border-radius: 9px; background: #121d21; }
.created-result-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 19px; }
.created-result-mark { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border: 1px solid #357358; border-radius: 50%; background: rgba(44, 176, 125, 0.13); color: var(--color-success); font-size: 14px; }
.created-result-heading .eyebrow { margin: 1px 0 5px; color: var(--color-success); }
.created-result-heading h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -0.025em; }
.created-result-heading p:last-child { margin: 5px 0 0; color: var(--color-muted); font-size: 14px; line-height: 1.5; }
.created-result-heading .icon-button { margin: -3px -5px 0 auto; }
.created-values { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.created-value { min-width: 0; padding: 13px; border: 1px solid var(--color-border); border-radius: 7px; background: rgba(8, 13, 19, 0.42); }
.created-value-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: #cdd7e3; font-size: 13px; font-weight: 600; }
.created-value-heading small { color: var(--color-muted); font-size: 12px; font-weight: 450; }
.created-value-control { display: flex; min-width: 0; align-items: center; gap: 10px; }
.created-value-control code { min-width: 0; overflow-wrap: anywhere; color: var(--color-code); font-family: var(--font-mono); font-size: 12px; line-height: 1.55; }
.created-value-control button { flex: 0 0 auto; }
.created-value-control [data-created-proxy-key] { color: #e7edf5; }
.created-result-note, .created-result-error { margin: 13px 0 0; color: var(--color-muted); font-size: 12px; line-height: 1.5; }
.created-result-error { color: var(--color-danger); }

.connection-section { margin-top: 3px; }
.section-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.section-toolbar h2 { margin: 0; font-size: 17px; font-weight: 630; letter-spacing: -0.025em; }
.section-toolbar p { margin: 5px 0 0; color: var(--color-muted); font-size: 13px; line-height: 1.45; }
.count-badge { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; border: 1px solid var(--color-border); border-radius: 5px; background: var(--color-surface); color: #c0cad7; font-size: 12px; font-weight: 550; white-space: nowrap; }
.usage-section { margin: 0 0 28px; }
.usage-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.usage-metric { min-width: 0; padding: 14px 16px; }
.usage-metric + .usage-metric { border-left: 1px solid var(--color-border); }
.usage-metric dt { color: #a8b7c7; font-size: 14px; font-weight: 550; }
.usage-metric dd { margin: 6px 0 3px; font-size: 22px; font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; }
.usage-metric small { color: var(--color-muted); font-size: 13px; line-height: 1.5; }
.usage-note { margin: 9px 1px 0; color: var(--color-muted); font-size: 13px; line-height: 1.5; }
.table-container { overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.connection-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.connection-table th { height: 45px; padding: 0 14px; border-bottom: 1px solid var(--color-border); background: #151f2a; color: #a8b7c7; font-size: 12px; font-weight: 650; letter-spacing: 0.045em; text-align: left; }
.connection-table th:nth-child(1) { width: 18%; }
.connection-table th:nth-child(2) { width: 17%; }
.connection-table th:nth-child(3) { width: 22%; }
.connection-table th:nth-child(4) { width: 34%; }
.connection-table th:nth-child(5) { width: 9%; }
.connection-row td { min-width: 0; padding: 17px 14px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.connection-row-created td { background: #151f2a; }
.connection-info { display: flex; min-width: 0; align-items: flex-start; gap: 9px; }
.provider-mark { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #3a4a5b; border-radius: 7px; background: #1a2531; color: #d3dce6; font-size: 12px; font-weight: 650; }
.connection-copy { display: grid; min-width: 0; gap: 4px; padding-top: 1px; }
.connection-copy strong { overflow-wrap: anywhere; font-size: 14px; font-weight: 620; line-height: 1.4; }
.provider-label { color: var(--color-muted); font-size: 12px; }
.table-code { display: block; max-width: 100%; overflow-wrap: anywhere; color: var(--color-code); font-family: var(--font-mono); font-size: 12px; line-height: 1.6; }
.gateway-endpoint { display: grid; min-width: 0; gap: 6px; }
.gateway-endpoint .text-button { justify-self: start; }
.credential-list { display: grid; gap: 8px; }
.credential-row { display: grid; min-width: 0; grid-template-columns: 47px minmax(45px, 1fr) auto auto; align-items: center; gap: 5px; }
.credential-row:has(.secret-revealed) .credential-label { grid-column: 1; grid-row: 1; }
.credential-row:has(.secret-revealed) [data-secret-mode="reveal"] { grid-column: 3; grid-row: 1; }
.credential-row:has(.secret-revealed) [data-secret-mode="copy"] { grid-column: 4; grid-row: 1; }
.credential-label { color: #96a6b7; font-size: 12px; }
.masked-secret { overflow: hidden; color: #b4c1d0; font-family: var(--font-mono); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.secret-revealed { grid-column: 2 / -1; grid-row: 2; min-width: 0; overflow-wrap: anywhere; padding: 5px 7px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-field); color: #f0f4fb; text-overflow: clip; white-space: normal; }
.text-button { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; padding: 0 6px; border: 0; border-radius: 5px; background: none; color: var(--color-primary); cursor: pointer; font-size: 13px; font-weight: 580; white-space: nowrap; }
.text-button:hover { background: var(--color-primary-soft); color: var(--color-primary-hover); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.edit-action { min-height: 30px; }
.icon-button { display: inline-grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #9aa9b9; cursor: pointer; font-size: 17px; line-height: 1; }
.icon-button:hover { border-color: var(--color-border); background: var(--color-surface-soft); color: var(--color-ink); }
.danger-button { color: #e9989b; }
.danger-button:hover { border-color: #704049; background: var(--color-danger-soft); color: var(--color-danger); }
.hidden-form { display: none; }
.edit-row td { padding: 0; border: 0; }
.edit-panel-inner { margin: 0 12px 14px; padding: 20px; border: 1px solid var(--color-border); border-radius: 8px; background: #141e29; }
.edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.edit-heading h3 { margin: 0; font-size: 15px; font-weight: 620; }
.edit-heading p { margin: 4px 0 0; color: var(--color-muted); font-size: 13px; }
.rotate-action { color: #ed8d94; }
.rotate-action:hover { background: var(--color-danger-soft); color: var(--color-danger); }
.empty-state { display: grid; min-height: 250px; justify-items: center; align-content: center; padding: 30px 18px; border: 1px dashed #354657; border-radius: 9px; background: var(--color-surface); text-align: center; }
.empty-icon { display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 14px; border: 1px solid #39495b; border-radius: 9px; background: #18232e; color: #a6b4c5; font-size: 19px; font-weight: 350; }
.empty-state h3 { margin: 0; font-size: 15px; font-weight: 620; }
.empty-state p { max-width: 380px; margin: 7px 0 16px; color: var(--color-muted); font-size: 13px; line-height: 1.5; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 13px; border-top: 1px solid var(--color-border); color: #8392a4; font-size: 12px; }

.app-dialog { position: fixed; width: min(440px, calc(100vw - 28px)); max-height: min(88vh, 720px); overflow: auto; padding: 26px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-panel); }
.app-dialog.created-dialog { width: min(760px, calc(100vw - 32px)); margin: auto; padding: 22px; border-color: #34464c; border-top: 2px solid var(--color-success); background: #121d21; }
.app-dialog::backdrop { background: rgba(3, 7, 12, 0.72); }
.dialog-dismiss-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.dialog-close { border-color: var(--color-border); background: var(--color-surface); font-size: 16px; }
.app-dialog .eyebrow { margin: 0 36px 8px 0; color: #91a0b2; }
.app-dialog h2 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -0.035em; }
.dialog-copy { margin: 7px 0 18px; color: var(--color-muted); font-size: 14px; line-height: 1.5; }
.dialog-error { margin: 10px 0 0; color: var(--color-danger); font-size: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 20px; max-width: min(400px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--color-border-strong); border-radius: 7px; background: #1a2531; color: var(--color-ink); box-shadow: var(--shadow-panel); font-size: 14px; }
.toast[hidden] { display: none; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 28px 18px; background: var(--color-canvas); }
.login-shell { width: min(100%, 390px); }
.login-brand { margin: 0 0 22px 3px; }
.login-panel { padding: 28px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow-panel); }
.login-panel h1 { margin: 0; font-size: 27px; font-weight: 650; letter-spacing: -0.04em; }
.login-description { margin: 7px 0 22px; color: var(--color-muted); font-size: 14px; line-height: 1.5; }
.login-panel form { display: grid; gap: 16px; }
.login-panel .button { margin-top: 3px; }
.login-foot { margin: 14px 0 0; color: #8392a4; font-size: 12px; text-align: center; }

@media (max-width: 1100px) {
  .app-layout { grid-template-columns: 204px minmax(0, 1fr); }
  .sidebar { padding-right: 10px; padding-left: 10px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .page-content { padding-right: 24px; padding-left: 24px; }
  .connection-table, .connection-table thead, .connection-table tbody, .connection-table tr, .connection-table td { display: block; }
  .connection-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .connection-table tbody { display: grid; gap: 10px; padding: 10px; }
  .connection-table .connection-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; padding: 15px; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-surface); }
  .connection-row td { display: grid; align-content: start; gap: 6px; padding: 0; border: 0; }
  .connection-row td::before { content: attr(data-label); color: #91a0b2; font-size: 12px; font-weight: 620; }
  .connection-row td:first-child, .connection-row td:nth-child(4), .connection-row td:last-child { grid-column: 1 / -1; }
  .connection-row td:first-child { padding-bottom: 11px; border-bottom: 1px solid var(--color-border); }
  .connection-row td:last-child { padding-top: 8px; border-top: 1px solid var(--color-border); }
  .connection-row-created { outline: 1px solid #48548c; }
  .connection-table .edit-row { display: block; }
  .edit-row td { display: block; }
  .edit-panel-inner { margin: 0 0 2px; }
  .create-panel { width: min(720px, calc(100vw - 250px)); }
}

@media (max-width: 760px) {
  .app-layout { display: block; }
  .sidebar { position: static; display: grid; width: 100%; height: auto; min-height: 0; grid-template-columns: 1fr; padding: 12px 16px 9px; border-right: 0; border-bottom: 1px solid var(--color-border); }
  .sidebar .brand { grid-column: 1 / -1; }
  .nav-heading, .sidebar-footer { display: none; }
  .primary-nav { display: flex; margin-top: 10px; }
  .nav-link { min-height: 34px; padding: 0 9px; }
  .topbar { height: 48px; padding: 0 17px; }
  .topbar-actions { gap: 9px; }
  .admin-identity { gap: 0; }
  .admin-identity > span:last-child { display: none; }
  .topbar-divider { height: 19px; }
  .page-content { padding: 25px 17px 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 25px; }
  .page-heading h1 { font-size: 27px; }
  .create-disclosure { align-self: stretch; }
  .create-disclosure > summary { width: 100%; }
  .create-panel { position: absolute; top: calc(100% + 7px); right: 0; width: min(720px, calc(100vw - 34px)); max-height: calc(100vh - 120px); padding: 17px; }
  .form-grid { gap: 12px; }
  .section-toolbar { align-items: flex-start; }
  .section-toolbar p { max-width: 290px; }
  .count-badge { margin-top: 1px; }
  .created-result { padding: 17px; }
  .app-dialog.created-dialog { padding: 17px; }
  .created-values { grid-template-columns: minmax(0, 1fr); }
  .created-value-control { align-items: flex-start; flex-direction: column; }
  .created-value-control button { align-self: flex-start; }
  .page-footer { margin-top: 23px; font-size: 12px; }
}

@media (max-width: 480px) {
  .page-heading { margin-bottom: 20px; }
  .page-description { max-width: 320px; }
  .form-grid, .auth-fields { grid-template-columns: minmax(0, 1fr); }
  .field-wide { grid-column: auto; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .form-footer .button { width: 100%; }
  .connection-table tbody { gap: 8px; padding: 8px; }
  .connection-table .connection-row { gap: 13px; padding: 13px; }
  .connection-row td:nth-child(2), .connection-row td:nth-child(3) { grid-column: 1 / -1; }
  .credential-row { grid-template-columns: 52px minmax(50px, 1fr) auto auto; }
  .edit-panel-inner { padding: 14px; }
  .edit-heading { align-items: flex-start; flex-direction: column; }
  .edit-footer { flex-direction: row; }
  .edit-footer .button { width: auto; }
  .usage-summary { grid-template-columns: minmax(0, 1fr); }
  .usage-metric + .usage-metric { border-top: 1px solid var(--color-border); border-left: 0; }
  .usage-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; }
  .usage-metric dt, .usage-metric small { grid-column: 1; }
  .usage-metric dd { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .login-panel { padding: 24px 21px; }
  .page-footer span:last-child { max-width: 52%; text-align: right; }
}

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

@media (forced-colors: active) {
  .button, .nav-link, .table-container, .create-panel, .login-panel { border: 1px solid ButtonText; }
  .provider-mark, .admin-avatar, .count-badge, .empty-icon { border: 1px solid ButtonText; }
  .status-dot { outline: 1px solid CanvasText; }
}
