/*
  BlockHub — visual identity
  A light, clean, modern take on a Minecraft resource hub.
  One restrained emerald accent, calm neutrals, subtle blocky details.
  Class names match the existing HTML/JS, so markup does not need to change.
*/

:root {
  color-scheme: light;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* Neutrals */
  --bg: #f3f6f2;
  --bg-2: #eaeee7;
  --surface: #ffffff;
  --surface-2: #f6f8f4;
  --surface-soft: #f0f3ee;
  --border: #e3e8df;
  --border-strong: #d3dacb;
  --text: #182420;
  --text-soft: #33413a;
  --muted: #6b776e;

  /* Single restrained accent (from the BlockHub emerald mark) */
  --accent: #2f9e56;
  --accent-strong: #257f45;
  --accent-soft: #e6f4ea;
  --accent-ring: rgba(47, 158, 86, 0.28);

  --danger: #d64b45;
  --danger-soft: #fbeceb;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(24, 36, 32, 0.05), 0 1px 3px rgba(24, 36, 32, 0.06);
  --shadow: 0 6px 18px rgba(24, 36, 32, 0.07);
  --shadow-lg: 0 18px 40px rgba(24, 36, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 50% -160px, var(--accent-soft), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

h1, h2, h3, h4 {
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

/* ---------- Header ---------- */
.site-header {
  display: grid;
  gap: 18px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.header-top,
.search-bar-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Blocky, squared logo tile — a subtle Minecraft nod without the default UI look */
.brand-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(47, 158, 86, 0.22);
  color: var(--accent);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 30px;
  height: 30px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: block;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  max-width: 520px;
  font-size: 0.95rem;
}

.top-nav,
.site-nav,
.admin-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-link {
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-link:hover {
  background: var(--accent-soft);
  border-color: rgba(47, 158, 86, 0.3);
  color: var(--accent-strong);
}

/* ---------- Explore / search ---------- */
.explore-section {
  margin-top: 40px;
}

.explore-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.explore-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.12;
  max-width: 720px;
  text-wrap: balance;
}

.section-subtitle {
  margin: 6px 0 0;
  max-width: 640px;
  color: var(--muted);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 820px;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 460px;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.search-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

.search-input-group input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  padding: 0;
}

/* ---------- Category dropdown ---------- */
.category-dropdown {
  position: relative;
  flex: 0 0 auto;
  min-width: 200px;
  width: min(260px, 100%);
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dropdown-toggle:hover,
.dropdown-toggle:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.dropdown-toggle svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  margin-top: 8px;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 20;
  max-height: 320px;
  overflow-y: auto;
  text-align: left;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: var(--surface-2);
  color: var(--text);
  outline: none;
}

.dropdown-item.selected {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.search-summary {
  width: 100%;
  max-width: 820px;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 4px 0 0;
}

.search-hint {
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
}

/* ---------- Resource grid + cards ---------- */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.mod-card {
  display: flex;
  width: 100%;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mod-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 158, 86, 0.35);
  box-shadow: var(--shadow-lg);
}

.mod-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Subtle blocky texture strip at the top of each card */
.mod-card-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background:
    linear-gradient(rgba(47, 158, 86, 0.05) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, rgba(47, 158, 86, 0.05) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.mod-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.mod-card-title h3 {
  margin: 0;
  min-width: 0;
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-badge,
.id-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.category-badge {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(47, 158, 86, 0.2);
}

.id-badge {
  color: var(--muted);
  background: var(--surface);
  border-color: var(--border-strong);
  font-variant-numeric: tabular-nums;
}

.mod-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.meta-chip.meta-chip-version {
  color: var(--text-soft);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.meta-chip.meta-chip-verified,
.meta-chip-verified {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(47, 158, 86, 0.22);
}

.mod-card-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 66px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  text-overflow: ellipsis;
}

.button-group {
  margin-top: auto;
}

/* ---------- Buttons ---------- */
.button,
.button-secondary,
.button-primary,
.button-danger {
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button {
  padding: 11px 18px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.button-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: var(--shadow);
}

.button-secondary {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--border-strong);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.button-danger {
  background: var(--danger);
  color: #ffffff;
  border: 1px solid var(--danger);
}

.button-danger:hover {
  background: #c13f3a;
}

.download-button {
  width: 100%;
  text-align: center;
}

.download-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}

.btn-icon path {
  stroke: currentColor;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

/* ---------- Skeleton loading ---------- */
.skeleton-block {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 999px;
}

.skeleton-block::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(24, 36, 32, 0.06), transparent);
  animation: skeletonSweep 1.4s ease-in-out infinite;
}

.skeleton-pill { width: 120px; height: 32px; border-radius: 8px; }
.skeleton-chip { width: 110px; height: 30px; }
.skeleton-title { width: min(260px, 70%); height: 30px; border-radius: 10px; margin-top: 8px; }
.skeleton-text { width: 100%; height: 15px; margin-top: 12px; }
.skeleton-text.short { width: 72%; }
.skeleton-line { width: 100%; height: 13px; margin-bottom: 10px; }
.skeleton-line.short { width: 70%; }
.skeleton-button { width: 150px; height: 46px; border-radius: var(--radius); }

.loading-card {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

@keyframes skeletonSweep {
  100% { transform: translateX(100%); }
}

/* ---------- Shared text ---------- */
.error-message,
.detail-description {
  color: var(--muted);
}

.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
}

.label-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.status-pill {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(47, 158, 86, 0.2);
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 10px;
}

/* ---------- Resource detail ---------- */
.mod-detail-main {
  margin-top: 26px;
}

.detail-header {
  align-items: center;
}

.detail-header .header-top {
  gap: 20px;
}

.mod-detail-card {
  display: grid;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.mod-detail-card-large {
  grid-template-columns: 1fr;
}

.mod-detail-panel {
  display: grid;
  gap: 16px;
}

.mod-detail-tag {
  display: inline-flex;
  align-self: flex-start;
  justify-self: start;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(47, 158, 86, 0.22);
  font-size: 0.85rem;
  font-weight: 600;
}

.mod-detail-content {
  display: grid;
  gap: 16px;
}

.mod-detail-content h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.4vw, 2.3rem);
  font-weight: 700;
}

.detail-description {
  font-size: 1rem;
  line-height: 1.7;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ---------- Content locker ---------- */
.content-locker-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.content-locker-header h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.content-locker-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.content-locker-progress {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(47, 158, 86, 0.2);
}

.content-locker-steps {
  display: grid;
  gap: 12px;
}

.locker-step {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.locker-step-complete {
  border-color: rgba(47, 158, 86, 0.35);
  background: var(--accent-soft);
}

.locker-step-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.locker-step-locked {
  opacity: 0.7;
}

.locker-step-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.locker-step-title-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.locker-step-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  flex-shrink: 0;
}

.locker-step-locked .locker-step-badge {
  background: var(--border-strong);
  color: var(--muted);
}

.locker-step-header h4 {
  margin: 0 0 3px;
  font-size: 0.98rem;
}

.locker-step-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.locker-status {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.locker-step-complete .locker-status,
.locker-step-active .locker-status {
  color: var(--accent-strong);
}

.locker-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.locker-progress-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}

.locker-progress-pill-done {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(47, 158, 86, 0.22);
}

.locker-progress-pill-active {
  color: var(--accent-strong);
  background: var(--surface);
  border-color: var(--accent);
}

.locker-progress-line {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: var(--border-strong);
}

.locker-step-complete .locker-progress-line {
  background: var(--accent);
}

.locker-action {
  width: fit-content;
}

.locker-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Confetti ---------- */
.confetti-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 9px;
  height: 16px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confettiFall 1.2s cubic-bezier(.2,.9,.3,1) forwards;
  transform: rotate(var(--rotation));
}

@keyframes confettiFall {
  0% { transform: translate3d(0, -20px, 0) rotate(var(--rotation)); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate3d(var(--drift), var(--fall), 0) rotate(calc(var(--rotation) + 360deg)); opacity: 0; }
}

/* ---------- Admin ---------- */
.admin-page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.admin-login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.admin-login-card {
  width: min(480px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-lg);
}

.admin-login-card .brand {
  margin-bottom: 24px;
}

.admin-login-form {
  display: grid;
  gap: 16px;
}

.admin-login-form label,
.admin-form label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
}

.admin-login-form input,
.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-login-form input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.admin-form textarea {
  resize: vertical;
  font-family: 'Inter', system-ui, sans-serif;
}

.admin-form select option {
  color: var(--text);
  background: var(--surface);
}

.admin-hidden {
  display: none !important;
}

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

.admin-main {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.admin-panel,
.admin-list-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.admin-panel-header {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.admin-panel-header h2,
.admin-list-section h2 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-form {
  display: grid;
  gap: 18px;
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-actions-right {
  justify-content: flex-end;
}

.admin-locker-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.admin-locker-header h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.admin-locker-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-locker-grid {
  align-items: end;
}

.admin-status {
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.admin-list-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-search-box input {
  width: 100%;
  padding: 11px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.admin-search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

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

.admin-mod-list {
  display: grid;
  gap: 14px;
}

.admin-empty {
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.admin-mod-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.admin-mod-item h3 {
  margin: 0 0 3px;
  font-size: 1.02rem;
}

.admin-mod-item > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-mod-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-mod-row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-mod-select-wrap label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.admin-mod-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-mod-actions button {
  min-width: 84px;
  padding: 8px 14px;
  font-size: 0.88rem;
}

.admin-mod-item .label-pill {
  margin: 10px 8px 0 0;
}

/* ---------- Forms ---------- */
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .mod-detail-card-large,
  .admin-main,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .mod-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-top,
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav,
  .admin-nav {
    justify-content: flex-start;
  }

  .filter-row {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
    justify-content: stretch;
  }

  .category-dropdown,
  .search-input-group {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .site-header,
  .admin-panel,
  .admin-list-section,
  .admin-login-card {
    padding: 22px;
  }
}

@media (max-width: 680px) {
  .page-shell,
  .admin-page-shell {
    width: calc(100% - 28px);
  }

  .mod-grid {
    grid-template-columns: 1fr;
  }

  .mod-card-title h3 {
    white-space: normal;
  }

  .mod-card-description {
    min-height: auto;
  }

  .brand h1 {
    font-size: 1.5rem;
  }

  .locker-step-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions .button,
  .detail-actions .status-pill {
    width: 100%;
  }

  .admin-mod-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
