:root {
  --bg: #0d120d;
  --panel: #132013;
  --panel-soft: #172717;
  --text: #edf8e9;
  --muted: #a1b79d;
  --line: #2d462d;
  --primary: #97ce5d;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.27);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #223522 0%, var(--bg) 46%, #070b07 100%);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(151, 206, 93, 0.25);
  background: rgba(10, 16, 10, 0.86);
  backdrop-filter: blur(10px);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.topbar:hover {
  border-bottom-color: rgba(151, 206, 93, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.33);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  color: #e7ffd2;
}

.brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(151, 206, 93, 0.52));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
  filter: drop-shadow(0 0 12px rgba(151, 206, 93, 0.82));
}

.top-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-links a {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.84rem;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.top-links a:hover {
  color: #edfcd8;
  border-color: rgba(151, 206, 93, 0.55);
  background: rgba(151, 206, 93, 0.15);
  transform: translateY(-1px);
}

.wrap {
  width: min(1240px, 94%);
  margin: 20px auto 32px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--panel), #101810);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(151, 206, 93, 0.54);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(151, 206, 93, 0.2);
}

.hero {
  padding: 18px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #b7eb86;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

h1 {
  margin: 0 0 9px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-points {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-points span {
  border: 1px solid #355535;
  border-radius: 999px;
  padding: 4px 9px;
  color: #d7f6bc;
  font-size: 0.79rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.hero-points span:hover {
  border-color: rgba(151, 206, 93, 0.62);
  background: rgba(151, 206, 93, 0.16);
  transform: translateY(-1px);
}

.upload-pill {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid #4a6f3a;
  border-radius: 999px;
  padding: 4px 10px;
  color: #e3f8d3;
  background: rgba(151, 206, 93, 0.14);
  font-size: 0.79rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.upload-pill:hover {
  border-color: rgba(151, 206, 93, 0.74);
  background: rgba(151, 206, 93, 0.22);
  transform: translateY(-1px);
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.2fr 0.8fr;
}

.panel {
  padding: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

h2 {
  margin: 0;
  font-size: 1.12rem;
}

.controls {
  margin-top: 10px;
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 170px;
}

.admin-tools {
  margin-top: 10px;
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr auto;
}

input,
select,
textarea {
  width: 100%;
  background: #101810;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(151, 206, 93, 0.23);
}

textarea {
  resize: vertical;
}

.catalog-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.catalog-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #122012;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(151, 206, 93, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(151, 206, 93, 0.18);
}

.preview {
  width: 100%;
  height: 100%;
  min-height: 108px;
  object-fit: cover;
  background: #0e140e;
}

.body {
  padding: 10px;
  min-width: 0;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.row h3 {
  margin: 0;
  font-size: 1rem;
}

.badge {
  border: 1px solid #3f643f;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #d4f6b8;
}

.description {
  margin: 8px 0 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

.meta {
  margin: 0 0 8px;
  color: #bdd5b5;
  font-size: 0.8rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-stack {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: #d3eac8;
}

.muted {
  margin: 6px 0 2px;
  color: var(--muted);
}

.status {
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  color: #d8f0cb;
  background: #122012;
  font-size: 0.88rem;
}

.status.error {
  border-color: #7e3434;
  background: #2d1313;
  color: #ffdada;
}

.status.success {
  border-color: #3d6931;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 9px 13px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.45s ease;
}

.btn:hover::after {
  left: 160%;
}

.btn-primary {
  color: #101710;
  background: linear-gradient(180deg, var(--primary), #79b741);
  box-shadow: 0 8px 20px rgba(151, 206, 93, 0.33);
}

.btn-secondary {
  color: #d2e9c8;
  border-color: var(--line);
  background: #132213;
}

.delete-link {
  border-color: #6a3b3b;
  background: #2b1616;
  color: #ffd9d9;
}

.btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .admin-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .catalog-card {
    grid-template-columns: 1fr;
  }

  .preview {
    min-height: 160px;
  }
}
