:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --text: #14171f;
  --muted: #5b6472;
  --line: #d9dde4;
  --teal: #047d79;
  --teal-dark: #075e5c;
  --amber: #b46908;
  --red: #b42318;
  --blue: #2456a6;
  --shadow: 0 18px 50px rgba(20, 23, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(4, 125, 121, 0.08), rgba(4, 125, 121, 0) 320px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

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

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

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--teal) 0 48%, transparent 48%),
    linear-gradient(315deg, var(--blue) 0 48%, transparent 48%),
    #edf1f5;
  border: 1px solid rgba(20, 23, 31, 0.12);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  overflow-wrap: anywhere;
  font-size: 42px;
  line-height: 1.04;
}

h1 span,
.identity-panel h2 {
  color: var(--teal-dark);
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

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

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.button.primary {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--muted);
}

.status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-ok {
  border-color: rgba(4, 125, 121, 0.35);
  background: rgba(4, 125, 121, 0.08);
  color: var(--teal-dark);
}

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

.notice {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  font-size: 14px;
}

.notice strong {
  flex: 0 0 auto;
}

.notice.warning {
  border-color: rgba(180, 105, 8, 0.4);
  background: #fff8ed;
  color: #704404;
}

.notice.error {
  border-color: rgba(180, 35, 24, 0.35);
  background: #fff3f1;
  color: var(--red);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-heading {
  margin-bottom: 16px;
}

.identity-panel h2 {
  overflow-wrap: anywhere;
  font-size: 30px;
}

.identity-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.identity-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 32px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.identity-list.compact div {
  grid-template-columns: 96px minmax(0, 1fr);
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.claims-panel {
  padding-bottom: 8px;
}

.claims-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.claim-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.claim-row:last-child {
  border-bottom: 0;
}

.claim-key,
.claim-value {
  min-width: 0;
  padding: 11px 12px;
  font-size: 13px;
}

.claim-key {
  border-right: 1px solid var(--line);
  background: #f9fafb;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.claim-value {
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 24px, 1120px);
    padding: 20px 0;
  }

  .topbar,
  .brand,
  .actions {
    align-items: flex-start;
  }

  .topbar,
  .grid,
  .claim-row {
    grid-template-columns: 1fr;
  }

  .topbar,
  .brand,
  .actions {
    flex-direction: column;
  }

  h1 {
    font-size: 32px;
  }

  .actions {
    width: 100%;
  }

  .button,
  .status {
    width: 100%;
  }

  .identity-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .claim-key {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
