@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
  --bg: #f6f2e8;
  --surface: #ffffff;
  --surface-2: #f1ede4;
  --text: #1a1610;
  --muted: #6e665b;
  --accent: #0e7490;
  --accent-2: #f59e0b;
  --border: #e3dccf;
  --danger: #b91c1c;
  --shadow: 0 10px 30px rgba(19, 15, 10, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #fff6e0, transparent 55%),
              radial-gradient(circle at 30% 20%, #e0f2f1, transparent 45%),
              var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px 48px;
}

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

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.5px;
}

h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.meta {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.gate-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.gate-row input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.stat {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat .value {
  font-size: 26px;
  font-weight: 600;
  margin-top: 6px;
}

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

.actions {
  display: flex;
  gap: 10px;
}

.btn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn.danger {
  background: var(--danger);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  font-size: 13px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--accent);
}

.table-wrap {
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

thead {
  background: var(--surface-2);
}

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

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

tbody tr:nth-child(odd) {
  background: #fffaf2;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.1);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

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

details {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

ul {
  margin: 8px 0 0;
  padding-left: 16px;
  color: var(--text);
}

.more {
  margin-top: 6px;
  color: var(--accent-2);
  font-weight: 600;
}

@media (max-width: 720px) {
  .page {
    padding: 24px;
  }

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

  .meta {
    text-align: left;
  }

  .gate-row {
    flex-direction: column;
  }

  th,
  td {
    padding: 12px;
  }
}
