:root {
  --bg: #0e0e0f;
  --surface: #1a1a1c;
  --surface2: #242426;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.15);
  --text: #f0efe8;
  --muted: #888884;
  --accent: #e8c547;
  --accent2: #c9a82c;
  --green: #4ade80;
  --red: #f87171;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 4rem;
}

.view {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.view.active {
  display: flex;
}

.admin-header {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 12px;
}

.admin-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px;
  letter-spacing: 4px;
  color: var(--accent);
}

.admin-wrap {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card h2 {
  font-size: 16px;
  font-weight: 500;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
}

input[type="text"],
input[type="url"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

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

.admin-header-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-shrink: 0;
}

.admin-header-actions .btn {
  height: 46px;
  min-height: 46px;
  padding-block: 0;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  height: 46px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}

a.btn:hover {
  color: var(--text);
}

.btn:hover {
  background: var(--surface2);
}

.btn.accent-btn {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn.accent-btn:hover {
  background: var(--accent2);
}

.btn.danger-btn {
  background: transparent;
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.4);
}

.btn.danger-btn:hover {
  background: rgba(248, 113, 113, 0.1);
}

.btn.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.feedback {
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
}

.feedback.ok {
  color: var(--green);
}

.feedback.err {
  color: var(--red);
}

.img-preview {
  width: 100%;
  aspect-ratio: 16/6;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: none;
}

.img-preview span {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
}

.stats-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--muted);
}

.stat-chip strong {
  color: var(--text);
  font-weight: 500;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.filter-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 500;
}

.people-list-scroll {
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.person-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 20%;
  background: var(--surface);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.cat-tag {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-right: 4px;
}

.cat-tag.danish {
  color: var(--accent);
  border-color: rgba(232, 197, 71, 0.25);
}

.row-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.notice {
  font-size: 13px;
  color: var(--muted);
  background: rgba(232, 197, 71, 0.05);
  border: 1px solid rgba(232, 197, 71, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.6;
}

.pw-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.pw-box h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--accent);
}

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

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 500;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.modal-footer {
  display: flex;
  gap: 8px;
}

.modal-footer .btn {
  flex: 1;
}

.empty-list {
  font-size: 13px;
  color: var(--muted);
  padding: 12px;
  text-align: center;
}
