:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1b1f24;
  --muted: #64707d;
  --line: #d9dee5;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warn-bg: #fff7ed;
  --warn-line: #fed7aa;
  --ok-bg: #ecfdf5;
  --ok-line: #a7f3d0;
  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);
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 40px auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(27, 31, 36, 0.06);
}

.brand {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

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

h2 {
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

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

.login-note {
  border: 1px solid #5eead4;
  border-radius: 8px;
  padding: 12px;
  background: #f0fdfa;
  color: #134e4a;
  font-weight: 750;
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

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

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

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.hidden {
  display: none;
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.language-switch.compact {
  margin: 0;
}

.language-switch button {
  min-height: 36px;
  padding: 7px 11px;
}

.language-switch button.active {
  border-color: var(--accent);
  background: #f0fdfa;
  color: var(--accent-dark);
}

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

.topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.registration-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.registration-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  color: var(--text);
  text-align: left;
}

.registration-card.active {
  border-color: var(--accent);
  background: #f0fdfa;
  color: var(--text);
}

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

.pill {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2f6;
  color: #39424e;
  font-size: 13px;
}

.selected-pill {
  background: #ccfbf1;
  color: #115e59;
  font-weight: 700;
}

.notice {
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--warn-bg);
}

.success {
  border: 1px solid var(--ok-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--ok-bg);
}

.error {
  color: #b42318;
  min-height: 20px;
}

.person-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.person-row.selected {
  border-color: var(--accent);
  background: #f0fdfa;
}

.selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-list button {
  min-height: 34px;
  padding: 6px 10px;
}

.selected-chip {
  border: 1px solid #5eead4;
  background: #ccfbf1;
  color: #134e4a;
}

.selected-chip:hover {
  border-color: var(--accent);
  background: #99f6e4;
  color: #134e4a;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.button-link:hover {
  background: var(--accent-dark);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.summary-value {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  font-weight: 800;
}

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

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

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

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

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 960px);
    margin: 16px auto;
  }

  .panel {
    padding: 20px;
  }

  .topline {
    display: grid;
  }

  h1 {
    font-size: 26px;
  }

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