:root {
  --bg: #fdf3f8;
  --surface: #fff;
  --ink: #472b3e;
  --muted: #9d7a90;
  --line: #f4dbe8;
  --accent: #ec4899;
  --accent-hover: #db2777;
  --green: #15803d;
  --red: #b91c1c;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.admin-shell { display: flex; min-height: 100vh; }

.admin-side {
  width: 240px;
  background: #472b3e;
  color: #f3e5ec;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.admin-side .brand { color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 20px; padding: 0 8px; }
.admin-side .brand span { color: #f472b6; }

.admin-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #e8d3de;
  font-size: 14px;
  transition: .15s;
}
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active { background: rgba(244, 114, 182, .22); color: #fff; }

.admin-main { flex: 1; padding: 32px 40px; min-width: 0; }

.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }

/* ---------- Таблица ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(236,72,153,.06); }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fdf1f7; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fdf6fa; }

.thumb { width: 56px; height: 42px; border-radius: 8px; background: #f3d9e7 center/cover no-repeat; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge--on { background: #eaf7ee; color: var(--green); }
.badge--off { background: #f6e9f0; color: var(--muted); }

/* ---------- Формы ---------- */
.form-card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 3px rgba(236,72,153,.06); max-width: 720px; }

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.form-row input[type=text],
.form-row input[type=number],
.form-row input[type=password],
.form-row textarea,
.form-row select {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none;
  border-color: #f472b6;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, .15);
}
.form-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

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

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: .15s;
}
.btn--primary { background: linear-gradient(90deg, #ec4899, #f472b6); color: #fff; }
.btn--primary:hover { filter: brightness(1.04); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: #f0c4dd; background: #fff; }
.btn--danger { background: #fdecec; color: var(--red); }
.btn--danger:hover { background: #fbdcdc; }
.btn--sm { padding: 7px 12px; font-size: 13px; }

/* ---------- Вход ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--surface); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 380px; box-shadow: 0 8px 36px rgba(190,70,140,.12); }
.login-card h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.login-card p { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

/* ---------- Список товаров в редакторе страницы ---------- */
.products-editor { margin-top: 28px; }
.products-editor__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.products-editor__head h2 { font-size: 18px; font-weight: 800; margin: 0; }

.item-list { display: flex; flex-direction: column; gap: 10px; }
.item-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.item-row__main { flex: 1; min-width: 0; }
.item-row__title { font-weight: 700; font-size: 15px; }
.item-row__desc { color: var(--muted); font-size: 13px; }
.item-row__price { font-weight: 800; white-space: nowrap; color: #db2777; }
.item-row__actions { display: flex; gap: 8px; }

.alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.alert--error { background: #fdecec; color: var(--red); }
.alert--ok { background: #eaf7ee; color: var(--green); }

.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
