:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #172026;
  --muted: #5f6b73;
  --line: #d9e0e4;
  --accent: #176b5f;
  --accent-dark: #0f4f46;
  --danger: #a33b37;
  --warn: #8a641d;
  --ok: #176b39;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: var(--accent-dark);
}

button.danger {
  border-color: var(--danger);
  background: var(--danger);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

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

.side {
  background: #172026;
  color: #eef4f1;
  padding: 20px 16px;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 28px;
}

.nav-item {
  display: block;
  width: 100%;
  color: #d8e3df;
  background: transparent;
  border: 0;
  text-align: left;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 4px;
}

.nav-item.active {
  background: #26343b;
  color: #fff;
}

.main {
  padding: 24px;
}

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

h1 {
  font-size: 26px;
  margin: 0;
}

h2 {
  font-size: 17px;
  margin: 0 0 14px;
}

.grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

label {
  color: var(--muted);
  font-size: 13px;
}

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

.row > * {
  min-width: 0;
}

.filters {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: var(--muted);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef2f4;
  color: #34424a;
  font-size: 12px;
  white-space: nowrap;
}

.badge.claimed {
  background: #e5f3eb;
  color: var(--ok);
}

.badge.active {
  background: #e8f2f2;
  color: var(--accent-dark);
}

.badge.revoked,
.badge.expired {
  background: #f5e8e7;
  color: var(--danger);
}

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

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #f9fbfb;
  word-break: break-word;
}

.notice.success {
  border-color: #b6dbc7;
  background: #edf8f1;
  color: var(--ok);
}

.notice.error {
  border-color: #e2b9b7;
  background: #fff1f0;
  color: var(--danger);
}

.detail {
  margin-top: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  font-size: 13px;
}

.claim-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #10191d;
}

.claim-card {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  border: 1px solid #d7e0e4;
}

.claim-card h1 {
  margin-bottom: 8px;
}

.claim-card p {
  color: var(--muted);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

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

  .side {
    min-height: auto;
  }

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

  .main {
    padding: 16px;
  }
}

