/* ── Admin pages ── */
.admin-wrap {
  color: rgba(255, 255, 255, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  margin: 0 auto;
  max-width: 1560px;
  padding: 40px 20px 72px;
}
.admin-wrap--compact {
  max-width: 760px;
}
.admin-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
}
.admin-error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 6px;
  color: rgba(255, 160, 160, 0.9);
  font-size: 13px;
  margin-bottom: 20px;
  padding: 10px 14px;
}
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  max-width: 560px;
}
.admin-form-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.admin-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  width: 100%;
}
.admin-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  outline: none;
}
select.admin-input {
  appearance:       none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='rgba(255,255,255,0.45)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat:  no-repeat;
  cursor:           pointer;
  padding-right:    30px;
}
.admin-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-bottom: -6px;
  opacity: 0.5;
  text-transform: uppercase;
}
.info-card .admin-label {
  margin-bottom: 6px;
  margin-top: 16px;
}
.info-card .admin-label:first-child,
.info-card .note-label + .admin-label {
  margin-top: 0;
}
.admin-textarea {
  resize: vertical;
}
.admin-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  text-decoration: none;
  text-transform: uppercase;
}
.admin-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.95);
}
.admin-btn--danger {
  border-color: rgba(255, 80, 80, 0.3);
  color: rgba(255, 140, 140, 0.85);
}
.admin-btn--danger:hover {
  background: rgba(255, 80, 80, 0.15);
  color: rgba(255, 160, 160, 1);
}
.admin-btn--ghost {
  background: none;
}
.admin-btn--primary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
}
.admin-btn--primary:hover {
  background: rgba(255, 255, 255, 0.22);
}
.admin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.admin-badge {
  border: 1px solid rgba(255, 200, 0, 0.3);
  border-radius: 4px;
  color: rgba(255, 220, 90, 0.9);
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  text-transform: uppercase;
}
.admin-badge--muted {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.45);
}
.admin-panel-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  margin-bottom: 24px;
}
.admin-table {
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 20px;
  width: 100%;
}
.admin-table th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.45;
  padding: 8px 10px;
  text-align: left;
  text-transform: uppercase;
}
.admin-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 10px;
  vertical-align: middle;
}
.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  white-space: nowrap;
}
.admin-table-trunc {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table-wrap .admin-table {
  min-width: 720px;
}
.admin-table-row--active td {
  background: rgba(255, 255, 255, 0.04);
}
.admin-wrap--wide {
  max-width: 1760px;
}
.admin-page-header {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.admin-page-meta {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-helper-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 10px;
}
.admin-collection-table-name {
  font-size: 15px;
  font-weight: 600;
}
.admin-collection-table-note {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  margin-top: 6px;
}
.admin-collection-table-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.admin-collection-prompt-form {
  margin-bottom: 24px;
}
.admin-image-batch-card {
  margin-bottom: 24px;
}
.admin-image-batch-card[data-status="completed"] {
  border-color: rgba(60, 180, 100, 0.35);
}
.admin-image-batch-card[data-status="error"] {
  border-color: rgba(255, 80, 80, 0.35);
}
.admin-image-batch-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.admin-image-batch-percent {
  color: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.admin-image-batch-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}
.admin-image-batch-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
}
.admin-image-batch-stat-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.admin-image-batch-stat-value {
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  font-weight: 600;
  margin-top: 6px;
}
.admin-image-batch-progress {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
}
.admin-image-batch-progress-bar {
  background: linear-gradient(90deg, rgba(120, 220, 180, 0.9), rgba(255, 255, 255, 0.9));
  border-radius: 999px;
  height: 100%;
  transition: width 220ms ease;
  width: 0;
}
.admin-image-batch-message {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 14px;
}
.admin-image-batch-current {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  margin-top: 8px;
}
.admin-collection-switcher {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-collection-switcher-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}
.admin-collection-switcher-body {
  min-width: 240px;
}
.admin-collection-switcher-field {
  flex: 1 1 320px;
  min-width: 240px;
}
.admin-collection-switcher-form {
  align-items: flex-end;
  display: flex;
  flex: 1 1 460px;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}
.admin-collection-switcher-summary {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  margin-top: 8px;
}
.admin-collection-switcher-title {
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  font-weight: 600;
  margin-top: 6px;
}
.admin-animal-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.admin-animal-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-animal-card-thumb-link {
  color: inherit;
  text-decoration: none;
}
.admin-animal-card-thumb {
  display: block;
  height: 168px;
  object-fit: cover;
  width: 100%;
}
.admin-animal-card-thumb--empty {
  align-items: center;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  font-size: 12px;
  justify-content: center;
}
.admin-animal-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.admin-animal-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.admin-animal-card-name {
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
.admin-animal-card-name:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.admin-animal-card-sci {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  margin-top: 6px;
}
.admin-animal-card-index {
  color: rgba(255, 255, 255, 0.28);
  font-size: 11px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.admin-animal-card-group {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}
.admin-animal-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  text-transform: uppercase;
}
.admin-chip--accent {
  border-color: rgba(120, 220, 180, 0.35);
  color: rgba(170, 255, 220, 0.92);
}
.admin-animal-card-key {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}
.admin-animal-card-actions {
  margin-top: auto;
}
.admin-animal-editor {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}
.admin-animal-sidebar {
  display: grid;
  gap: 20px;
}
.admin-animal-main {
  display: grid;
  gap: 20px;
}
.admin-animal-image-card {
  position: static;
}
.admin-animal-preview-image {
  border-radius: 10px;
  display: block;
  max-height: 520px;
  object-fit: cover;
  width: 100%;
}
.admin-animal-preview-empty {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  justify-content: center;
  min-height: 280px;
  padding: 20px;
  text-align: center;
}
.admin-animal-thumb-wrap {
  margin-top: 16px;
}
.admin-animal-thumb-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.admin-animal-thumb-preview {
  border-radius: 10px;
  display: block;
  height: 140px;
  object-fit: cover;
  width: 140px;
}
.admin-field-grid {
  display: grid;
  gap: 16px;
}
.admin-field-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-field-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-field {
  min-width: 0;
}

/* ── Done page secondary button ── */

/* ── Admin nav ── */
.admin-nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 24px;
  padding-bottom: 2px;
  row-gap: 4px;
}
.admin-nav-link {
  border-radius: 4px 4px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  text-decoration: none;
  text-transform: uppercase;
}
.admin-nav-link:hover {
  color: rgba(255, 255, 255, 0.85);
}
.admin-nav-link--active {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

/* ── Admin collection sub-nav ── */
.admin-collection-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
}
.admin-collection-nav-link {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  padding: 5px 10px;
  text-decoration: none;
  text-transform: uppercase;
}
.admin-collection-nav-link:hover {
  color: rgba(255, 255, 255, 0.85);
}
.admin-collection-nav-link--active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

/* ── Admin success message ── */
.admin-success {
  background: rgba(60, 180, 100, 0.15);
  border: 1px solid rgba(60, 180, 100, 0.35);
  border-radius: 6px;
  color: rgba(160, 240, 160, 0.95);
  font-size: 13px;
  margin-bottom: 20px;
  padding: 10px 14px;
}

/* ── Admin table link ── */
.admin-table-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.admin-table-link:hover {
  color: #fff;
}

/* ── Collection statement table ── */
.collection-stmt-table {
  margin-bottom: 0;
}
.collection-stmt-row td {
  vertical-align: middle;
}
@media (max-width: 980px) {
  .admin-animal-editor {
    grid-template-columns: 1fr;
  }
  .admin-animal-image-card {
    position: static;
  }
  .admin-image-batch-stats {
    grid-template-columns: 1fr;
  }
  .admin-panel-grid {
    grid-template-columns: 1fr;
  }
  .admin-field-grid--three,
  .admin-field-grid--two {
    grid-template-columns: 1fr;
  }
}
