:root {
  --ink: #382229;
  --muted: #806a71;
  --pink: #cc6f91;
  --pink-dark: #a94e70;
  --pink-soft: #fbeaf0;
  --paper: #fffafb;
  --white: #ffffff;
  --line: #ead9df;
  --green: #4c8067;
  --shadow: 0 18px 50px rgba(75, 34, 49, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 4%, rgba(234, 178, 198, 0.3), transparent 27rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

.admin-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid rgba(234, 217, 223, 0.8);
  background: rgba(255, 250, 251, 0.88);
  backdrop-filter: blur(18px);
}

.admin-brand,
.admin-header-actions {
  display: flex;
  align-items: center;
}

.admin-brand {
  gap: 11px;
}

.admin-brand > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #e7b8c9;
  border-radius: 50%;
  color: var(--pink-dark);
  background: var(--pink-soft);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
}

.admin-brand strong {
  font-size: 15px;
}

.admin-header-actions {
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
}

.admin-header-actions a {
  color: var(--pink-dark);
}

.admin-header-actions button {
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--pink-soft);
}

.admin-main {
  width: min(100% - 48px, 1440px);
  margin: 0 auto;
  padding: 56px 0 90px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0 0 10px;
  color: var(--pink-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

.setup-panel {
  max-width: 720px;
  margin: 8vh auto;
  padding: 42px;
}

.setup-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 50px);
}

.setup-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

code {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--pink-soft);
}

.login-layout {
  display: grid;
  grid-template-columns: 1.2fr minmax(340px, 480px);
  align-items: center;
  gap: clamp(50px, 10vw, 150px);
  min-height: calc(100vh - 220px);
}

.login-copy h1 {
  max-width: 700px;
  margin-bottom: 24px;
  font-size: clamp(50px, 7vw, 96px);
  line-height: 0.96;
}

.login-copy > p:last-child {
  max-width: 510px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 20px;
  padding: clamp(28px, 4vw, 48px);
}

.login-form h2 {
  margin-bottom: 0;
  font-size: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: #5f4850;
  font-size: 12px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--white);
  transition: border-color 160ms, box-shadow 160ms;
}

input {
  min-height: 47px;
  padding: 0 14px;
}

textarea {
  min-height: 120px;
  padding: 13px 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #d88caa;
  box-shadow: 0 0 0 4px rgba(216, 140, 170, 0.13);
}

label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.primary-admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 0 22px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, #d9799c, #b9577b);
  box-shadow: 0 10px 22px rgba(185, 87, 123, 0.2);
  font-weight: 700;
}

.primary-admin-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-message {
  min-height: 18px;
  margin: -4px 0 0;
  color: #a34868;
  font-size: 12px;
}

.dashboard-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-title h1 {
  margin-bottom: 8px;
  font-size: clamp(42px, 6vw, 72px);
}

.dashboard-title > div > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stats article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
}

.stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stats strong {
  font-family: "Manrope", sans-serif;
  font-size: 30px;
}

.admin-columns {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.4fr);
  align-items: start;
  gap: 22px;
}

.editor-panel {
  position: sticky;
  top: 94px;
  padding: 28px;
}

.product-list-panel {
  min-width: 0;
  padding: 28px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 25px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--pink-soft);
  font-size: 22px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 13px;
}

.field-wide {
  grid-column: 1 / -1;
}

.image-preview {
  display: grid;
  overflow: hidden;
  min-height: 190px;
  margin: 20px 0;
  place-items: center;
  border: 1px dashed #dcb6c4;
  border-radius: 18px;
  color: var(--muted);
  background: #fff8fa;
  font-size: 11px;
}

.image-preview img {
  width: 100%;
  height: 210px;
  padding: 12px;
  object-fit: contain;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  cursor: pointer;
}

.switch-row input {
  width: 18px;
  min-height: auto;
  height: 18px;
  accent-color: var(--pink-dark);
}

.button-full {
  width: 100%;
}

.list-heading {
  align-items: center;
}

.admin-search {
  position: relative;
  display: block;
  width: min(240px, 46%);
}

.admin-search span {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
}

.admin-search input {
  padding-left: 38px;
  font-size: 12px;
}

.import-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--pink-soft);
}

.import-box strong {
  font-size: 13px;
}

.import-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.import-box button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--pink-dark);
  background: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.admin-product-list {
  display: grid;
  gap: 10px;
}

.admin-product {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.admin-product.is-inactive {
  opacity: 0.62;
}

.admin-product img {
  width: 76px;
  height: 76px;
  padding: 6px;
  border-radius: 13px;
  background: #fff7fa;
  object-fit: contain;
}

.admin-product-copy {
  min-width: 0;
}

.admin-product-copy strong {
  display: block;
  overflow: hidden;
  margin-bottom: 5px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green);
  background: #edf7f2;
  font-size: 9px;
  font-weight: 700;
}

.status-pill.is-off {
  color: var(--muted);
  background: #f2edef;
}

.admin-product-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-product-actions button {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--pink-dark);
  background: var(--pink-soft);
  font-size: 10px;
  font-weight: 700;
}

.admin-product-actions .delete-button {
  color: #9a3e4f;
  background: #fff0f1;
}

.empty-list {
  padding: 60px 0;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
}

@media (max-width: 1050px) {
  .admin-columns {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .admin-header {
    padding: 0 16px;
  }

  .admin-brand strong {
    display: none;
  }

  .admin-main {
    width: min(100% - 28px, 1440px);
    padding-top: 34px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .login-copy h1 {
    font-size: 50px;
  }

  .login-copy > p:last-child {
    font-size: 15px;
  }

  .dashboard-title {
    align-items: stretch;
    flex-direction: column;
  }

  .stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
  }

  .stats article {
    align-items: flex-start;
    flex-direction: column;
    min-height: 86px;
    padding: 14px;
  }

  .editor-panel,
  .product-list-panel {
    padding: 19px;
    border-radius: 20px;
  }

  .list-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-search {
    width: 100%;
  }

  .import-box {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-product {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .admin-product img {
    width: 62px;
    height: 62px;
  }

  .admin-product-actions {
    grid-column: 1 / -1;
  }

  .admin-product-actions button {
    flex: 1;
  }
}

@media (max-width: 430px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }
}
