@font-face {
  font-family: 'Montserrat';
  src: url('/admin/fonts/montserrat-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

[hidden] {
  display: none !important;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/admin/fonts/montserrat-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/admin/fonts/montserrat-800.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('/admin/fonts/open-sans-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('/admin/fonts/open-sans-500.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('/admin/fonts/open-sans-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('/admin/fonts/open-sans-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/admin/fonts/jetbrains-mono-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2c2c2c;
  --ink-soft: #667085;
  --paper: #f8fafc;
  --surface: #ffffff;
  --line: #e0e5ec;
  --line-strong: #cfd7e3;
  --nav: #f4f7fb;
  --nav-muted: #667085;
  --primary: #1e4682;
  --primary-dark: #143866;
  --primary-soft: #e8f0fb;
  --signal: #466450;
  --signal-soft: #edf4ef;
  --warning: #a15c0b;
  --warning-soft: #fff4df;
  --danger: #b42318;
  --danger-soft: #feecea;
  --blue: #2d65b0;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(30, 70, 130, 0.08);
  font-family: 'Open Sans', ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 127, 91, 0.28);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-180%);
  transition: transform 150ms ease;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.is-locked {
  overflow: hidden;
}

.is-locked .app-shell {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  padding: 28px 20px 20px;
  background: var(--nav);
  color: #fff;
}

.brand,
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand strong,
.auth-brand {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--nav-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: var(--signal);
  color: #17351e;
  font-weight: 800;
}

.primary-nav {
  display: grid;
  gap: 6px;
  margin-top: 54px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--nav-muted);
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.is-active {
  border-color: rgba(214, 240, 110, 0.16);
  background: rgba(214, 240, 110, 0.1);
  color: #fff;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--nav-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-item.is-active .nav-icon {
  border-color: var(--signal);
  color: var(--signal);
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.sidebar-note strong {
  display: block;
  font-size: 12px;
}

.sidebar-note small {
  display: block;
  margin-top: 4px;
  color: var(--nav-muted);
  font-size: 10px;
  line-height: 1.4;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #9aa5a1;
  box-shadow: 0 0 0 4px rgba(154, 165, 161, 0.14);
}

.status-dot--safe {
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(214, 240, 110, 0.12);
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 102px;
  padding: 22px clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 245, 241, 0.94);
  backdrop-filter: blur(12px);
}

.topbar h1,
.section-heading h2,
.panel h2,
.hero-card h2,
.auth-card h2,
.config-card h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.topbar h1 {
  margin-top: 4px;
  font-size: clamp(24px, 3vw, 32px);
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.eyebrow--light {
  color: var(--signal);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.updated-at {
  margin-right: 6px;
  color: var(--ink-soft);
  font-size: 11px;
}

.button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.button--quiet {
  border-color: var(--line);
  background: transparent;
}

.button--outline {
  border-color: #c7d0cb;
  background: var(--surface);
}

.button--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(8, 127, 91, 0.18);
}

.button--primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button--full {
  width: 100%;
}

main {
  padding: 34px clamp(24px, 4vw, 56px) 64px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: reveal 220ms ease both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 214px;
  padding: clamp(28px, 5vw, 48px);
  overflow: hidden;
  border-radius: 22px;
  background: var(--nav);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 320px;
  height: 320px;
  border: 60px solid rgba(214, 240, 110, 0.08);
  border-radius: 50%;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.hero-card h2 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
}

.hero-card p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px 0 0;
  color: #adc1ba;
  font-size: 13px;
  line-height: 1.6;
}

.pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9aa5a1;
  box-shadow: 0 0 0 7px rgba(154, 165, 161, 0.12);
}

.pulse.is-up {
  background: var(--signal);
  box-shadow: 0 0 0 7px rgba(214, 240, 110, 0.12);
}

.pulse.is-down {
  background: #ff8f85;
  box-shadow: 0 0 0 7px rgba(255, 143, 133, 0.12);
}

.hero-meta {
  z-index: 1;
  display: grid;
  gap: 7px;
  min-width: 145px;
  color: #adc1ba;
  font-size: 11px;
  text-align: right;
}

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

.metric-card,
.panel,
.config-card {
  border: 1px solid var(--line);
  background: var(--surface);
}

.metric-card {
  position: relative;
  min-height: 146px;
  padding: 22px;
  overflow: hidden;
  border-radius: 14px;
}

.metric-card--accent::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: var(--signal);
}

.metric-label {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.metric-value {
  display: block;
  margin-top: 16px;
  font-size: clamp(27px, 3vw, 36px);
  letter-spacing: -0.05em;
}

.metric-detail {
  display: block;
  margin-top: 7px;
  color: #83908b;
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.panel {
  padding: 24px;
  border-radius: var(--radius);
}

.panel--wide {
  min-width: 0;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel h2 {
  margin-top: 5px;
  font-size: 19px;
}

.legend {
  display: flex;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 10px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

.legend-line--http {
  background: var(--primary);
}

.legend-line--sql {
  background: var(--blue);
}

.chart-wrap {
  position: relative;
  min-height: 250px;
  margin-top: 22px;
}

#activity-chart {
  display: block;
  width: 100%;
  height: 250px;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #8a9792;
  font-size: 11px;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge--neutral {
  background: #edf0ed;
  color: #5d6b67;
}

.badge--safe {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.badge--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.pool-number {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 32px;
}

.pool-number strong {
  font-size: 42px;
  letter-spacing: -0.05em;
}

.pool-number span {
  color: var(--ink-soft);
  font-size: 11px;
}

.meter {
  width: 100%;
  height: 8px;
  margin: 14px 0 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eeea;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 300ms ease;
}

.compact-list,
.config-card dl {
  margin: 0;
}

.compact-list div,
.config-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.compact-list dt,
.config-card dt {
  color: var(--ink-soft);
  font-size: 10px;
}

.compact-list dd,
.config-card dd {
  margin: 0;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.panel-copy {
  margin: 28px 0 20px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #edf0ed;
  color: var(--primary-dark);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.9em;
}

.microcopy {
  margin: 10px 0 0;
  color: #83908b;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.activity-list {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.activity-list time {
  color: #8b9893;
  font-variant-numeric: tabular-nums;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-top: 7px;
  font-size: clamp(27px, 4vw, 40px);
}

.section-heading p:not(.eyebrow) {
  max-width: 690px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.summary-chip {
  min-width: 110px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10px;
  text-align: center;
}

.summary-chip strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-field {
  flex: 1;
  max-width: 480px;
}

.search-field input,
.auth-card input {
  width: 100%;
  border: 1px solid #cdd5d0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.search-field input {
  min-height: 44px;
  padding: 0 15px;
  font-size: 12px;
}

.search-field input::placeholder {
  color: #929d99;
}

.segmented {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.segmented button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.segmented button.is-active {
  background: var(--nav);
  color: #fff;
}

.endpoint-list {
  display: grid;
  gap: 9px;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 54px minmax(260px, 1.4fr) minmax(190px, 1fr) 110px 80px;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.method-chip {
  display: grid;
  place-items: center;
  min-height: 27px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 850;
}

.endpoint-path {
  min-width: 0;
  overflow: hidden;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-summary {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.endpoint-tag {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.copy-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.empty-state {
  padding: 50px 20px;
  border: 1px dashed #c9d2cd;
  border-radius: 14px;
  color: var(--ink-soft);
  text-align: center;
}

.safety-banner {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid #b9ddce;
  border-radius: 14px;
  background: var(--primary-soft);
}

.safety-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
}

.safety-banner strong {
  display: block;
  font-size: 13px;
}

.safety-banner p {
  margin: 5px 0 0;
  color: #356857;
  font-size: 11px;
  line-height: 1.5;
}

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

.config-card {
  padding: 25px;
  border-radius: var(--radius);
}

.config-card h3 {
  margin-top: 6px;
  margin-bottom: 20px;
  font-size: 19px;
}

.session-user {
  max-width: 220px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
}

.management-form-card,
.management-list {
  padding: 25px;
  border-radius: var(--radius);
}

.management-form-card h3,
.management-list h3 {
  margin: 6px 0 20px;
  font-size: 19px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.permission-picker {
  display: grid;
  gap: 10px;
}

.permission-picker-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.permission-picker-heading .field-label {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.permission-picker-heading small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
}

.permission-picker-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--line-strong);
  font-size: 10px;
}

.permission-picker-actions button {
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 9px;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.permission-groups {
  display: grid;
  gap: 9px;
  max-height: 430px;
  padding-right: 3px;
  overflow-y: auto;
}

.permission-group {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.permission-group-title {
  display: block;
  margin-bottom: 7px;
  color: var(--primary-dark);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.permission-options {
  display: grid;
  gap: 4px;
}

.permission-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px;
  border-radius: 8px;
  cursor: pointer;
}

.permission-option:hover {
  background: var(--primary-soft);
}

.permission-option input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.permission-option-title,
.permission-option code,
.permission-option small {
  display: block;
}

.permission-option-title {
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.permission-option code {
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-option small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.4;
}

.permission-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 10px;
  text-align: center;
}

.permission-summary {
  color: var(--primary-dark) !important;
  font-weight: 750;
}

.permission-summary--empty {
  color: var(--danger) !important;
}

.management-list {
  min-width: 0;
}

.management-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.management-row:first-child {
  border-top: 0;
}

.management-row strong,
.management-row small {
  display: block;
  overflow-wrap: anywhere;
}

.management-row small {
  margin-top: 5px;
  color: var(--ink-soft);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.row-action {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.row-action--danger {
  border-color: #e7bbb6;
  color: var(--danger);
}

.secret-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 20px 24px;
  border: 1px solid #b9dfcf;
  border-radius: var(--radius);
  background: #effaf5;
}

.secret-card code {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.password-dialog {
  width: min(92vw, 470px);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(8, 24, 19, 0.28);
}

.permission-dialog {
  width: min(94vw, 900px);
  max-height: 90vh;
  overflow-y: auto;
}

.permission-dialog .permission-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.password-dialog::backdrop {
  background: rgba(8, 24, 19, 0.7);
  backdrop-filter: blur(8px);
}

.password-dialog h2 {
  margin: 5px 0 10px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.auth-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 24, 19, 0.82);
  backdrop-filter: blur(14px);
}

body:not(.is-locked) .auth-layer {
  display: none;
}

.auth-card {
  width: min(100%, 430px);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.auth-logo {
  display: block;
  width: 178px;
  height: auto;
  margin-bottom: 34px;
}

.auth-brand {
  margin-bottom: 38px;
}

.auth-card h2 {
  margin-top: 9px;
  font-size: 34px;
}

.auth-copy {
  margin: 13px 0 24px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.auth-card form {
  display: grid;
  gap: 15px;
}

.auth-card label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.auth-card input {
  min-height: 46px;
  padding: 0 13px;
  font-size: 12px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 60px;
}

.password-field button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: #edf0ed;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.form-error {
  min-height: 16px;
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 10px;
}

.form-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.database-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.database-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr);
  gap: 14px;
}

.database-form-grid label:nth-child(3),
.database-form-grid label:nth-child(4) {
  grid-column: span 1;
}

.check-row {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line, #dfe5e1);
  border-radius: 10px;
  background: #f7f9f7;
}

.check-row label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
}

.check-row input {
  width: auto;
  margin: 0;
}

.status-text--danger {
  color: #b42318 !important;
}

@media (max-width: 640px) {
  .database-form-grid {
    grid-template-columns: 1fr;
  }
}

.auth-assurance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 9px;
}

.auth-assurance .status-dot {
  margin-top: 0;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(8, 127, 91, 0.1);
}

.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: 10px;
  background: var(--nav);
  color: #fff;
  font-size: 11px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

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

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

  .management-grid {
    grid-template-columns: 1fr;
  }

  .endpoint-row {
    grid-template-columns: 52px minmax(220px, 1fr) minmax(160px, 0.8fr) 76px;
  }

  .endpoint-tag {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    min-height: auto;
    height: auto;
    padding: 16px 20px;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 16px;
  }

  .nav-item {
    justify-content: center;
    padding: 9px;
    font-size: 10px;
    text-align: center;
  }

  .nav-icon,
  .sidebar-note {
    display: none;
  }

  .session-user {
    display: none;
  }

  .secret-card {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: auto;
    padding: 18px 20px;
  }

  .updated-at {
    display: none;
  }

  main {
    padding: 22px 20px 50px;
  }

  .hero-card {
    display: block;
    min-height: 250px;
  }

  .hero-meta {
    margin-top: 28px;
    text-align: left;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    max-width: none;
  }

  .segmented {
    overflow-x: auto;
  }

  .segmented button {
    flex: 1 0 auto;
  }

  .endpoint-row {
    grid-template-columns: 48px minmax(0, 1fr) 70px;
  }

  .endpoint-summary,
  .endpoint-tag {
    display: none;
  }
}

@media (max-width: 600px) {
  .brand small {
    display: none;
  }

  .primary-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
  }

  .nav-item {
    min-height: 44px;
    font-size: 9px;
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
  }

  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions .button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 9px;
  }

  .metric-grid,
  .configuration-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 28px 24px;
  }

  .hero-card h2 {
    font-size: 31px;
  }

  .panel-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .legend {
    width: 100%;
  }

  .chart-footer {
    flex-direction: column;
  }

  .auth-card {
    padding: 28px 22px;
  }
}

/* Claude-informed console redesign: warm, focused and intentionally low-chrome. */

:root {
  --ink: #282522;
  --ink-soft: #6f6963;
  --paper: #f5f3ed;
  --surface: #fffdf8;
  --surface-muted: #eeebe3;
  --line: #ded9cf;
  --line-strong: #c9c2b7;
  --nav: #eeeae1;
  --nav-muted: #746e67;
  --primary: #214f82;
  --primary-dark: #173b62;
  --primary-soft: #e8eef5;
  --signal: #486851;
  --signal-soft: #e8efe8;
  --accent: #c86d51;
  --accent-soft: #f5e8e1;
  --warning: #8b5b1e;
  --warning-soft: #f7edd9;
  --danger: #a33c35;
  --danger-soft: #f8e9e6;
  --radius: 10px;
  --shadow: 0 14px 42px rgba(53, 47, 41, 0.08);
}

html,
body {
  background: var(--paper);
}

body {
  font-size: 15px;
  line-height: 1.55;
}

h1,
h2,
h3,
.metric-value,
.pool-number strong,
.summary-chip strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

.brand-product {
  font-family: 'Open Sans', ui-sans-serif, system-ui, sans-serif;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(33, 79, 130, 0.2);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: var(--nav);
}

.brand {
  display: grid;
  min-height: 74px;
  align-items: start;
  gap: 7px;
  padding: 4px 10px 18px;
  border-bottom: 1px solid var(--line-strong);
}

.brand-logo {
  width: 166px;
}

.brand-product {
  color: var(--nav-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.primary-nav {
  gap: 3px;
  margin-top: 24px;
}

.nav-item {
  min-height: 46px;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  color: #625d57;
  font-size: 13px;
  font-weight: 600;
}

.nav-item::before {
  top: 10px;
  bottom: 10px;
  left: -16px;
  width: 3px;
  background: transparent;
}

.nav-item:hover {
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink);
}

.nav-item.is-active {
  background: #dfdbd2;
  color: var(--ink);
  box-shadow: none;
}

.nav-item.is-active::before {
  background: var(--accent);
}

.nav-icon,
.nav-item.is-active .nav-icon {
  width: 26px;
  height: 26px;
  border: 1px solid #cec7bb;
  border-radius: 6px;
  background: var(--surface);
  color: #756e65;
  font-size: 9px;
}

.sidebar-note {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.58);
}

.sidebar-note strong {
  color: var(--ink);
  font-size: 12px;
}

.sidebar-note small {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.workspace {
  background: var(--paper);
}

.topbar {
  min-height: 66px;
  padding: 11px clamp(24px, 4vw, 58px);
  border-bottom: 1px solid rgba(201, 194, 183, 0.7);
  background: rgba(245, 243, 237, 0.94);
  backdrop-filter: blur(12px);
}

.topbar > div:first-child {
  display: none;
}

.topbar-actions {
  width: 100%;
  justify-content: flex-end;
  gap: 8px;
}

.updated-at,
.session-user {
  color: var(--ink-soft);
  font-size: 12px;
}

.session-user {
  margin-right: 8px;
  color: var(--ink);
  font-weight: 600;
}

main {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 46px clamp(30px, 5vw, 72px) 72px;
}

main:focus {
  outline: 0;
}

.view {
  animation: none;
}

.section-heading {
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 30px;
}

.section-heading > div:first-child {
  max-width: 760px;
}

.section-heading h2 {
  margin: 7px 0 9px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.section-heading p:not(.eyebrow) {
  max-width: 690px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

.eyebrow {
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.button--primary {
  border-color: #272421;
  background: #272421;
  color: #fffdf8;
  box-shadow: none;
}

.button--primary:hover:not(:disabled) {
  border-color: #3a3632;
  background: #3a3632;
}

.button--quiet,
.button--outline {
  border-color: var(--line-strong);
  background: transparent;
  color: #4f4a45;
}

.button--quiet:hover:not(:disabled),
.button--outline:hover:not(:disabled) {
  border-color: #a9a195;
  background: rgba(255, 253, 248, 0.75);
}

.badge,
.summary-chip,
.method-chip {
  border-radius: 999px;
}

.badge {
  min-height: 26px;
  padding: 5px 10px;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.summary-chip {
  display: inline-flex;
  width: auto;
  height: auto;
  align-items: center;
  min-width: auto;
  min-height: 42px;
  padding: 8px 13px;
  gap: 5px;
  border-color: var(--line-strong);
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
  font-size: 11px;
}

.summary-chip strong {
  color: var(--ink);
  font-size: 21px;
}

.safety-banner {
  gap: 16px;
  margin: 0 0 24px;
  padding: 17px 20px;
  border: 1px solid #cfd8ce;
  border-radius: 8px;
  background: var(--signal-soft);
}

.safety-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: var(--signal);
  font-size: 9px;
}

.safety-banner strong {
  font-size: 13px;
}

.safety-banner p {
  margin-top: 3px;
  color: #576b59;
  font-size: 12px;
  line-height: 1.55;
}

.toolbar {
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.search-field input,
.auth-card input,
.stack-form input,
.stack-form select,
.stack-form textarea,
.password-dialog input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.stack-form textarea {
  padding-top: 11px;
  padding-bottom: 11px;
}

.stack-form label > span,
.password-dialog label > span,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: #514c47;
  font-size: 12px;
  font-weight: 700;
}

.search-field input:focus,
.auth-card input:focus,
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.password-dialog input:focus {
  border-color: #7d91a9;
  box-shadow: 0 0 0 3px rgba(33, 79, 130, 0.1);
}

.search-field input {
  min-height: 46px;
  background: rgba(255, 253, 248, 0.7);
}

.segmented {
  padding: 3px;
  border-color: var(--line-strong);
  background: var(--surface-muted);
  box-shadow: none;
}

.segmented button {
  min-height: 37px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 12px;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(50, 45, 39, 0.09);
}

.directory-card {
  overflow: hidden;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
}

.directory-heading {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.directory-heading h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.directory-hint {
  max-width: 320px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: right;
}

.management-list {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.management-row,
.procedure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 88px;
  align-items: center;
  gap: 24px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.management-row:last-child,
.procedure-row:last-child {
  border-bottom: 0;
}

.management-row:hover,
.procedure-row:hover {
  background: rgba(255, 253, 248, 0.48);
}

.management-row > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.management-row strong,
.procedure-row strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.management-row small,
.procedure-row small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.row-action,
.copy-button {
  min-height: 35px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: #4f4a45;
  font-size: 11px;
  font-weight: 700;
}

.row-action:hover,
.copy-button:hover {
  border-color: #a79f93;
  background: var(--surface);
}

.row-action--danger {
  border-color: transparent;
  color: var(--danger);
}

.directory-empty {
  display: grid;
  min-height: 270px;
  place-items: center;
  align-content: center;
  padding: 44px 24px;
  text-align: center;
}

.directory-empty strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 25px;
  font-weight: 400;
}

.directory-empty p {
  max-width: 440px;
  margin: 7px 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
}

.directory-empty .button {
  width: auto;
  min-height: 42px;
}

.directory-empty .button.button--primary {
  border-color: #272421;
  background: #272421;
  color: #fffdf8;
}

.procedure-row {
  grid-template-columns: minmax(230px, 0.85fr) minmax(240px, 0.9fr) minmax(300px, 1.4fr) auto;
}

.procedure-row-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.procedure-row-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.procedure-row code {
  min-width: 0;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.procedure-row-actions {
  min-width: 300px;
}

.row-action--primary {
  border-color: #aebfd5;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.row-action--primary:hover {
  border-color: #8fa8c7;
  background: #dfeafb;
}

.workspace-dialog {
  width: min(620px, calc(100vw - 32px));
  max-width: none;
  max-height: min(880px, calc(100vh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(38, 33, 29, 0.24);
}

.workspace-dialog--permissions {
  width: min(980px, calc(100vw - 32px));
}

.workspace-dialog--editor {
  width: min(1180px, calc(100vw - 28px));
  height: min(900px, calc(100vh - 28px));
  max-height: none;
}

.workspace-dialog--preview {
  width: min(1080px, calc(100vw - 28px));
  height: min(820px, calc(100vh - 28px));
  max-height: none;
}

.workspace-dialog::backdrop {
  background: rgba(40, 36, 32, 0.58);
  backdrop-filter: blur(5px);
}

.workspace-dialog > form {
  display: flex;
  height: 100%;
  max-height: inherit;
  flex-direction: column;
  gap: 0;
}

.workspace-dialog > .dialog-shell {
  display: flex;
  height: 100%;
  max-height: inherit;
  flex-direction: column;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px 22px;
  border-bottom: 1px solid var(--line);
}

.dialog-heading h2,
.dialog-heading h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.dialog-heading p:not(.eyebrow) {
  max-width: 650px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.dialog-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dialog-close {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.dialog-close:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.dialog-body {
  display: grid;
  gap: 18px;
  min-height: 0;
  padding: 25px 28px 28px;
  overflow-y: auto;
}

.dialog-body--editor {
  display: block;
  align-content: start;
}

.dialog-actions--sticky {
  flex: 0 0 auto;
  margin: 0;
  padding: 17px 28px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
}

.api-key-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.api-key-fields > label:first-child {
  grid-column: 1 / -1;
}

.api-key-fields > .form-help {
  grid-column: 1 / -1;
  margin: -8px 0 0;
}

.form-help {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.permission-picker {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f3;
}

.permission-picker-heading {
  margin-bottom: 14px;
}

.permission-picker-actions button {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.permission-groups,
.permission-dialog .permission-options {
  max-height: none;
  overflow: visible;
}

.permission-group {
  border-color: var(--line);
  background: var(--surface);
}

.permission-option {
  min-height: 62px;
  padding: 10px 12px;
}

.procedure-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.procedure-field-wide {
  grid-column: 1 / -1;
}

.editor-tabs {
  display: flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-muted);
  margin-bottom: 16px;
}

.editor-tabs button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.editor-tabs button:hover {
  color: var(--ink);
}

.editor-tabs button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(50, 45, 39, 0.09);
}

.editor-panel label {
  display: block;
}

.editor-panel .code-editor {
  width: 100%;
  min-height: 380px;
  max-height: none;
  resize: vertical;
  border-color: #c8c1b6;
  background: #fbfaf6;
  color: #302d2a;
  font-size: 13px;
  line-height: 1.6;
}

.procedure-active-option {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--signal-soft);
}

.procedure-active-option input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.procedure-active-option span {
  margin: 0;
}

.procedure-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.procedure-preview-heading-copy {
  min-width: 0;
}

.procedure-preview-heading-copy h3 {
  overflow-wrap: anywhere;
}

.procedure-preview-heading-copy > code {
  display: inline-block;
  max-width: 100%;
  margin-top: 10px;
  padding: 5px 8px;
  overflow-wrap: anywhere;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
}

.procedure-preview-body {
  display: flex;
  flex: 1 1 auto;
  gap: 16px;
  flex-direction: column;
  overflow: hidden;
}

.procedure-preview-metadata {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.procedure-preview-metadata > div {
  min-width: 0;
  padding: 13px 15px;
  background: #faf8f3;
}

.procedure-preview-metadata dt {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.procedure-preview-metadata dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.procedure-preview-metadata code {
  padding: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: 11px;
}

.procedure-preview-context {
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
}

.procedure-preview-context p,
.procedure-preview-context small {
  margin: 0;
}

.procedure-preview-context p {
  color: #494540;
  font-size: 13px;
  line-height: 1.6;
}

.procedure-preview-context small {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.procedure-preview-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.procedure-preview-tabs {
  min-width: 0;
  margin-bottom: 0;
}

.procedure-preview-toolbar > .button {
  flex: 0 0 auto;
}

.procedure-preview-panel {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  border: 1px solid #c8c1b6;
  border-radius: 8px;
  background: #fbfaf6;
}

.procedure-preview-panel pre {
  min-width: max-content;
  margin: 0;
  padding: 20px 22px;
}

.procedure-preview-panel code {
  padding: 0;
  background: transparent;
  color: #302d2a;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre;
}

.hero-card {
  min-height: 184px;
  padding: clamp(28px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.hero-card::before,
.hero-card::after {
  display: none;
}

.hero-card h2 {
  color: var(--ink);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 400;
}

.hero-card p:not(.eyebrow),
.hero-meta {
  color: var(--ink-soft);
}

.hero-meta {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.metric-grid {
  gap: 0;
  margin: 18px 0 26px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.metric-card {
  min-height: 128px;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-card:last-child {
  border-right: 0;
}

.metric-card::before,
.metric-card--accent::after {
  display: none;
}

.metric-value {
  color: var(--ink);
  font-size: 36px;
}

.dashboard-grid,
.configuration-grid {
  gap: 16px;
}

.panel,
.config-card,
.endpoint-row {
  border-color: var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.68);
  box-shadow: none;
}

.panel-heading h2,
.panel-heading h3,
.config-card h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

.endpoint-row {
  padding: 19px 20px;
}

.endpoint-row:hover {
  border-color: var(--line-strong);
  box-shadow: none;
}

.endpoint-path,
code {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.secret-card {
  border: 1px solid #d5baa9;
  border-radius: 9px;
  background: var(--accent-soft);
}

.password-dialog,
.database-dialog,
.permission-dialog {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(38, 33, 29, 0.24);
}

.password-dialog::backdrop,
.database-dialog::backdrop,
.permission-dialog::backdrop {
  background: rgba(40, 36, 32, 0.58);
  backdrop-filter: blur(5px);
}

.auth-layer {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 36px 24px;
  background: var(--paper);
}

.auth-showcase {
  display: none;
}

.auth-panel {
  display: grid;
  width: 100%;
  min-height: 0;
  place-items: center;
  padding: 0;
  background: transparent;
}

.auth-card {
  width: min(100%, 468px);
  padding: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin-top: 8px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.auth-copy {
  margin: 10px 0 26px;
  color: var(--ink-soft);
  font-size: 14px;
}

.auth-card label > span {
  color: #514c47;
  font-size: 12px;
}

.auth-card input {
  min-height: 46px;
}

.password-field button {
  top: 6px;
  right: 6px;
  min-height: 34px;
  background: var(--surface-muted);
  color: var(--ink);
}

.auth-assurance {
  color: var(--ink-soft);
  font-size: 11px;
}

.toast {
  border-radius: 8px;
  background: #282522;
  color: #fffdf8;
  box-shadow: 0 18px 44px rgba(38, 33, 29, 0.22);
}

@media (max-width: 1400px) {
  .procedure-row {
    grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 0.85fr) minmax(260px, 1.2fr);
  }

  .procedure-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: 0;
    height: auto;
    padding: 16px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .brand {
    min-height: 0;
    padding: 0 0 14px;
    border: 0;
  }

  .primary-nav {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0 0 12px;
    overflow-x: auto;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .nav-item::before,
  .sidebar-note {
    display: none;
  }

  .topbar {
    min-height: 58px;
  }

  main {
    padding: 36px 24px 56px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .management-row,
  .procedure-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .row-actions,
  .procedure-row-actions {
    grid-column: auto;
    justify-content: flex-start;
  }

  .directory-hint {
    display: none;
  }

  .api-key-fields,
  .procedure-field-grid {
    grid-template-columns: 1fr;
  }

  .procedure-field-wide,
  .api-key-fields > label:first-child {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 10px 16px;
  }

  .updated-at,
  .session-user {
    display: none;
  }

  main {
    padding: 28px 18px 48px;
  }

  .section-heading h2 {
    font-size: 36px;
  }

  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .toolbar,
  .procedure-toolbar,
  .directory-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .button,
  .procedure-toolbar .button {
    width: 100%;
  }

  .management-row,
  .procedure-row {
    padding: 17px 2px;
  }

  .row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .row-action {
    width: 100%;
  }

  .workspace-dialog,
  .workspace-dialog--editor,
  .workspace-dialog--preview {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    max-height: none;
    border-radius: 9px;
  }

  .dialog-heading,
  .dialog-body,
  .dialog-actions--sticky {
    padding-right: 18px;
    padding-left: 18px;
  }

  .dialog-heading {
    gap: 14px;
  }

  .dialog-heading h2,
  .dialog-heading h3 {
    font-size: 26px;
  }

  .dialog-heading .badge {
    display: none;
  }

  .procedure-preview-metadata {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .procedure-preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .procedure-preview-tabs,
  .procedure-preview-toolbar > .button {
    width: 100%;
  }

  .procedure-preview-body {
    overflow-y: auto;
  }

  .procedure-preview-panel {
    min-height: 330px;
  }

  .editor-panel .code-editor {
    min-height: 330px;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card:nth-child(2) {
    border-right: 0;
  }

  .metric-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .auth-card {
    padding: 28px 22px;
  }
}

/* Disabled legacy procedure and canonical visual overrides.
.procedure-safety-banner .safety-mark {
  width: 44px;
  min-width: 44px;
  font-size: 9px;
}

.procedure-toolbar {
  margin-bottom: 14px;
}

.procedure-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(540px, 1.55fr);
  gap: 14px;
  align-items: start;
}

.procedure-list-card,
.procedure-editor-card {
  min-width: 0;
}

.procedure-list-card {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.procedure-editor-card {
  scroll-margin-top: 100px;
}

.procedure-row {
  display: grid;
  gap: 9px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.procedure-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.procedure-row-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.procedure-row-heading strong {
  overflow-wrap: anywhere;
}

.procedure-row code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.procedure-row small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.procedure-row-actions {
  justify-content: flex-start;
}

.procedure-form {
  gap: 16px;
}

.procedure-field-grid,
.procedure-json-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.procedure-json-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.procedure-field-wide {
  grid-column: 1 / -1;
}

.stack-form textarea {
  width: 100%;
  min-height: 86px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid #cdd6e2;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.stack-form textarea:focus {
  border-color: #6f91be;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(30, 70, 130, 0.1);
}

.code-editor {
  tab-size: 2;
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
  font-size: 10px !important;
  line-height: 1.55 !important;
  white-space: pre;
}

.code-editor--sql {
  min-height: 390px !important;
}

.procedure-active-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--ink-soft);
  font-size: 11px;
}

.procedure-active-option input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.procedure-active-option span {
  margin: 0 !important;
}

.procedure-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

@media (max-width: 1180px) {
  .procedure-workspace {
    grid-template-columns: 1fr;
  }

  .procedure-list-card {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .procedure-field-grid,
  .procedure-json-grid {
    grid-template-columns: 1fr;
  }

  .procedure-field-wide {
    grid-column: auto;
  }
}

@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;
  }
}

*/

/* Mapa documental: endpoint -> tenant -> base -> objeto SQL -> fuentes. */
.data-map-safety .safety-mark {
  width: 48px;
  min-width: 48px;
  font-size: 9px;
}

.data-map-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.data-map-summary article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.data-map-summary span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.data-map-summary strong {
  color: var(--primary);
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 23px;
}

.data-map-toolbar {
  margin-bottom: 14px;
}

.data-map-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.65fr);
  align-items: start;
  gap: 14px;
}

.data-map-directory,
.data-map-detail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.data-map-directory {
  max-height: calc(100vh - 250px);
  overflow: hidden;
}

.data-map-directory-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.data-map-directory-heading h3 {
  margin-top: 4px;
  font-size: 15px;
}

.data-map-directory-heading > span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.data-map-list {
  display: grid;
  gap: 1px;
  max-height: calc(100vh - 335px);
  padding: 7px;
  overflow-y: auto;
  background: var(--line);
}

.data-map-item {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  border-left: 3px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.data-map-item:hover,
.data-map-item.is-active {
  border-left-color: var(--primary);
  background: #f4f7fb;
}

.data-map-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.data-map-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.data-map-item code {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  background: transparent;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.data-map-item small {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.data-map-item > strong {
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-map-access {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.data-map-access--procedure {
  background: var(--primary-soft);
  color: var(--primary);
}

.data-map-access--direct {
  background: #edf4ef;
  color: #346044;
}

.data-map-access--mixed {
  background: var(--warning-soft);
  color: var(--warning);
}

.data-map-access--none {
  background: #eef1f5;
  color: #5e6978;
}

.data-map-detail {
  min-height: 520px;
  padding: 24px;
}

.data-map-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.data-map-detail-heading h3 {
  margin: 5px 0 9px;
  font-size: 22px;
}

.data-map-route {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.data-map-subheading {
  margin: 22px 0 11px;
}

.data-map-subheading h4 {
  margin-top: 4px;
  font-size: 14px;
}

.data-map-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 3px 3px 12px;
  overflow-x: auto;
  list-style: none;
}

.data-map-flow-step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: 9px;
  background: #fbfcfe;
}

.data-map-flow-step:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  top: 43px;
  right: -11px;
  color: #91a0b4;
  font-size: 18px;
  font-weight: 700;
}

.data-map-flow-step > span {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-map-flow-step strong,
.data-map-flow-step code {
  padding: 0;
  overflow-wrap: anywhere;
  background: transparent;
  color: #24344a;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.55;
}

.data-map-flow-step--access {
  border-top-color: #6f8eb8;
}

.data-map-flow-step--database {
  border-top-color: #a15c0b;
}

.data-map-flow-step--sql {
  border-top-color: #7656a6;
}

.data-map-flow-step--source {
  border-top-color: #466450;
}

.data-map-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.data-map-metadata > div {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.data-map-metadata dt {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-map-metadata dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 10px;
  line-height: 1.55;
}

.data-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .data-map-workspace {
    grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  }
}

@media (max-width: 900px) {
  .data-map-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-map-workspace {
    grid-template-columns: 1fr;
  }

  .data-map-directory,
  .data-map-list {
    max-height: 420px;
  }
}

@media (max-width: 600px) {
  .data-map-summary,
  .data-map-metadata {
    grid-template-columns: 1fr;
  }

  .data-map-detail {
    padding: 18px;
  }

  .data-map-detail-heading {
    flex-direction: column;
  }

  .data-map-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/*
Simplifica Soluciones canonical visual system.

body {
  font-family: 'Open Sans', ui-sans-serif, system-ui, sans-serif;
  background: var(--paper);
}

h1,
h2,
h3,
.brand-product,
.metric-value,
.pool-number strong,
.summary-chip strong {
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
}

code,
.endpoint-path,
.activity-list time,
.secret-card code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(30, 70, 130, 0.2);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: 256px minmax(0, 1fr);
}

.is-locked .app-shell {
  filter: none;
}

.sidebar {
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: #f4f7fb;
  color: var(--ink);
}

.brand {
  display: grid;
  gap: 7px;
  min-height: 72px;
  padding: 4px 10px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
}

.brand-product {
  color: #607087;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-nav {
  gap: 4px;
  margin-top: 24px;
}

.nav-item {
  position: relative;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #5e6b7c;
  font-size: 12px;
  font-weight: 600;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.nav-item:hover {
  background: #eaf0f8;
  color: var(--primary);
}

.nav-item.is-active {
  border: 0;
  background: linear-gradient(90deg, #e4edf9 0%, #edf3fa 100%);
  color: var(--primary);
}

.nav-item.is-active::before {
  background: var(--primary);
}

.nav-icon {
  width: 27px;
  height: 27px;
  border: 1px solid #cbd8e9;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #6681a6;
  font-size: 8px;
}

.nav-item.is-active .nav-icon {
  border-color: #9eb6d7;
  background: #fff;
  color: var(--primary);
}

.sidebar-note {
  padding: 13px;
  border-color: #d8e1ec;
  border-radius: 8px;
  background: #fff;
}

.sidebar-note strong {
  color: var(--ink);
}

.sidebar-note small {
  color: var(--ink-soft);
}

.status-dot--safe,
.auth-assurance .status-dot {
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(70, 100, 80, 0.12);
}

.workspace {
  background: #fff;
}

.topbar {
  min-height: 80px;
  padding: 15px clamp(24px, 3.4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin-top: 3px;
  font-size: clamp(22px, 2.5vw, 29px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.button {
  min-height: 36px;
  padding: 0 15px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}

.button--quiet,
.button--outline {
  border-color: var(--line-strong);
  background: #fff;
  color: #465569;
}

.button--quiet:hover:not(:disabled),
.button--outline:hover:not(:disabled) {
  border-color: #aebdd0;
  background: #f6f8fb;
}

.button--primary {
  background: linear-gradient(180deg, #275792 0%, #1e4682 100%);
  color: #fff;
  box-shadow: 0 5px 14px rgba(30, 70, 130, 0.2);
}

.button--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #214d85 0%, #173b70 100%);
}

main {
  max-width: 1536px;
  margin: 0 auto;
  padding: 28px clamp(24px, 3.4vw, 48px) 56px;
}

.hero-card {
  min-height: 194px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #fbfcfe 100%);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-card::before,
.hero-card::after {
  content: '';
  position: absolute;
  border: 0;
  border-radius: 50%;
  pointer-events: none;
}

.hero-card::before {
  top: -95px;
  right: 140px;
  width: 230px;
  height: 230px;
  background: rgba(30, 70, 130, 0.055);
}

.hero-card::after {
  right: -42px;
  bottom: -78px;
  width: 210px;
  height: 210px;
  background: rgba(70, 100, 80, 0.065);
}

.eyebrow--light {
  color: var(--signal);
}

.hero-card h2 {
  color: var(--ink);
  font-size: clamp(27px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.hero-card p:not(.eyebrow),
.hero-meta {
  color: #667085;
}

.pulse.is-up {
  background: var(--signal);
  box-shadow: 0 0 0 7px rgba(70, 100, 80, 0.1);
}

.hero-meta {
  position: relative;
  z-index: 2;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.metric-grid {
  gap: 12px;
  margin: 14px 0;
}

.metric-card,
.panel,
.config-card,
.endpoint-row,
.summary-chip,
.segmented {
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(30, 70, 130, 0.035);
}

.metric-card {
  min-height: 136px;
  padding: 20px;
  border-radius: 10px;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 2px;
  background: #dbe5f2;
}

.metric-card--accent::after {
  top: 0;
  right: 18px;
  left: 18px;
  width: auto;
  height: 2px;
  background: var(--signal);
}

.metric-value {
  color: var(--primary);
  font-weight: 700;
}

.dashboard-grid,
.configuration-grid,
.management-grid {
  gap: 14px;
}

.panel,
.config-card,
.management-form-card,
.management-list,
.endpoint-row {
  border-radius: 10px;
}

.panel h2,
.config-card h3,
.management-form-card h3,
.management-list h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.badge,
.summary-chip,
.method-chip {
  border-radius: 6px;
}

.badge--neutral {
  background: #eef2f7;
  color: #59677a;
}

.badge--safe {
  background: var(--signal-soft);
  color: #36533f;
}

.badge--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.meter {
  background: #e9eef5;
}

.meter span,
.legend-line--http {
  background: var(--primary);
}

code {
  background: #edf2f8;
  color: var(--primary-dark);
}

.segmented button.is-active {
  background: var(--primary);
  color: #fff;
}

.search-field input,
.auth-card input,
.stack-form input,
.stack-form select,
.password-dialog input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #cdd6e2;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.stack-form label > span,
.password-dialog label > span {
  display: block;
  margin-bottom: 6px;
  color: #4b596c;
  font-size: 10px;
  font-weight: 700;
}

.search-field input::placeholder,
.auth-card input::placeholder,
.stack-form input::placeholder {
  color: #98a2b3;
}

.search-field input:focus,
.auth-card input:focus,
.stack-form input:focus,
.stack-form select:focus,
.password-dialog input:focus {
  border-color: #6f91be;
  box-shadow: 0 0 0 3px rgba(30, 70, 130, 0.1);
}

.endpoint-path {
  color: #203a5f;
}

.safety-banner {
  border-color: #cddfd3;
  border-radius: 10px;
  background: var(--signal-soft);
}

.safety-mark {
  background: var(--signal);
}

.safety-banner p {
  color: #506b58;
}

.secret-card {
  border-color: #bfd0e5;
  background: #f2f6fb;
}

.row-action,
.copy-button {
  border-color: var(--line-strong);
  border-radius: 7px;
  background: #fff;
}

.password-dialog {
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(23, 46, 79, 0.25);
}

.password-dialog::backdrop {
  background: rgba(17, 35, 61, 0.68);
  backdrop-filter: blur(6px);
}

.auth-layer {
  grid-template-columns: minmax(0, 58%) minmax(420px, 42%);
  place-items: stretch;
  padding: 0;
  overflow: auto;
  background: #fff;
  backdrop-filter: none;
}

.auth-showcase {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 40px;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, #1e4682 0%, #153d76 52%, #0f2f5f 100%);
  background-size:
    32px 32px,
    32px 32px,
    auto;
  color: #fff;
}

.auth-showcase::before,
.auth-showcase::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-showcase::before {
  top: -150px;
  left: -120px;
  width: 410px;
  height: 410px;
  background: rgba(255, 255, 255, 0.055);
  filter: blur(2px);
}

.auth-showcase::after {
  right: -120px;
  bottom: -160px;
  width: 430px;
  height: 430px;
  background: rgba(70, 100, 80, 0.28);
  filter: blur(8px);
}

.auth-showcase-content,
.auth-showcase-footer {
  position: relative;
  z-index: 1;
}

.auth-showcase-content {
  max-width: 620px;
}

.auth-showcase-kicker {
  margin: 0 0 22px;
  color: #c9d6e8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.auth-showcase h2 {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.auth-showcase h2 span {
  color: #9fc3a9;
}

.auth-showcase-content > p:not(.auth-showcase-kicker) {
  max-width: 540px;
  margin: 24px 0 0;
  color: #d3ddeb;
  font-size: 14px;
  line-height: 1.75;
}

.auth-feature-list {
  display: grid;
  gap: 10px;
  max-width: 510px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #eef3f8;
  font-size: 12px;
}

.auth-feature-list span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #b8ccdf;
  font-size: 8px;
  font-weight: 700;
}

.auth-showcase-footer {
  position: absolute;
  bottom: 30px;
  left: 40px;
  margin: 0;
  color: #aebfd3;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.auth-panel {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 42px 48px;
  background: #fff;
}

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

.auth-card h2 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.auth-copy {
  margin: 11px 0 24px;
  color: #667085;
  font-size: 12px;
  line-height: 1.65;
}

.auth-card form {
  gap: 14px;
}

.auth-card label > span {
  color: #435166;
  font-size: 10px;
  font-weight: 700;
}

.auth-card input {
  min-height: 42px;
}

.password-field button {
  top: 5px;
  right: 5px;
  min-height: 32px;
  border-radius: 6px;
  background: #edf2f8;
  color: var(--primary);
}

.auth-assurance {
  margin-top: 18px;
  color: #667085;
}

.toast {
  border-radius: 8px;
  background: #18375f;
  box-shadow: 0 16px 40px rgba(23, 55, 95, 0.24);
}

@media (max-width: 960px) {
  .auth-layer {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-panel {
    padding: 36px 28px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    min-height: 0;
    padding: 0;
    border-bottom: 0;
  }

  .brand-logo {
    width: 155px;
  }

  .nav-item::before {
    display: none;
  }

  .nav-item.is-active {
    box-shadow: inset 0 -2px var(--primary);
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 15px 18px;
  }

  main {
    padding: 22px 18px 44px;
  }

  .hero-card {
    min-height: 240px;
  }

  .auth-panel {
    padding: 30px 22px;
  }

  .permission-dialog .permission-options {
    grid-template-columns: 1fr;
  }
}
*/

@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;
  }
}
[id='view-cloud-services'] .cloud-intro {
  margin-bottom: 24px;
}

[id='view-cloud-services'] .cloud-intro p {
  max-width: 86ch;
  line-height: 1.6;
}

#cloud-config-dialog .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

#cloud-config-dialog .stack-form {
  gap: 9px;
}

#cloud-config-dialog p,
#cloud-config-dialog h2 {
  margin: 0;
}

#cloud-config-dialog p {
  line-height: 1.45;
}

#cloud-config-dialog input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
}

#cloud-config-dialog .form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}
.cloud-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#view-contracts .toolbar {
  flex-wrap: wrap;
}

#view-contracts .search-field {
  flex: 1 1 auto;
  min-width: min(240px, 100%);
}

#view-contracts .toolbar select,
.permission-groups > input[type='search'] {
  max-width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #cdd6e2;
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

#view-contracts .toolbar select:focus-visible,
.permission-groups > input[type='search']:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
