:root {
  color-scheme: light;
  --ink: #16252f;
  --muted: #60717c;
  --line: #d9e2e6;
  --panel: #ffffff;
  --canvas: #f3f6f5;
  --brand: #0c6b58;
  --brand-dark: #074f42;
  --accent: #e4f2ed;
  --warning: #9a5b0a;
  --danger: #a43d3d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
.hero { padding: 38px max(24px, calc((100vw - 1440px) / 2)); display: flex; gap: 32px; align-items: center; justify-content: space-between; color: white; background: linear-gradient(125deg, #073d38, #0c6b58 62%, #17856c); }
.eyebrow, .step { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); letter-spacing: -.04em; }
.subtitle { max-width: 700px; margin: 8px 0 0; color: #d9eee7; }
.connection-card { min-width: 330px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; padding: 18px; color: var(--ink); background: rgba(255,255,255,.96); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.15); }
.connection-card small { display: block; margin-top: 3px; color: var(--muted); }
.connection-card .button { grid-column: 1 / -1; text-align: center; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa8ae; box-shadow: 0 0 0 4px #e5eaec; }
.status-dot.ok { background: #1b8c67; box-shadow: 0 0 0 4px #dcefe8; }
.readonly-badge { padding: 9px 13px; color: #073d38; background: #d9eee7; border: 1px solid rgba(255,255,255,.45); border-radius: 99px; font-size: 13px; font-weight: 800; }
main { max-width: 1440px; margin: 0 auto; padding: 28px 24px 56px; }
.panel { margin-bottom: 22px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(22,37,47,.05); }
.section-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: 23px; }
.step { color: var(--brand); }
.hint { padding: 7px 10px; color: var(--muted); background: #f4f7f7; border-radius: 99px; font-size: 12px; }
form { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: #344650; }
input, select { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #bfcbd0; border-radius: 9px; font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(12,107,88,.15); border-color: var(--brand); }
.wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; }
.button { min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.primary { color: white; background: var(--brand); }
.primary:hover { background: var(--brand-dark); }
.secondary { color: var(--brand-dark); background: white; border-color: #98bdb3; }
.ghost { color: var(--brand); background: var(--accent); }
.inline-status, .notice, .empty-state { margin-top: 18px; padding: 13px 15px; border-radius: 9px; }
.muted, .empty-state { color: var(--muted); background: #f4f7f7; }
.success { color: #075a42; background: #dff2eb; }
.warning { color: var(--warning); background: #fff1d9; }
.error { color: var(--danger); background: #fde9e7; }
.inspection { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.inspection h3 { margin: 0 0 10px; }
.inspection p { margin: 7px 0; }
.selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { flex: 0 0 auto; padding: 12px 16px; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; font: inherit; font-weight: 750; cursor: pointer; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.table-wrap { max-height: 68vh; overflow: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; }
table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { max-width: 340px; min-width: 130px; padding: 10px 12px; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
th { position: sticky; top: 0; z-index: 1; color: #fff; background: #254a45; }
tbody tr:nth-child(even) td { background: #f7f9f8; }
.hidden { display: none !important; }
.loading { position: relative; padding-left: 38px; }
.loading::before { content: ""; position: absolute; left: 15px; top: 14px; width: 12px; height: 12px; border: 2px solid #aac5bd; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .hero { align-items: stretch; flex-direction: column; padding: 28px 18px; }
  .connection-card { min-width: 0; }
  main { padding: 18px 12px 40px; }
  .panel { padding: 18px; }
  form, .selectors { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .section-heading { align-items: flex-start; }
  .hint { display: none; }
  .public-hero { align-items: flex-start; }
}
