:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #1f2a32;
  --muted: #6c7780;
  --line: #d9e0e4;
  --nav: #1d2630;
  --red: #d52f3b;
  --green: #2f9f66;
  --amber: #b98925;
  --blue: #2f6fb1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: var(--nav);
  color: #fff;
  padding: 24px 18px;
}

.brand {
  font-size: 27px;
  font-weight: 800;
  margin-bottom: 28px;
}

.brand span {
  display: inline-block;
  margin-left: 6px;
  color: #9fb2c4;
  font-size: 12px;
  font-weight: 700;
}

nav {
  display: grid;
  gap: 8px;
}

nav a {
  padding: 12px 13px;
  border-radius: 6px;
  color: #d8e0e6;
  font-weight: 700;
}

nav a.active,
nav a:hover {
  background: #33404d;
  color: #fff;
}

.main {
  margin-left: 248px;
  padding: 32px;
}

.page-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
}

h2 {
  margin-bottom: 16px;
  font-size: 20px;
}

h3 {
  margin-bottom: 5px;
  font-size: 17px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary,
button.primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric,
.panel,
.group-card,
.public-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.panel {
  padding: 20px;
}

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

.form-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.form-section h2,
.wide {
  grid-column: 1 / -1;
}

.form-note {
  margin: -4px 0 4px;
  padding: 11px 12px;
  border-left: 4px solid var(--blue);
  background: #eef5fb;
  color: #43515d;
  font-size: 13px;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 7px;
  color: #34414d;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8de;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 9px 11px;
}

textarea {
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

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

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

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

.status,
.badge,
.group-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.ok,
.group-status.ok {
  background: #e7f5ee;
  color: var(--green);
}

.status.warn,
.group-status.warn {
  background: #fff5df;
  color: var(--amber);
}

.status.info {
  background: #e8f1fb;
  color: var(--blue);
}

.status.error {
  background: #fde9eb;
  color: var(--red);
}

.badge {
  background: #eef3f7;
  color: #50606d;
}

.actions,
.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.group-list {
  display: grid;
  gap: 12px;
}

.group-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
}

.group-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.member-list {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.card-actions {
  grid-column: 1 / -1;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 700;
}

.alert.error {
  background: #fde9eb;
  color: var(--red);
}

.alert.success {
  background: #e7f5ee;
  color: var(--green);
}

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

.link-panel {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.public {
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(120deg, #eef3f7, #ffffff);
}

.public-card {
  width: min(560px, 100%);
  padding: 26px;
  box-shadow: 0 18px 48px rgba(24, 34, 44, 0.12);
}

.passport-banner,
.verify-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.passport-banner {
  margin: 18px 0;
  padding: 14px 16px;
  background: #eef5ff;
  color: #24508d;
}

.verify-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.verify-card h2 {
  margin-bottom: 0;
}

.public-form {
  display: grid;
  gap: 14px;
}

.flow-box {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #d7e4ee;
  border-radius: 8px;
  background: #f4f8fb;
  color: #384957;
}

.flow-box strong {
  display: block;
  margin-bottom: 8px;
}

.flow-box ol {
  margin: 0;
  padding-left: 20px;
}

.flow-box li {
  margin: 6px 0;
  line-height: 1.4;
}

.public-form label span {
  color: var(--muted);
  font-weight: 400;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
}

.check input {
  width: auto;
  min-height: auto;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .main {
    margin-left: 0;
    padding: 20px;
  }

  .metrics,
  .form-grid,
  .form-section {
    grid-template-columns: 1fr;
  }

  .page-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
