:root {
  --ink: #17201d;
  --paper: #f4f6f0;
  --surface: #ffffff;
  --rule: #d9e1d7;
  --verified: #17644d;
  --attention: #a86618;
  --blocked: #963a32;
  --slate: #4c5a53;
  --shadow: rgba(23, 32, 29, 0.08);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 32, 29, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--paper);
  font-family: "Aptos", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--verified), var(--attention), var(--blocked));
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 56px;
  align-items: center;
  min-height: 100vh;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0;
}

.auth-loading h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
}

.shell.single {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

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

h1 {
  margin: 0;
  max-width: 740px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.4rem);
  font-weight: 650;
  line-height: 0.92;
  letter-spacing: 0;
}

.lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: #36453e;
  font-size: 1.18rem;
  line-height: 1.65;
}

.status-rail {
  display: grid;
  gap: 0;
  max-width: 520px;
  margin: 34px 0 0;
  padding: 0;
  border-left: 2px solid var(--verified);
  list-style: none;
}

.status-rail li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--rule);
  padding: 9px 0 9px 18px;
  color: var(--ink);
  font-weight: 700;
}

.status-rail span {
  color: var(--attention);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.compact-rail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  display: grid;
  max-width: none;
  margin: 22px 0;
  border-left: 0;
  border-top: 2px solid var(--verified);
}

.compact-rail li {
  grid-template-columns: 36px 1fr;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px;
}

.lede.compact {
  margin-top: 16px;
  font-size: 1rem;
}

.panel {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
  box-shadow: 0 18px 50px var(--shadow);
}

.status {
  margin: 0 0 18px;
  color: #263129;
  font-weight: 700;
}

.primary-action {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--verified);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.secondary-action {
  width: 100%;
  min-height: 42px;
  border: 1px solid #b8c3bc;
  border-radius: 6px;
  background: #ffffff;
  color: #263129;
  font: inherit;
  font-weight: 700;
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  color: #3d4b43;
  font-size: 0.95rem;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #263129;
  font-size: 0.95rem;
  font-weight: 700;
}

.field b,
.check-row b {
  color: var(--blocked);
}

.identity-summary {
  margin-bottom: 22px;
  border-bottom: 1px solid #e6ebe4;
  padding-bottom: 18px;
}

.identity-summary dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.identity-summary div {
  display: grid;
  gap: 3px;
}

.identity-summary dt {
  color: #54645b;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.identity-summary dd {
  margin: 0;
  color: #16201a;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #b8c3bc;
  border-radius: 6px;
  padding: 11px 12px;
  color: #16201a;
  font: inherit;
  font-weight: 500;
}

.field textarea {
  resize: vertical;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--verified);
}

.user-panel {
  margin-top: 18px;
}

.note {
  margin: 16px 0 0;
  color: #5a665e;
  font-size: 0.92rem;
  line-height: 1.5;
}

.text-link {
  color: var(--verified);
  font-weight: 700;
}

.page-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.header-actions {
  justify-content: flex-end;
}

form .primary-action {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 32px;
    align-content: center;
  }
}

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

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.admin-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-controls input[type="search"],
.admin-controls select {
  min-height: 42px;
  border: 1px solid #b8c3bc;
  border-radius: 6px;
  background: #ffffff;
  color: #263129;
  font: inherit;
  font-weight: 700;
  padding: 0 12px;
}

.admin-controls input[type="search"] {
  width: min(280px, 100%);
  font-weight: 500;
}

.admin-controls select {
  min-width: 140px;
}

.compact-action {
  width: auto;
  min-width: 96px;
  padding: 0 14px;
}

.admin-header h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.admin-config {
  margin-bottom: 18px;
}

.table-panel {
  overflow-x: auto;
  border: 1px solid #d8ded6;
  border-radius: 8px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

.empty-table-message {
  color: #5a665e;
  font-weight: 700;
}

th {
  color: #54645b;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.small-action {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: var(--verified);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 12px;
}

.small-action.danger {
  background: var(--blocked);
}

.mono-cell {
  max-width: 220px;
  color: #435149;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.wide-panel {
  grid-column: 1 / -1;
}

.detail-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-list.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-list dt {
  color: #54645b;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 4px 0 0;
  color: #16201a;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .profile-grid,
  .detail-list.two-column {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-controls,
  .header-actions {
    justify-content: flex-start;
  }
}
