:root {
  --bg: #f5f0e8;
  --panel: rgba(255, 250, 242, 0.86);
  --panel-strong: rgba(255, 251, 245, 0.96);
  --ink: #172230;
  --muted: #66788a;
  --line: rgba(23, 34, 48, 0.12);
  --brand: #0e6b65;
  --warning: #946200;
  --danger: #a63b32;
  --shadow: 0 20px 60px rgba(31, 31, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(14, 107, 101, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(192, 123, 41, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f3eb 0%, #ece6db 100%);
}

body {
  padding: 24px;
}

a {
  color: inherit;
}

.shell {
  max-width: 1480px;
  margin: 0 auto;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.hero-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 2.8vw, 3.2rem);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 780px;
  line-height: 1.5;
}

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

.button {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 10px 20px rgba(20, 22, 34, 0.05);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 34, 48, 0.2);
  box-shadow: 0 14px 28px rgba(20, 22, 34, 0.08);
}

.button-primary {
  background: linear-gradient(135deg, #0e6b65, #12857e);
  color: #fff;
  border-color: transparent;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.nav-pill {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(23, 34, 48, 0.1);
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-weight: 600;
}

.nav-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.page,
.stack {
  display: grid;
  gap: 18px;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.table-card,
.detail-card,
.empty-state,
.error-state {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.card,
.detail-card,
.empty-state,
.error-state {
  padding: 18px 20px;
}

.card-label,
.detail-key {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-value {
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.card-value.compact {
  font-size: 1.35rem;
  line-height: 1.25;
}

.card-note,
.section-note,
.subtle,
.list {
  color: var(--muted);
}

.section-title {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.table-card {
  overflow: hidden;
}

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

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(23, 34, 48, 0.08);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.45);
}

.mono {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  background: rgba(23, 34, 48, 0.08);
  color: var(--ink);
}

.badge-good {
  background: rgba(14, 107, 101, 0.12);
  color: var(--brand);
}

.badge-warn {
  background: rgba(148, 98, 0, 0.14);
  color: var(--warning);
}

.badge-danger {
  background: rgba(166, 59, 50, 0.14);
  color: var(--danger);
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li + li {
  margin-top: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.detail-value {
  margin-top: 4px;
  font-weight: 600;
}

.section-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.link-button:hover {
  color: var(--brand);
}

.mini-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.35);
}

.mini-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.settings-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-span-2 {
  grid-column: span 2;
}

.field-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-control {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

.form-control:focus {
  outline: none;
  border-color: rgba(14, 107, 101, 0.4);
  box-shadow: 0 0 0 3px rgba(14, 107, 101, 0.08);
}

.form-control-compact {
  min-width: 220px;
  padding: 10px 12px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.feedback-error {
  border-color: rgba(166, 59, 50, 0.2);
  background: rgba(166, 59, 50, 0.08);
  color: var(--danger);
}

.feedback-success {
  border-color: rgba(14, 107, 101, 0.18);
  background: rgba(14, 107, 101, 0.08);
  color: var(--brand);
}

.wrap-text {
  overflow-wrap: anywhere;
}

.error-state {
  border-color: rgba(166, 59, 50, 0.22);
}

@media (max-width: 900px) {
  body {
    padding: 16px;
  }

  .hero {
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
    flex-wrap: wrap;
  }

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

  .field-span-2 {
    grid-column: auto;
  }
}
