/* The look follows the Trainome athlete app and the entry page: near-black, one lime accent. */
:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111111;
  --text: #f5f5f2;
  --muted: #8e8e86;
  --line: #222222;
  --accent: #eaff48;
  --accent-text: #050505;
  --danger: #ff6b5e;
  --ok: #4fd08f;
  --warn: #ffb84d;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      60% 380px at 50% -140px,
      rgba(234, 255, 72, 0.1),
      rgba(234, 255, 72, 0) 70%
    ),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font:
    15px/1.5 Archivo,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(5, 5, 5, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  color: var(--accent);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 8px;
}

.who {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  min-width: 0;
}

.who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who button {
  white-space: nowrap;
  flex: none;
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 14px;
}

h2 {
  font-size: 17px;
  margin: 0 0 12px;
}

.panel h2:not(:first-child) {
  margin-top: 24px;
}

form > p:last-child {
  margin: 14px 0 0;
}

p {
  margin: 0 0 12px;
}

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

.small {
  font-size: 13px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 0 0 18px;
}

.narrow {
  max-width: 400px;
  margin: 8vh auto 0;
}

.medium {
  max-width: 640px;
  margin: 4vh auto 0;
}

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

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.row > label {
  flex: 1 1 180px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  accent-color: var(--accent);
}

input::placeholder,
textarea::placeholder {
  color: #5c5c56;
}

input[type='checkbox'],
input[type='radio'] {
  width: auto;
  min-height: 0;
  margin: 0;
  flex: none;
}

label.check {
  align-items: flex-start;
}

label.check input {
  margin-top: 4px;
}

form h2 {
  margin-top: 20px;
}

form + .row {
  margin-top: 14px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  font: inherit;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

button.quiet {
  background: transparent;
  color: var(--text);
  border-color: #333333;
  font-weight: 600;
}

button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
  font-weight: 500;
}

button.tiny {
  padding: 4px 9px;
  font-size: 13px;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

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

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

th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: 0;
}

td.wrap {
  white-space: normal;
}

td.actions {
  text-align: right;
}

td.actions button {
  margin-left: 6px;
}

td select {
  margin: 0;
  padding: 5px 8px;
  width: auto;
  min-height: 0;
}

a {
  color: var(--accent);
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag.ok {
  color: var(--ok);
  border-color: var(--ok);
}

.tag.warn {
  color: var(--warn);
  border-color: var(--warn);
}

.tag.bad {
  color: var(--danger);
  border-color: var(--danger);
}

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

.seat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.seat strong {
  display: block;
  font-size: 15px;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.notice {
  border: 1px solid var(--warn);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.error {
  color: var(--danger);
  margin: 0 0 12px;
}

.empty {
  color: var(--muted);
  padding: 8px 0;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

#toast.show {
  opacity: 1;
}

#toast.bad {
  background: var(--danger);
  color: #ffffff;
}

@media (max-width: 560px) {
  .brand span {
    display: none;
  }

  .bar {
    padding: 10px 14px;
  }

  main {
    padding: 18px 14px 80px;
  }
}

.check .tag {
  margin-left: 6px;
}

.seat + .seat {
  margin-top: 12px;
}

/* The Trainome logo, as on the app's start screen. */
.brand {
  display: flex;
  align-items: center;
}

.brand img {
  display: block;
  height: 20px;
  width: auto;
}

/* The places an account has, on its own page: one sign-in for everyone. */
.places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.place {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}

.place:hover,
.place:focus-visible {
  border-color: var(--accent);
}

.who a {
  white-space: nowrap;
}
