/* GIRLSTEL palette (бренд из чек-ин шаблона) */
:root {
  --bg: #f7f4ec;
  --bg-alt: #f0ebde;
  --accent: #8c8963;
  --accent-dark: #6d6b4d;
  --text: #58585a;
  --text-soft: #8a8a8c;
  --border: rgba(88, 88, 90, 0.18);
  --shadow: 0 4px 24px rgba(140, 137, 99, 0.10);
  --green: #5fa75f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Comfortaa", -apple-system, BlinkMacSystemFont, "Segoe UI",
               system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hero {
  text-align: center;
  padding: 36px 20px 16px;
}
.hero .flower {
  font-size: 22px;
  letter-spacing: 6px;
  margin-bottom: 10px;
}
.hero h1 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-dark);
  font-size: 28px;
}
.hero .brand-sub {
  margin-top: 4px;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.hero p {
  color: var(--text-soft);
  margin: 12px 0 0;
  font-size: 14px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px 32px;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card.next { background: var(--bg-alt); border-color: rgba(140, 137, 99, 0.2); }

.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--accent-dark);
  font-weight: 600;
}

.muted { color: var(--text-soft); font-size: 13px; margin: 0 0 14px; }
.phase-label {
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 6px;
  font-size: 14px;
}

.chess-wrap { overflow-x: auto; padding-bottom: 8px; }

.chessboard {
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 12px;
}
.chessboard th, .chessboard td {
  text-align: center;
  vertical-align: middle;
  padding: 6px 4px;
  border-radius: 4px;
}
.chessboard thead th {
  background: var(--bg-alt);
  color: var(--text-soft);
  font-weight: 500;
  min-width: 40px;
}
.chessboard thead th.weekend {
  background: #ece5d2;
  color: var(--accent-dark);
}
.chessboard thead th.today {
  background: #e6efd6;
  outline: 2px solid var(--green);
  color: var(--accent-dark);
}
.chessboard thead th .d-day {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.chessboard thead th .d-mon {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
}
.chessboard thead th .d-wd {
  font-size: 10px;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.chessboard th.r-col {
  background: var(--bg-alt);
  text-align: left;
  padding: 10px 14px;
  min-width: 120px;
  border-radius: 8px;
}
.chessboard th.r-col strong {
  font-size: 14px;
  color: var(--accent-dark);
  display: block;
}
.chessboard th.r-col .r-name {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 400;
  margin-top: 2px;
}

.cell {
  height: 38px;
  min-width: 38px;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  line-height: 1;
}
.cell.free {
  background: #f7f4ec;
  border: 1px solid #d8d2bc;
}
.cell.holding {
  background: #f4a93b;          /* контрастный янтарь */
  border: 1px solid #c9831a;
  color: #3a2706;
  font-size: 18px;
  letter-spacing: 2px;
}
.cell.paid {
  background: #4a9e4a;          /* насыщенный зелёный (занято) */
  border: 1px solid #357035;
  color: white;
}

.legend {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-soft);
}
.lg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg-box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-block;
}
.lg-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
}
.lg-box.free { background: #f7f4ec; border: 1px solid #d8d2bc; }
.lg-box.holding { background: #f4a93b; border: 1px solid #c9831a; color: #3a2706; }
.lg-box.paid { background: #4a9e4a; border: 1px solid #357035; color: white; }

.foot {
  text-align: center;
  color: var(--text-soft);
  margin: 24px 0 8px;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* ==== Месячная навигация ==== */
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.card-head h2 { margin: 0; }

.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.m-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--bg-alt);
  color: var(--accent-dark);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.15s, color 0.15s;
}
.m-arrow:hover { background: var(--accent); color: white; }
.m-label {
  padding: 6px 12px;
  font-weight: 600;
  color: var(--accent-dark);
  font-size: 14px;
  min-width: 130px;
  text-align: center;
}
.m-label.past { color: var(--text-soft); }
.m-label.future { color: var(--accent); }
.m-today {
  background: var(--green);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.5px;
}
.m-today:hover { background: #4a8a4a; }

/* ==== Blocked Store (закрыто администратором) — высокий контраст ==== */
.cell.blocked { background: #4a4a4a; border: 1px solid #2a2a2a; color: white; }
.lg-box.blocked { background: #4a4a4a; border: 1px solid #2a2a2a; color: white; }

/* ==== Админ ==== */
.hero.admin { padding: 24px 20px 8px; }
.hero.admin h1 { font-size: 22px; }
.hero.admin .flower { font-size: 22px; letter-spacing: 0; }

.admin-form .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: flex-end;
}
.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}
.admin-form label.grow { flex: 1; min-width: 180px; }
.admin-form input, .admin-form select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.admin-form input:focus, .admin-form select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-link {
  background: none;
  border: 0;
  color: var(--accent-dark);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  padding: 0;
}
.btn-link:hover { color: #a8453d; }
.btn-link.danger { color: #a8453d; font-weight: 600; }
.btn-link.danger:hover { color: #d44a3c; }

/* Cancel-booking inline form (admin таблица) */
.action-cell { white-space: nowrap; }
.cancel-details { display: inline-block; }
.cancel-details summary { list-style: none; cursor: pointer; }
.cancel-details summary::-webkit-details-marker { display: none; }
.cancel-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  margin-top: 6px;
  background: #fceae8;
  border: 1px solid #e0b8b3;
  border-radius: 8px;
  min-width: 220px;
}
.cancel-form input[type="text"] {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid #d49797;
  border-radius: 4px;
  font-size: 12px;
}
.cancel-form .check-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b3d3a;
}
.cancel-form button {
  align-self: flex-start;
  background: #d44a3c;
  color: white;
  border: 0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.cancel-form button:hover { background: #b13d31; }

/* Codes grid (admin: коды 4 Store) */
.codes-form { display: flex; flex-direction: column; gap: 14px; }
.codes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .codes-grid { grid-template-columns: 1fr; }
}
.codes-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}
.codes-form .field .muted-inline {
  color: var(--text-soft);
  font-weight: 400;
}
.codes-form input {
  font: inherit;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.1em;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--accent-dark);
  font-weight: 600;
}
.codes-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}
.exely-sync-form {
  margin-top: 12px;
  text-align: right;
}
.exely-sync-form .btn-link {
  font-size: 13px;
}
.ok-card {
  background: #e8f3e3;
  border-left: 4px solid #5fa75f;
  color: #2d5a2d;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  margin-top: 10px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.codes-form input::placeholder {
  color: var(--text-soft);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.table-wrap { overflow-x: auto; }
.bookings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}
.bookings-table th, .bookings-table td {
  text-align: left;
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
}
.bookings-table th {
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--bg-alt);
}
.bookings-table .b-row.blocked { color: var(--text-soft); }
.bookings-table .b-row.blocked td:first-child { color: var(--text); }
.bookings-table .muted-cell { color: var(--text-soft); font-style: italic; }

/* ==== Welcome / brief ==== */
.card.welcome { background: var(--bg-alt); }
.brief { padding-left: 22px; margin: 10px 0 4px; }
.brief li { padding: 4px 0; font-size: 14px; }

/* ==== Booking form ==== */
.booking-form { padding: 24px 24px 30px; }
.booking-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}
.booking-form legend {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 12px;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.booking-form .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: flex-end;
}
.booking-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.booking-form label.grow { flex: 1; min-width: 160px; }
.booking-form input[type="text"],
.booking-form input[type="email"],
.booking-form input[type="tel"],
.booking-form input[type="date"],
.booking-form input[type="number"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
.booking-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.price-preview {
  background: #ecf3e8;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  text-align: center;
  margin: 8px 0 2px;
  color: #3d6e3d;
}
.price-preview strong { color: var(--accent-dark); font-size: 22px; }
.muted-inline { color: var(--text-soft); font-size: 12px; }

.radio-block { margin: 14px 0; }
.rb-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 8px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  margin: 0 6px 6px 0;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.radio-pill input { display: none; }
.radio-pill:hover { border-color: var(--accent); }
.radio-pill:has(input:checked) {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 600;
}

.rules-details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 8px 0 16px;
}
.rules-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-dark);
  outline: none;
}
.rules-details summary:hover { color: var(--accent); }
.rules-text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.rules-text em { color: var(--text-soft); }

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 14px;
  cursor: pointer;
}
.check-line input { margin-top: 3px; flex-shrink: 0; }

.actions {
  margin-top: 26px;
  text-align: center;
}
.btn-pay {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: 0;
  padding: 16px 36px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, transform 0.05s;
  letter-spacing: 0.3px;
}
.btn-pay:hover { background: var(--accent-dark); }
.btn-pay:active { transform: scale(0.98); }
.btn-pay:disabled { background: #c5c5c5; cursor: not-allowed; }

.small { font-size: 12px; margin-top: 8px; }

.error-card {
  background: #fceae8;
  border-left: 4px solid #d44a3c;
  color: #a8453d;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 14px;
  font-size: 14px;
}

/* ==================================================== */
/* ==== Wizard (3-step mobile-first form, Phase 3.5) === */
/* ==================================================== */

body.wizard {
  margin: 0;
  background: var(--bg);
  min-height: 100vh;
  font-family: "Comfortaa", -apple-system, BlinkMacSystemFont, "Segoe UI",
               system-ui, sans-serif;
}

.wizard-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.wizard-header .brand {
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.progress { display: flex; gap: 6px; }
.progress .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s;
}
.progress .dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.block {
  display: none;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.block.active {
  display: flex;
  animation: slide-in 0.25s ease;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.block h1 {
  font-size: 22px;
  color: var(--accent-dark);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.2px;
}
.block .intro {
  color: var(--text);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

/* Entries list (block 1) */
.entries { display: flex; flex-direction: column; gap: 8px; }
.entry-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.entry-row label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.entry-date { flex: 1; }
.entry-cells { width: 70px; flex-shrink: 0; }
.entry-store { flex: 1; }
.entry-store select {
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
}
.entry-row input {
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
}
.entry-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.btn-remove {
  background: none;
  border: 0;
  width: 36px;
  height: 42px;
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
}
.btn-remove:hover { color: #a8453d; }

.btn-add {
  background: transparent;
  border: 1.5px dashed var(--border);
  color: var(--accent);
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-add:hover {
  border-color: var(--accent);
  background: var(--bg-alt);
}

.total {
  background: #ecf3e8;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  color: #3d6e3d;
  margin-top: 4px;
}
.total-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5a8a5a;
}
.total-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.1;
  margin: 2px 0;
}
.total-amount .cur {
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
}
.total-detail {
  font-size: 12px;
  color: var(--text-soft);
}

/* Form fields (block 2) */
.block label.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.block label.field input {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 16px;
}
.block label.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.block .rb-label {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.block .radio-row { display: flex; gap: 8px; }
.block .radio-row .radio-pill {
  flex: 1;
  text-align: center;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  background: white;
  transition: all 0.15s;
}
.block .radio-row .radio-pill input { display: none; }
.block .radio-row .radio-pill:has(input:checked) {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 700;
}

/* Block 3 specific (rules + checkboxes inherit existing styles) */
.block .rules-details {
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.key-points {
  padding-left: 20px;
  margin: 8px 0 4px;
  font-size: 13px;
  line-height: 1.6;
}
.key-points li { padding: 2px 0; }
.key-points strong { color: var(--accent-dark); }

/* Buttons */
.block .btn-next,
.block .btn-pay {
  font-family: inherit;
  background: var(--accent);
  color: white;
  border: 0;
  padding: 16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  margin-top: auto;
  transition: all 0.15s;
}
.block .btn-next:disabled,
.block .btn-pay:disabled {
  background: #d8d6cc;
  color: #8a8a8c;
  cursor: not-allowed;
}
.block .btn-next:not(:disabled):hover,
.block .btn-pay:not(:disabled):hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.block .btn-next:not(:disabled):active,
.block .btn-pay:not(:disabled):active {
  transform: translateY(0);
}

.btn-back {
  background: transparent;
  border: 0;
  color: var(--text-soft);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 0;
  cursor: pointer;
  align-self: flex-start;
  margin-bottom: 0;
}
.btn-back:hover { color: var(--accent); }

/* Override the existing check-line padding to be compact */
body.wizard .check-line {
  font-size: 14px;
  line-height: 1.4;
  margin: 8px 0;
}

/* ==== Success page ==== */
.thank-you .lead {
  font-size: 19px;
  color: var(--accent-dark);
  margin: 0 0 14px;
  font-weight: 600;
}
.thank-you .brief li strong { color: var(--accent-dark); }
.demo-note {
  background: #fff8e8;
  border: 1px solid #f0d480;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: #6b4d18;
  margin: 18px 0;
  line-height: 1.5;
}
