:root {
  color-scheme: light;
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --text: #18202f;
  --muted: #667085;
  --line: #d9e0ea;
  --accent: #1f7a5b;
  --accent-strong: #145f46;
  --danger: #b42318;
  --warning: #a15c07;
  --shadow: 0 16px 40px rgba(24, 32, 47, 0.08);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
}

button:hover {
  background: var(--accent-strong);
}

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

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

h2 {
  font-size: 1.1rem;
}

.icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 1.2rem;
}

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

.auth-panel {
  display: grid;
  gap: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.token-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 10px;
}

.workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.create-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.new-key {
  display: grid;
  gap: 6px;
  border: 1px solid #a8d5c3;
  border-radius: 6px;
  background: #eaf7f1;
  padding: 12px;
}

.new-key span {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

code {
  overflow-wrap: anywhere;
  font-family: "Cascadia Code", Consolas, monospace;
}

.list-panel {
  min-width: 0;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

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

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

td {
  font-size: 0.92rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.pill.active {
  background: #dff3ea;
  color: var(--accent-strong);
}

.pill.unused {
  background: #e8eef7;
  color: #344054;
}

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

.revoke-button {
  min-height: 34px;
  background: #fff;
  border: 1px solid #f4b8b2;
  color: var(--danger);
}

.revoke-button:hover {
  background: #fff4f3;
}

.status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted);
}

@media (max-width: 840px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 20px 0;
  }

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

  .token-row {
    grid-template-columns: 1fr;
  }
}
