/* ============================================================
   Админ-панель (конструктор каталогов и акций)
   ============================================================ */
.admin-body { background: #f4f0f7; }

.login-wrap { min-height: 70vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  background: #fff; border-radius: 22px; box-shadow: 0 18px 50px rgba(42,34,51,.14);
  padding: 36px; width: min(420px, 100%); text-align: center;
}
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card p { font-size: 13.5px; color: var(--c-grey); margin-bottom: 22px; }
.login-card .form__field { text-align: left; }
.login-error { color: #d92b4b; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* Верхняя панель админки */
.adminbar {
  position: sticky; top: 0; z-index: 50;
  background: #2a2233; color: #fff;
  padding: 12px 0;
}
.adminbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.adminbar b { font-size: 15px; }
.adminbar__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Табы */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 20px; }
.tab-btn {
  font-family: var(--font); font-weight: 700; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; border: 2px solid #e5dbeb;
  background: #fff; color: var(--c-dark); cursor: pointer; transition: .2s;
}
.tab-btn.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* Карточки-панели */
.panel {
  background: #fff; border-radius: var(--radius); box-shadow: 0 8px 26px rgba(42,34,51,.08);
  padding: 22px; margin-bottom: 18px;
}
.panel h2 { font-size: 18px; margin-bottom: 4px; }
.panel > p.hint { font-size: 13px; color: var(--c-grey); margin-bottom: 18px; }

/* Каталог: карточка редактирования */
.acard { border: 1.5px solid #eee3f2; border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.acard__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.acard__head b { font-size: 16px; }
.acard__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  background: #f4ecf9; color: var(--c-dark); border: none;
  padding: 8px 13px; border-radius: 999px; cursor: pointer; transition: .2s;
}
.icon-btn:hover { background: #e7d8f3; }
.icon-btn.danger { background: #fde3e8; color: #c22050; }
.icon-btn.danger:hover { background: #f9cdd7; }

.apages { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; }
.apage { position: relative; flex-shrink: 0; }
.apage img { width: 62px; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; border: 1.5px solid #eee3f2; }
.apage .del {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px;
  border-radius: 50%; border: none; background: #c22050; color: #fff;
  font-size: 12px; cursor: pointer; line-height: 1;
}

/* Акции: сетка редактирования */
.promo-edit { display: grid; grid-template-columns: 160px 1fr; gap: 18px; }
.promo-edit__img {
  aspect-ratio: 3/4; border-radius: 12px; overflow: hidden;
  border: 1.5px dashed #d9c8e6; background: #faf6fc;
  display: grid; place-items: center; font-size: 12.5px; color: var(--c-grey); text-align: center;
}
.promo-edit__img img { width: 100%; height: 100%; object-fit: cover; }
.promo-edit__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.promo-edit__fields .wide { grid-column: 1 / -1; }

/* Заявки */
.leads-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.leads-table th, .leads-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f0e6f4; }
.leads-table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-grey); }
.lead-topic { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fdeef2; color: var(--c-primary-dark); }

/* Тост */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #2a2233; color: #fff; font-size: 14px; font-weight: 600;
  padding: 13px 24px; border-radius: 999px; box-shadow: 0 12px 34px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; transition: .3s; z-index: 400;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.savebar {
  position: sticky; bottom: 14px; z-index: 40;
  display: flex; justify-content: flex-end; gap: 10px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px);
  border-radius: 16px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(42,34,51,.12);
  margin-top: 8px;
}

@media (max-width: 720px) {
  .promo-edit { grid-template-columns: 1fr; }
  .promo-edit__fields { grid-template-columns: 1fr; }
}

/* ---------- Диалог импорта PDF ---------- */
.pdf-dialog {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(42, 34, 51, .55);
  display: none; place-items: center; padding: 20px;
}
.pdf-dialog.open { display: grid; }
.pdf-dialog__card {
  background: #fff; border-radius: 20px; padding: 28px;
  width: min(460px, 100%); box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.pdf-dialog__card h3 { margin-bottom: 4px; }
.pdf-dialog__card .hint { font-size: 13px; color: var(--c-grey); margin-bottom: 16px; }

/* ---------- Поля в сетках ---------- */
.form__field.wide { grid-column: 1 / -1; }
.form__field textarea {
  width: 100%; font-family: var(--font); font-size: 14px; line-height: 1.5;
  padding: 11px 14px; border: 1.5px solid #eed3dc; border-radius: 12px;
  background: #fffafc; color: var(--c-dark); outline: none; resize: vertical;
}
.form__field textarea:focus { border-color: var(--c-primary); }
.form__field select {
  width: 100%; font-family: var(--font); font-size: 14.5px;
  padding: 12px 14px; border: 1.5px solid #eed3dc; border-radius: 12px;
  background: #fffafc; color: var(--c-dark); outline: none;
}
