:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e1ec;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #b42318;
  --good: #067647;
  --shadow: 0 20px 60px rgba(23, 32, 51, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
}

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

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  background: var(--brand);
  border-radius: 6px;
  color: #ffffff;
  display: inline-grid;
  height: 34px;
  letter-spacing: 0;
  place-items: center;
  width: 48px;
}

.nav a {
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  text-decoration: none;
}

.nav a.active {
  background: #e6f5f3;
  color: var(--brand-dark);
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px 24px 48px;
}

.auth-panel {
  align-items: center;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: calc(100vh - 136px);
}

.auth-panel h1,
.page-heading h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
  margin: 8px 0 14px;
}

.eyebrow,
.field-label {
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.form-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-card {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.form-stack {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.form-stack h2,
.panel h2 {
  margin: 0;
}

label {
  color: #344054;
  display: grid;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 7px;
}

input,
select {
  background: #ffffff;
  border: 1px solid #b8c4d5;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

button,
.button-link {
  align-items: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  text-decoration: none;
}

.primary {
  background: var(--brand);
  color: #ffffff;
}

.secondary,
.button-link {
  background: #eef2f6;
  color: #233044;
}

.danger {
  background: #fee4e2;
  color: var(--accent);
}

.icon-button {
  background: #eef2f6;
  color: #233044;
  min-width: 42px;
  padding: 0;
}

.page-heading,
.panel-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.page-heading {
  margin-bottom: 24px;
}

.status-pill {
  background: #eef2f6;
  border-radius: 999px;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 12px;
  text-transform: uppercase;
}

.status-pill.good {
  background: #dcfae6;
  color: var(--good);
}

.status-pill.bad,
.notice.error {
  background: #fee4e2;
  color: var(--accent);
}

.panel {
  margin-bottom: 22px;
  padding: 24px;
}

.alert-band,
.notice {
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 14px 16px;
}

.alert-band {
  background: #fff4e5;
  border: 1px solid #ffd79b;
  color: #7a4200;
}

.notice.success {
  background: #dcfae6;
  color: var(--good);
}

.url-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.url-row {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

code,
pre {
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  color: #101828;
  display: block;
  margin-top: 8px;
}

.empty-state {
  background: #ffffff;
  border: 1px dashed #b8c4d5;
  border-radius: 8px;
  padding: 34px;
  text-align: center;
}

.empty-state h1,
.empty-state h3 {
  margin-top: 0;
}

.raw-panel summary {
  cursor: pointer;
  font-weight: 800;
}

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

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 780px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.reset-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.reset-form input {
  min-width: 180px;
}

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

@media (max-width: 800px) {
  .topbar,
  .page-heading,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 18px 20px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .auth-panel,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 24px 16px;
  }

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

  .form-actions {
    flex-direction: column;
  }
}
