.admin-page {
  min-height: 100vh;
  margin: 0;
  background: #f6f2fb;
  color: #292337;
}

.admin-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

/* ── Toast notifications ───────────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 240px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #2f2942;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(36, 31, 51, 0.28);
  pointer-events: auto;
  animation: toast-in 0.22s cubic-bezier(0.18, 0.88, 0.32, 1.1);
}

.toast-error { background: #7d2418; }
.toast-success { background: #1a5e2e; }

.toast-close {
  flex: 0 0 auto;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.toast-close:hover { color: #fff; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Setup wizard banner ───────────────────────────────────────── */

.setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(122, 92, 207, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #f0ebff, #f8f5ff);
}

.setup-steps {
  display: flex;
  gap: 0;
  align-items: center;
}

.setup-step {
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.setup-step + .setup-step::before {
  content: "→";
  margin-right: 8px;
  color: var(--line);
  font-weight: 400;
}

.setup-step.is-done {
  color: #218a42;
}

.setup-step.is-active {
  background: var(--accent-2);
  color: #fff;
}

.setup-skip {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.setup-skip:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Event detail tabs ─────────────────────────────────────────── */

.admin-event-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 2px solid var(--line);
}

.admin-tab {
  padding: 9px 16px;
  border: 0;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--muted);
  font: 700 13px/1.2 inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.admin-tab:hover {
  color: var(--ink);
}

.admin-tab.is-active {
  border-bottom-color: var(--accent-2);
  color: var(--accent-2);
}

#edit-panel,
#route-panel,
#pacemaker-panel,
#poi-panel,
#photo-panel,
#sharing-panel {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top-color: transparent;
}

.super-admin-tabs {
  margin-top: 18px;
}

.super-admin-tab-panel {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top-color: transparent;
}

/* ── Auth mode: standalone centered card ───────────────────────── */

.auth-brand {
  display: none;
  text-align: center;
  margin-bottom: 8px;
}

.auth-brand-title {
  display: block;
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

body.auth-mode .admin-header {
  display: none;
}

body.auth-mode .admin-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: min(460px, calc(100% - 32px));
  padding: 64px 0 48px;
  gap: 16px;
}

body.auth-mode .auth-brand {
  display: block;
}

body.auth-mode .admin-section {
  width: 100%;
  margin-top: 0;
}

/* ── Event detail tabs ─────────────────────────────────────────── */

.admin-event-detail-header {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.admin-event-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 14px;
  min-width: 0;
}

.admin-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.admin-breadcrumb a { color: var(--accent-2); text-decoration: none; }
.admin-breadcrumb a:hover { text-decoration: underline; }

.admin-back-link {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s;
}

.admin-back-link:hover {
  text-decoration: underline;
}

.admin-event-detail-name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.admin-event-detail-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-header,
.admin-userline,
.admin-event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header {
  margin-bottom: 24px;
}

.admin-kicker {
  margin: 0 0 3px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-header h1,
.admin-section h2,
.admin-event-item h3 {
  margin: 0;
}

.admin-header h1 {
  font-size: 28px;
}

.admin-actions,
.admin-item-actions,
.admin-form-actions,
.admin-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.admin-item-actions {
  gap: 8px;
}

.admin-section-heading {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.admin-actions a,
.admin-event-item a,
.admin-event-item button,
.admin-route-heading button,
.admin-form-actions a,
.admin-section-heading a,
.admin-section-heading button,
.admin-table-row a,
#profile-cancel-link,
.admin-primary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(122, 92, 207, 0.35);
  border-radius: 7px;
  background: #fff;
  color: #4d357f;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.admin-event-item .admin-icon-action {
  width: 36px;
  min-width: 36px;
  padding: 0;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.admin-actions a:hover,
.admin-event-item a:hover,
.admin-event-item button:hover,
.admin-route-heading button:hover,
.admin-form-actions a:hover,
.admin-section-heading a:hover,
.admin-section-heading button:hover {
  background: #fbf8ff;
  border-color: rgba(122, 92, 207, 0.55);
  box-shadow: 0 2px 8px rgba(122, 92, 207, 0.12);
}

.admin-actions a[hidden] {
  display: none;
}

.admin-route-heading button[hidden] {
  display: none;
}

#profile-cancel-link[hidden] {
  display: none;
}

.admin-account-menu {
  position: relative;
}

.admin-account-menu[hidden] {
  display: none;
}

.admin-account-menu summary {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(122, 92, 207, 0.35);
  border-radius: 50%;
  background: #fff;
  color: #4d357f;
  cursor: pointer;
  list-style: none;
}

.admin-account-menu summary::-webkit-details-marker {
  display: none;
}

.admin-account-menu svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-account-menu-items {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 160px;
  gap: 6px;
  padding: 8px;
  border: 1px solid #ddd4ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-account-menu-items a {
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
}

.admin-primary {
  border-color: #6f55bd;
  background: #6f55bd;
  color: #fff;
  font-weight: 700;
}

.admin-primary:hover {
  background: #6248b5;
  border-color: #6248b5;
  box-shadow: 0 4px 12px rgba(111, 85, 189, 0.35) !important;
}

.admin-primary:disabled {
  opacity: 0.72;
  cursor: wait;
}

.admin-danger {
  border-color: rgba(232, 77, 53, 0.42) !important;
  color: #9a2f20 !important;
}

.admin-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: admin-spin 0.8s linear infinite;
}

.is-loading .admin-spinner {
  display: inline-block;
}

@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-section {
  margin-top: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(122, 92, 207, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 8px rgba(55, 38, 86, 0.06);
}

.admin-section h2 {
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.admin-section-heading h2 {
  margin-bottom: 0;
}

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

.admin-form-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(122, 92, 207, 0.16);
  border-radius: 9px;
  background: rgba(122, 92, 207, 0.025);
}

.admin-form-section legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

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

.admin-form label {
  display: grid;
  gap: 6px;
  color: #3d3250;
  font-size: 13px;
  font-weight: 600;
}

.admin-form label:has(input[required], select[required], textarea[required]) > span::after {
  content: " *";
  color: var(--accent);
  font-weight: 700;
}

.admin-form input:not([type="checkbox"]),
.admin-form select,
.admin-form textarea {
  min-width: 0;
  padding: 0 10px;
  border: 1.5px solid rgba(122, 92, 207, 0.25);
  border-radius: 7px;
  background: #fff;
  color: #292337;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-form input:not([type="checkbox"]):focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: var(--accent-2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(122, 92, 207, 0.16);
}

.admin-form input:not([type="checkbox"]),
.admin-form select {
  height: 40px;
}

.admin-setting-row {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 11px !important;
  padding: 13px 14px;
  border: 1px solid rgba(122, 92, 207, 0.16);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.admin-setting-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--accent-2);
}

.admin-setting-row > span { display: grid; gap: 4px; }
.admin-setting-row strong { color: var(--ink); font-size: 13px; }
.admin-setting-row small { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.55; }

.admin-form textarea {
  min-height: 120px;
  padding-top: 10px;
  resize: vertical;
}

.admin-form input[type="file"] {
  height: auto;
  min-height: 38px;
  padding: 7px 10px;
}

.admin-form button {
  align-self: end;
  justify-self: start;
}

.admin-form-actions {
  justify-content: flex-start;
}

.admin-form-actions > a,
.admin-form-actions > button,
.admin-form-actions > .admin-primary,
.admin-share-invite > button {
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
}

.admin-form button[type="button"] {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(122, 92, 207, 0.35);
  border-radius: 6px;
  background: #fff;
  color: #4d357f;
  font: inherit;
  cursor: pointer;
}

.admin-auth-form {
  max-width: 440px;
  grid-template-columns: 1fr;
}

.admin-auth-form .admin-primary {
  align-self: start;
  justify-self: start;
  min-width: 120px;
}

/* Secondary auth navigation buttons → text links */
#show-register-button,
#show-forgot-password-button,
#show-login-button,
#forgot-password-login-button,
#verify-email-login-button {
  display: inline;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.15s;
}

#show-register-button:hover,
#show-forgot-password-button:hover,
#show-login-button:hover,
#forgot-password-login-button:hover,
#verify-email-login-button:hover {
  color: #5238a8;
  text-decoration-thickness: 2px;
}

.admin-help {
  margin: 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(122, 92, 207, 0.05);
  color: #71677d;
  font-size: 12px;
  line-height: 1.6;
}

.admin-full-field,
.admin-form-actions {
  grid-column: 1 / -1;
}

.admin-userline {
  justify-content: flex-start;
  color: #5f536e;
  font-size: 14px;
}

.admin-userline span:first-child {
  color: #292337;
  font-weight: 700;
}

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

.admin-event-list .admin-event-item {
  padding: 16px;
  border: 1px solid rgba(122, 92, 207, 0.16);
  border-radius: 9px;
  background: #fff;
}

.admin-event-list .admin-event-item:first-child {
  border-top: 1px solid rgba(122, 92, 207, 0.16);
}

.admin-event-list .admin-event-item > div:first-child {
  min-width: 0;
}

.admin-event-list .admin-event-item .admin-manage-action {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: #fff;
}

.admin-event-list .admin-event-item .admin-manage-action:hover {
  border-color: #6043b5;
  background: #6043b5;
  color: #fff;
}

.admin-table-list {
  display: grid;
  gap: 10px;
}

.admin-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(120px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-top: 1px solid rgba(122, 92, 207, 0.14);
}

.admin-table-row:first-child {
  border-top: 0;
}

.admin-table-row label {
  display: grid;
  gap: 5px;
  color: #5f536e;
  font-size: 13px;
}

.admin-table-row label small {
  max-width: 240px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.admin-event-row {
  grid-template-columns: minmax(180px, 1.2fr) repeat(7, minmax(120px, 1fr)) auto auto;
}

.admin-retention-policy-field {
  min-width: 190px;
}

.admin-table-row input,
.admin-table-row select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d8cde8;
  border-radius: 6px;
  background: #fff;
  color: #292337;
  font: inherit;
}

.admin-table-row p {
  margin: 5px 0 0;
  color: #71677d;
  font-size: 13px;
}

.admin-table-row .admin-message {
  align-self: center;
  min-width: 120px;
}

.admin-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(36, 31, 51, 0.36);
}

.admin-dialog-backdrop[hidden] {
  display: none;
}

.admin-dialog {
  display: grid;
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-dialog h2 {
  margin: 0;
  font-size: 18px;
}

.admin-dialog input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #d8cde8;
  border-radius: 6px;
  color: #292337;
  font: inherit;
}

.admin-share-invite {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.admin-share-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-self: stretch;
  width: 100%;
  gap: 8px;
  align-items: center;
}

.admin-link-rows {
  display: grid;
  gap: 6px;
}

.admin-link-label {
  margin: 4px 0 0;
  color: #5f536e;
  font-size: 13px;
  font-weight: 600;
}

.admin-comment-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
}

.admin-comment-item {
  padding: 12px;
  border: 1px solid rgba(122, 92, 207, 0.16);
  border-radius: 8px;
  background: #fff;
}

.admin-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: #5f536e;
  font-size: 12px;
}

.admin-comment-meta strong {
  color: var(--ink);
  font-size: 13px;
}

.admin-comment-item p {
  margin: 0;
  color: #332a42;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.admin-feedback-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: #71677d;
  font-size: 12px;
}

.admin-feedback-links a {
  color: var(--accent-2);
  font-weight: 700;
}

.admin-member-list {
  display: grid;
  gap: 8px;
}

.admin-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(122, 92, 207, 0.14);
}

.admin-member-item:first-child {
  border-top: 0;
}

.admin-member-item p {
  margin: 4px 0 0;
  color: #71677d;
  font-size: 13px;
}

.admin-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-member-actions select,
.admin-member-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(122, 92, 207, 0.35);
  border-radius: 6px;
  background: #fff;
  color: #4d357f;
  font: inherit;
}

.admin-member-actions button {
  border-color: rgba(232, 77, 53, 0.42);
  color: #9a2f20;
  cursor: pointer;
}

.admin-edit-fields {
  margin-top: 18px;
}

.admin-route-tools {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(122, 92, 207, 0.14);
}

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

.admin-route-heading h3 {
  margin: 0;
  margin-bottom: 0;
  font-size: 16px;
}

.admin-edit-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(122, 92, 207, 0.14);
}

.admin-save-actions {
  position: sticky;
  z-index: 10;
  bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(122, 92, 207, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 24px rgba(50, 39, 79, 0.12);
  backdrop-filter: blur(8px);
}

.admin-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid rgba(232, 77, 53, 0.35);
  border-radius: 9px;
  background: rgba(232, 77, 53, 0.035);
}

.admin-danger-zone[hidden] { display: none; }
.admin-danger-zone h3 { margin: 0 0 4px; color: #8f291d; font-size: 14px; }
.admin-danger-zone p { margin: 0; color: var(--muted); font-size: 12px; }
.admin-danger-zone button { flex: 0 0 auto; min-height: 36px; padding: 0 13px; border-radius: 7px; background: #fff; }

.admin-section-intro { margin: -8px 0 14px; color: var(--muted); font-size: 13px; }

.admin-sharing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.admin-sharing-summary > div {
  display: flex;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(122, 92, 207, 0.08);
  font-size: 12px;
}

.admin-sharing-summary dt { color: var(--muted); }
.admin-sharing-summary dd { margin: 0; color: var(--ink); font-weight: 700; }

.admin-route-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-route-form {
  margin-top: 12px;
}

.admin-route-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-route-or::before,
.admin-route-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.admin-event-item,
.admin-route-item,
.admin-pacemaker-item,
.admin-photo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 12px 0;
  border-top: 1px solid rgba(122, 92, 207, 0.14);
}

.admin-route-item button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(232, 77, 53, 0.42);
  border-radius: 6px;
  background: #fff;
  color: #9a2f20;
  font: inherit;
  cursor: pointer;
}

.admin-event-item:first-child,
.admin-route-item:first-child,
.admin-pacemaker-item:first-child,
.admin-photo-item:first-child {
  border-top: 0;
}

.admin-event-item h3 {
  font-size: 16px;
}

.admin-event-item p,
.admin-route-item p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 5px 0 0;
  color: #71677d;
  font-size: 13px;
}

.admin-photo-heading h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.admin-photo-list {
  display: grid;
  gap: 0;
}

.admin-photo-item {
  align-items: center;
}

.admin-photo-item img {
  width: 112px;
  height: 76px;
  border-radius: 7px;
  object-fit: cover;
  background: #ece6f4;
  flex: 0 0 auto;
}

.admin-photo-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  color: #71677d;
  font-size: 13px;
}

.admin-photo-meta strong {
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.admin-photo-item button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(232, 77, 53, 0.42);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.admin-pacemaker-tools {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-pacemaker-list {
  display: grid;
  gap: 8px;
}

.admin-pacemaker-item {
  align-items: end;
  flex-wrap: wrap;
}

.admin-pacemaker-item label {
  display: grid;
  gap: 5px;
  min-width: 130px;
  color: #5f536e;
  font-size: 13px;
}

.admin-pacemaker-item label:first-of-type {
  min-width: 48px;
}

.admin-pacemaker-item input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d8cde8;
  border-radius: 6px;
  background: #fff;
  color: #292337;
  font: inherit;
}

.admin-pacemaker-item input[type="hidden"] {
  display: none;
}

.admin-pacemaker-item input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.admin-pacemaker-item button,
#pacemaker-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(122, 92, 207, 0.35);
  border-radius: 6px;
  background: #fff;
  color: #4d357f;
  font: inherit;
  cursor: pointer;
}

.admin-pacemaker-item button {
  border-color: rgba(232, 77, 53, 0.42);
  color: #9a2f20;
}

.admin-empty {
  margin: 0;
  color: #71677d;
}

@media (max-width: 680px) {
  .admin-shell {
    width: min(100% - 20px, 1040px);
    padding-top: 18px;
  }

  .admin-header,
  .admin-userline,
  .admin-event-item,
  .admin-member-item,
  .admin-photo-item {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-photo-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .admin-account-menu {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 200;
  }

  .admin-actions {
    flex-wrap: wrap;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-section {
    padding: 14px;
  }

  .admin-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-event-detail-meta {
    align-items: flex-start;
  }

  .admin-table-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
