:root {
  --zp-bg: #141210;
  --zp-panel: #1e1b18;
  --zp-cream: #f2ede4;
  --zp-muted: #8a8176;
  --zp-red: #c0281c;
  --zp-gold: #e8b04a;
  --zp-border: rgba(255, 255, 255, 0.08);
  --zp-ok: #3d8b5c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #2a2218, transparent),
    linear-gradient(180deg, #181512, var(--zp-bg));
  color: var(--zp-cream);
  min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--zp-muted); }
.zp-shell { width: min(1100px, 100%); margin: 0 auto; padding: 0 16px; }
.zp-top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(20, 18, 16, 0.92);
  border-bottom: 1px solid var(--zp-border);
}
.zp-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; gap: 12px;
}
.zp-top-left {
  display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap;
}
.zp-brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: inherit; text-decoration: none; font-weight: 650;
}
.zp-top-nav {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.zp-top-nav a {
  color: var(--zp-muted);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}
.zp-top-nav a:hover { color: var(--zp-cream); }
.zp-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.zp-user-email {
  color: var(--zp-muted);
  font-size: 0.9rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zp-balance {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.zp-btn {
  border: 1px solid var(--zp-border);
  background: #2a2622;
  color: var(--zp-cream);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}
.zp-btn.primary { background: var(--zp-red); border-color: transparent; }
.zp-btn.ghost { background: transparent; }
.zp-btn:disabled { opacity: 0.5; cursor: default; }
.zp-base-select {
  max-width: 160px;
  background: #2a2622;
  color: var(--zp-cream);
  border: 1px solid var(--zp-border);
  border-radius: 8px;
  padding: 7px 8px;
}
.zp-main { padding: 24px 16px 80px; }
.zp-panel {
  background: var(--zp-panel);
  border: 1px solid var(--zp-border);
  border-radius: 16px;
  padding: 20px;
}
.zp-panel h1 { margin: 0 0 8px; font-size: 1.6rem; }
.zp-status { min-height: 1.4em; }
.zp-steps {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
}
.zp-step {
  font: inherit;
  font-size: 12px; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--zp-border); color: var(--zp-muted);
  background: transparent; cursor: pointer;
}
.zp-step:hover { color: #eee; border-color: #6a6258; }
.zp-step.is-on { color: #111; background: var(--zp-gold); border-color: transparent; }
.zp-step.is-on:hover { color: #111; }
.zp-wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 20px; flex-wrap: wrap;
}
.zp-wizard-nav-right {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-left: auto;
}
.zp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.zp-list li {
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; background: #181512;
  border: 1px solid var(--zp-border);
}
.zp-photo-row { gap: 12px; }
.zp-photo-name { flex: 1; min-width: 0; }
.zp-thumb {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover;
  flex: 0 0 auto; background: #2a2622; border: 1px solid var(--zp-border);
}
.zp-thumb.is-empty { opacity: 0.35; }
.zp-thumb-empty {
  display: inline-block; width: 56px; height: 56px; border-radius: 10px;
  flex: 0 0 auto; background: #2a2622; border: 1px dashed var(--zp-border);
}
.zp-field { display: grid; gap: 6px; margin: 12px 0; }
.zp-field input, .zp-field textarea, .zp-map {
  width: 100%; border-radius: 8px; border: 1px solid var(--zp-border);
  background: #12100e; color: var(--zp-cream); padding: 10px 12px; font: inherit;
}
.zp-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.zp-row .zp-field { flex: 1; min-width: 120px; }
.zp-map {
  display: grid; gap: 10px; padding: 12px;
}
.zp-map label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.zp-work-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px;
}
.zp-dish-toolbar {
  margin: 0 0 10px;
}
.zp-dish-toolbar input[type="search"] {
  width: 100%;
  box-sizing: border-box;
}
.zp-dish-pager {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px 0 14px;
  min-height: 2rem;
}
.zp-dish-add {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  grid-template-columns: 1fr 1fr 100px auto auto;
  align-items: center;
}
@media (max-width: 900px) {
  .zp-dish-add { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .zp-dish-add { grid-template-columns: 1fr; }
}
.zp-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--zp-cream);
  white-space: nowrap;
}
.zp-check-inline input { width: auto !important; margin: 0; }
.zp-check-block { margin: 4px 0 0; }
.zp-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--zp-muted);
  border: 1px solid var(--zp-border);
  vertical-align: middle;
}
.zp-pill-on {
  color: #d8f5e2;
  border-color: rgba(61, 139, 92, 0.5);
  background: rgba(61, 139, 92, 0.18);
}
.zp-dish-card.is-off { opacity: 0.78; }
.zp-group-add {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.zp-group-add input { flex: 1; min-width: 160px; }
.zp-group-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.zp-group-row.is-edit { align-items: stretch; }
.zp-group-row.is-edit input { flex: 1; min-width: 140px; }
.zp-group-name { font-weight: 600; }
.zp-group-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.zp-dish-card {
  border: 1px solid var(--zp-border);
  border-radius: 12px;
  background: #181512;
  margin-bottom: 8px;
  overflow: hidden;
}
.zp-dish-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.zp-dish-head-main { min-width: 0; }
.zp-dish-head-meta {
  display: inline-flex; gap: 10px; align-items: center; flex-shrink: 0;
}
.zp-dish-edit { padding: 0 14px 14px; display: grid; gap: 12px; }
.zp-dish-edit-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1.4fr 1fr 110px;
}
@media (max-width: 720px) {
  .zp-dish-edit-grid { grid-template-columns: 1fr; }
}
.zp-dish-edit-grid label {
  display: grid; gap: 4px; font-size: 0.85rem; color: var(--zp-muted);
}
.zp-dish-photos {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 720px) {
  .zp-dish-photos { grid-template-columns: 1fr; }
}
.zp-dish-photo {
  border: 1px solid var(--zp-border);
  border-radius: 10px;
  background: #12100e;
  padding: 8px;
  display: grid;
  gap: 6px;
  justify-items: stretch;
}
.zp-dish-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.zp-dish-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 1px dashed var(--zp-border);
  color: var(--zp-muted);
  font-size: 0.85rem;
}
.zp-dish-photo-btn { width: 100%; text-align: center; cursor: pointer; }
.zp-dish-composition {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--zp-muted);
}
.zp-dish-composition textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}
.zp-dish-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.zp-work-dish {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.zp-work-dish-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #1a1816;
}
.zp-work-dish-main { flex: 1; min-width: 0; }
.zp-work-dish-actions {
  display: inline-flex; gap: 10px; align-items: center;
}
.zp-focus-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.zp-dish-head:disabled {
  cursor: default;
  opacity: 1;
}
.zp-view-toggle {
  display: inline-flex; gap: 2px; margin-left: auto;
  border: 1px solid var(--zp-border); border-radius: 999px; padding: 2px;
  background: #12100e;
}
.zp-view-btn {
  font: inherit; font-size: 13px; border: 0; background: transparent;
  color: var(--zp-muted); padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.zp-view-btn:hover { color: var(--zp-cream); }
.zp-view-btn.is-on {
  color: #111; background: var(--zp-gold);
}
.zp-check-list { display: grid; gap: 8px; }
.zp-check {
  display: flex; gap: 8px; align-items: center; font-size: 14px;
  padding: 8px 10px; border-radius: 8px; background: #181512; border: 1px solid var(--zp-border);
}
.zp-calendar-wrap { margin-top: 4px; }
.zp-calendar-scroll {
  overflow: auto; max-width: 100%;
  border: 1px solid var(--zp-border); border-radius: 12px; background: #181512;
}
.zp-calendar-table {
  border-collapse: separate; border-spacing: 0; min-width: 100%;
  font-size: 13px;
}
.zp-calendar-table th,
.zp-calendar-table td {
  border-right: 1px solid var(--zp-border);
  border-bottom: 1px solid var(--zp-border);
  vertical-align: top; padding: 6px;
}
.zp-calendar-table th {
  position: sticky; top: 0; z-index: 1;
  background: #24201c; color: var(--zp-muted); font-weight: 600;
  text-align: center; white-space: nowrap;
}
.zp-cal-wc {
  position: sticky; left: 0; z-index: 2;
  background: #24201c; min-width: 140px; max-width: 180px;
  font-weight: 600;
}
.zp-cal-hour {
  min-width: 110px; height: 72px; cursor: pointer;
  background: #12100e;
}
.zp-cal-hour:hover:not(.is-off):not(.is-busy) { background: #1c1916; }
.zp-cal-hour.is-off {
  background: #0e0c0b; cursor: default; opacity: 0.45;
}
.zp-cal-hour.is-busy {
  background: #2a2218; cursor: default;
}
.zp-cal-chip {
  display: grid; gap: 2px; width: 100%; min-height: 58px; box-sizing: border-box;
  text-align: left;
  border: 1px solid rgba(196, 140, 74, 0.45); border-radius: 8px;
  background: #2a2218; color: var(--zp-cream); padding: 6px 7px;
  font: inherit; font-size: 12px; cursor: pointer; margin-bottom: 0;
}
.zp-cal-chip.is-span {
  background: linear-gradient(90deg, #2a2218 0%, #3a2e1f 100%);
}
.zp-cal-chip strong { font-size: 12px; }
.zp-cal-chip .muted { color: var(--zp-muted); font-size: 11px; }
.zp-block-banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(196, 140, 74, 0.45);
  background: rgba(196, 140, 74, 0.12);
  color: var(--zp-cream);
  line-height: 1.45;
}
.zp-work-bar input[type="date"] {
  background: #12100e; color: var(--zp-cream); border: 1px solid var(--zp-border);
  border-radius: 8px; padding: 8px;
}
.zp-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.zp-col {
  background: #181512; border: 1px solid var(--zp-border); border-radius: 12px; padding: 10px;
  min-height: 180px;
}
.zp-col h3 { margin: 0 0 8px; font-size: 13px; color: var(--zp-muted); font-weight: 600; }
.zp-card {
  background: #24201c; border-radius: 10px; padding: 10px; margin-bottom: 8px;
  cursor: pointer; border: 1px solid transparent;
}
.zp-card:hover { border-color: var(--zp-gold); }
.zp-card strong { display: block; margin-bottom: 4px; }
.zp-sheet {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center;
}
.zp-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.zp-sheet-card {
  position: relative; width: min(560px, 100%); max-height: 85vh; overflow: auto;
  background: var(--zp-panel); border-radius: 16px 16px 0 0; padding: 16px;
  border: 1px solid var(--zp-border);
}
.zp-sheet-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.zp-chat-log {
  display: grid; gap: 8px; max-height: 240px; overflow: auto;
  margin: 12px 0; padding: 8px; background: #12100e; border-radius: 8px;
}
.zp-chat-item { font-size: 14px; padding: 8px; border-radius: 8px; background: #1e1b18; }
.zp-chat-item.out { border-left: 3px solid var(--zp-ok); }
.zp-chat-item.in { border-left: 3px solid var(--zp-gold); }
.zp-done-box {
  padding: 12px; border-radius: 12px; background: #182018; border: 1px solid rgba(61,139,92,.35);
}
.zp-vitrina-preview {
  padding: 12px; border-radius: 12px; margin-bottom: 18px;
  background: #1a1814; border: 1px solid var(--zp-border);
}
.zp-vitrina-preview h2 { margin-top: 0; }
.zp-vitrina-url {
  word-break: break-all; font-size: 13px; margin: 10px 0 0;
}
.zp-vitrina-url a { color: var(--zp-gold); }
.zp-appt-when { margin: 6px 0 8px; font-size: 1.05rem; color: var(--zp-cream); }
.zp-wc-row { align-items: flex-start; }
.zp-wc-meta { display: grid; gap: 4px; min-width: 0; flex: 1; }
.zp-wc-sch { font-size: 13px; }
.zp-wc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.zp-days {
  display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 12px 0;
}
.zp-day { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.zp-company-grid {
  display: grid;
  gap: 4px 12px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) {
  .zp-company-grid { grid-template-columns: 1fr; }
}
.zp-company-logo {
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--zp-border);
}
.zp-logo-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.zp-logo-preview {
  max-height: 72px;
  max-width: 220px;
  object-fit: contain;
  border-radius: 10px;
  background: #12100e;
  border: 1px solid var(--zp-border);
  padding: 6px;
}
.zp-logo-empty {
  min-width: 140px;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed var(--zp-border);
  color: var(--zp-muted);
  font-size: 0.9rem;
  background: #12100e;
}
@media (min-width: 800px) {
  .zp-sheet { align-items: center; }
  .zp-sheet-card { border-radius: 16px; }
}
.zp-mig-card { z-index: 41; }
.zp-mig-bar {
  height: 8px; border-radius: 999px; background: #2a2622; overflow: hidden; margin: 14px 0 10px;
}
.zp-mig-bar-fill {
  height: 100%; width: 8%; background: var(--zp-gold); transition: width .35s ease;
}
[data-zp-mig-detail] { font-size: 13px; min-height: 1.2em; }

/* Вход по email (auth.js) — в тонах страницы, не светлая карточка из styles.css */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 8, 6, 0.72);
  backdrop-filter: blur(8px);
}
.auth-overlay.hidden { display: none !important; }
.auth-panel {
  width: min(380px, 100%);
  background: var(--zp-panel);
  border: 1px solid var(--zp-border);
  border-radius: 16px;
  padding: 20px;
  color: var(--zp-cream);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.auth-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--zp-cream);
}
.auth-panel label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 0.875rem;
  color: var(--zp-muted);
}
.auth-panel input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--zp-border);
  background: #12100e;
  color: var(--zp-cream);
  padding: 10px 12px;
  font: inherit;
  min-height: 42px;
}
.auth-panel input::placeholder { color: #6a6258; }
.auth-panel input:focus {
  outline: none;
  border-color: rgba(232, 176, 74, 0.55);
}
.auth-panel .muted,
.auth-panel .auth-hint,
.auth-panel .auth-spam-hint { color: var(--zp-muted); }
.auth-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
/* Кнопки на zapisi — классы zp-btn из auth.js; .btn оставляем на случай старого HTML */
.auth-panel .btn,
.auth-panel .zp-btn {
  border: 1px solid var(--zp-border);
  background: #2a2622;
  color: var(--zp-cream);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  min-height: 40px;
}
.auth-panel .btn.primary,
.auth-panel .zp-btn.primary {
  background: var(--zp-red);
  border-color: transparent;
  font-weight: 600;
}
.auth-panel .zp-btn.ghost { background: transparent; }
.auth-panel .btn:disabled,
.auth-panel .zp-btn:disabled { opacity: 0.5; cursor: default; }
.auth-error { color: #f07167; font-size: 0.875rem; margin: 8px 0 0; }
.auth-hint { margin: 0 0 0.75rem; }
.auth-spam-hint { margin-top: -0.35rem; font-size: 0.875rem; }
