.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(214, 168, 76, 0.18), transparent 34%),
    #0d0d0f;
}

.login-box {
  width: min(420px, calc(100% - 28px));
  margin: 8vh auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #1a1a1a, #111);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.login-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-box h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1;
}

.login-box p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.login-box form,
.editor-fields {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(214, 168, 76, 0.18);
}

.admin-button,
.view-store,
.admin-logout,
.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.admin-button {
  width: 100%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #171005;
  cursor: pointer;
}

.back-link {
  margin-top: 14px;
  color: var(--gold-soft);
}

.alert {
  width: min(1180px, calc(100% - 24px));
  margin: 16px auto;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 800;
}

.alert.success {
  background: rgba(22, 184, 94, 0.16);
  color: #85f0b7;
  border: 1px solid rgba(22, 184, 94, 0.36);
}

.alert.error {
  background: rgba(227, 59, 49, 0.16);
  color: #ff9a93;
  border: 1px solid rgba(227, 59, 49, 0.36);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(14px, 4vw, 42px);
  background: rgba(10, 10, 12, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.admin-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.admin-logout,
.view-store {
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid var(--line);
}

.admin-shell {
  padding: clamp(24px, 5vw, 46px) 12px 96px;
}

.admin-intro {
  width: min(1180px, 100%);
  margin: 0 auto 22px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.admin-intro p {
  margin: 0;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-intro h1 {
  margin: 4px 0 6px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.admin-intro span {
  color: var(--muted);
}

.products-editor {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.editor-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #191919, #111);
}

.editor-image {
  display: grid;
  gap: 10px;
  align-content: start;
}

.editor-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}

.file-label {
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(243, 206, 120, 0.48);
  border-radius: 8px;
  color: var(--gold-soft);
  cursor: pointer;
}

.file-label input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.editor-head strong {
  color: var(--gold-soft);
}

.editor-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}

.switch {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--text);
  white-space: nowrap;
  font-size: 0.82rem;
}

.switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}

.save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 8;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.9);
  backdrop-filter: blur(14px);
}

@media (max-width: 760px) {
  .admin-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .view-store {
    width: 100%;
  }

  .editor-card {
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 10px;
  }

  .editor-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-options {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .admin-topbar {
    padding: 10px 12px;
  }

  .admin-brand span {
    font-size: 0.9rem;
  }

  .admin-logout {
    min-height: 38px;
    padding: 0 12px;
  }

  .editor-card {
    grid-template-columns: 1fr;
  }

  .editor-image {
    grid-template-columns: 112px 1fr;
    align-items: center;
  }

  .file-label {
    height: 46px;
  }
}
