:root {
  color-scheme: dark;
  --bg: #0b0b0f;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.58);
  --primary: #ff5d73;
  --primary-2: #70d6ff;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(255, 93, 115, 0.2),
      transparent 34rem
    ),
    radial-gradient(
      circle at 100% 10%,
      rgba(112, 214, 255, 0.16),
      transparent 28rem
    ),
    var(--bg);
  color: var(--text);
}
button,
input,
textarea {
  font: inherit;
}
button {
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), #ff7d92);
  color: white;
  padding: 0.9rem 1.2rem;
  font-weight: 800;
  cursor: pointer;
}
button:hover {
  filter: brightness(1.05);
}
button.ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
}
button.danger {
  background: rgba(255, 89, 89, 0.22);
  color: #ff9292;
}
input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0.85rem 1rem;
  outline: none;
}
input:focus,
textarea:focus {
  border-color: rgba(112, 214, 255, 0.75);
}
label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 700;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}
.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5rem);
  letter-spacing: 0;
}
.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--primary-2);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.muted {
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
  backdrop-filter: blur(22px);
}
.narrow {
  max-width: 460px;
}
.stack {
  display: grid;
  gap: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.4fr);
  gap: 1rem;
  align-items: start;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.section-head h2,
.panel h2 {
  margin: 0;
  font-size: 1.55rem;
}
.drop-zone {
  min-height: 170px;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}
.drop-zone input {
  display: none;
}
.drop-title {
  display: block;
  font-size: 1.35rem;
  color: var(--text);
}
.upload-panel {
  display: grid;
  gap: 1rem;
}
.search {
  max-width: 280px;
}
.admin-list {
  display: grid;
  gap: 0.7rem;
  max-height: 68vh;
  overflow: auto;
  padding-right: 0.25rem;
}
.photo-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid transparent;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}
.photo-row:hover {
  border-color: var(--border);
}
.photo-row img {
  width: 78px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
}
.photo-row h3 {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-row p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.tags span {
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-size: 0.78rem;
}
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  width: min(520px, calc(100% - 24px));
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}
.dialog-panel {
  display: grid;
  gap: 0.85rem;
  position: relative;
}
.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}
#edit-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 22px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  backdrop-filter: blur(18px);
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 24px, 680px);
    padding: 24px 0;
  }
  .hero {
    align-items: start;
    flex-direction: column;
  }
  .grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .section-head {
    flex-direction: column;
  }
  .search {
    max-width: none;
  }
  .admin-list {
    max-height: none;
  }
}
