:root {
  color-scheme: dark;
  --bg: #0c1521;
  --panel: #15202e;
  --border: #314155;
  --text: #edf5ff;
  --muted: #8ca3bd;
  --primary: #2f7dd1;
  --danger: #d15a5a;
  --ok: #4dbf9b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 48px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 380px;
  margin-top: 8vh;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.wide {
  width: 100%;
  max-width: 1040px;
}

.brand {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.brand b {
  font-size: 20px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

h1 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

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

input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 16px;
  color: var(--text);
  background: #0f1926;
  border: 1px solid var(--border);
  border-radius: 6px;
}

button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
}

button.danger {
  background: var(--danger);
}

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

form button[type='submit'] {
  width: 100%;
  margin-top: 6px;
}

.google {
  margin-bottom: 4px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #f0d9a8;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 6px;
}

.error {
  padding: 10px 12px;
  color: #ffc9c9;
  background: rgba(209, 90, 90, 0.15);
  border: 1px solid rgba(209, 90, 90, 0.5);
  border-radius: 6px;
}

a {
  color: #7fb6f0;
}

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

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.who {
  color: var(--muted);
  font-size: 13px;
  margin-right: 6px;
}

.panel {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

#add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#add-form input {
  flex: 1 1 220px;
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

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

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.status.approved {
  color: #b8f0dd;
  background: rgba(77, 191, 155, 0.16);
}

.status.pending {
  color: #f0d9a8;
  background: rgba(201, 162, 39, 0.16);
}

td .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 720px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  td {
    border: none;
    padding: 4px 0;
  }
}
