/* ==================================================================
   Nail Premium — единые стили сайта и админки
   Премиальная тема: тёплый айвори, espresso-текст, розово-золотой акцент
   Шрифты: Playfair Display (заголовки) + Manrope (текст)
   ================================================================== */

:root {
  /* Палитра TokarevaNails (GUIDE.md): Light #F4F1EE, Ink #14100F,
     акцент — Bordeaux #6E2233, блику #E8B4A5 */
  --primary-50: #fbf7f6;
  --primary-100: #f7eef0;
  --primary-200: #efd7db;
  --primary-300: #dca9b4;
  --primary-500: #a2495e;
  --primary-600: #6E2233;
  --primary-700: #4E1523;
  --gold: #E8B4A5;
  --gold-soft: #f2d5cb;
  --espresso: #14100F;
  --neutral-100: #f5f2f0;
  --neutral-200: #e8e1de;
  --neutral-500: #8b8077;
  --neutral-700: #54483f;
  --neutral-900: #201518;
  --danger: #b03a2e;
  --danger-bg: #fdecea;
  --ok-bg: #eaf7ef;
  --ok-border: #b7dfc6;
  --ok-text: #1d7a43;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow:
    0 1px 2px rgba(34, 26, 21, 0.05),
    0 12px 32px rgba(34, 26, 21, 0.09);
  --shadow-lift:
    0 2px 4px rgba(34, 26, 21, 0.06),
    0 18px 44px rgba(34, 26, 21, 0.14);
  --shadow-sm:
    0 1px 2px rgba(34, 26, 21, 0.04),
    0 6px 18px rgba(34, 26, 21, 0.06);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--neutral-900);
  background:
    radial-gradient(1200px 500px at 110% -5%, rgba(220, 174, 183, 0.26), transparent 60%),
    radial-gradient(900px 420px at -10% 20%, rgba(232, 180, 165, 0.14), transparent 55%),
    #f7f4f3;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container { width: min(1180px, 92vw); margin: 0 auto; }
.container--narrow { width: min(780px, 92vw); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.14; letter-spacing: 0.002em; }

.muted { color: var(--neutral-500); font-size: 0.95rem; }

code { background: var(--neutral-100); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.9em; }

::selection { background: var(--primary-200); color: var(--espresso); }

/* ------------------------------- Шапка ---------------------------- */

.site-header, .admin-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 243, 0.85);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(232, 225, 222, 0.9);
}
.header-inner { display: flex; align-items: center; gap: 2rem; padding: 0.75rem 0; }

/* Кнопка-гамбургер: видна только на мобильных */
.nav-toggle {
  display: none; margin-left: auto;
  width: 2.7rem; height: 2.7rem; padding: 0;
  border-radius: 12px; border: 1px solid var(--primary-200); background: #fff;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.nav-toggle:hover { border-color: var(--primary-600); background: var(--primary-50); }
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--espresso);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.logo {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  letter-spacing: 0.03em; color: var(--espresso); text-decoration: none; white-space: nowrap;
}
.logo img { height: 40px; width: auto; display: block; }
.logo::first-letter { color: var(--primary-600); }
.nav { display: flex; gap: 1.5rem; flex: 1; flex-wrap: wrap; }
.nav a {
  color: var(--neutral-700); text-decoration: none; font-weight: 500; font-size: 0.94rem;
  position: relative; padding: 0.3rem 0; transition: color 0.15s ease;
}
.nav a:hover { color: var(--primary-600); }
.nav a.active { color: var(--espresso); font-weight: 700; }
.nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; background: linear-gradient(90deg, var(--gold), var(--primary-500));
  border-radius: 2px;
}
.header-phone { white-space: nowrap; font-weight: 600; }
.pill {
  display: inline-block; margin-left: 0.4rem; padding: 0 0.5rem;
  font-size: 0.72rem; font-weight: 700; border-radius: 999px;
  background: var(--primary-100); color: var(--primary-700);
  border: 1px solid var(--primary-200);
}

/* ------------------------------ Кнопки ---------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 650; font-size: 0.97rem; letter-spacing: 0.01em;
  cursor: pointer; text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease,
    border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--espresso) 0%, #3a1424 55%, #6E2233 100%);
  color: #F4F1EE;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 24px rgba(78, 21, 35, 0.30);
}
.btn--primary:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 14px 30px rgba(78, 21, 35, 0.36);
}
.btn--gold {
  background: linear-gradient(135deg, #f0d3c6, var(--gold) 60%, #d19a8b);
  color: #FFF9F6;
  box-shadow: 0 10px 24px rgba(232, 180, 165, 0.42);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--espresso);
  border-color: var(--neutral-200);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--gold-soft); color: var(--primary-700); box-shadow: var(--shadow-sm); }
.btn--danger { background: var(--danger-bg); color: var(--danger); border-color: #f0c4bd; }
.btn--danger:hover { background: #fadfda; }
.btn--lg { padding: 1.05rem 2.2rem; font-size: 1.04rem; }
.btn--sm { padding: 0.45rem 1rem; font-size: 0.84rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ------------------------------ Секции ---------------------------- */

.section { padding: 5rem 0; }
.section--alt {
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(221, 191, 173, 0.16), transparent 60%),
    var(--primary-50);
  border-top: 1px solid rgba(233, 225, 217, 0.7);
  border-bottom: 1px solid rgba(233, 225, 217, 0.7);
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.74rem;
  font-weight: 700; color: var(--gold); margin-bottom: 0.9rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--gold-soft); }
.section-title { font-size: clamp(1.95rem, 4vw, 2.9rem); margin-bottom: 0.9rem; color: var(--espresso); }
.section-sub { color: var(--neutral-500); max-width: 620px; margin-bottom: 2.6rem; }

.card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(233, 225, 217, 0.9);
  padding: 1.7rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: var(--shadow); }

/* -------------------------------- Герой --------------------------- */

.hero { padding: 4.5rem 0 5.5rem; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% 30% auto -30%; height: 130%;
  background: radial-gradient(closest-side, rgba(220, 174, 183, 0.35), transparent);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.12fr 0.88fr; align-items: center; gap: 3.5rem; position: relative; }
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.15rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.75); border: 1px solid var(--primary-200);
  box-shadow: var(--shadow-sm);
  color: var(--primary-700); font-weight: 600; font-size: 0.88rem; margin-bottom: 1.6rem;
  backdrop-filter: blur(8px);
}
.hero-title { font-size: clamp(2.7rem, 6.2vw, 4.6rem); margin-bottom: 1.3rem; color: var(--espresso); }
.grad {
  background: linear-gradient(115deg, var(--primary-700) 0%, var(--primary-500) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic;
}
.hero-sub { color: var(--neutral-700); font-size: 1.12rem; max-width: 540px; margin-bottom: 2.1rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero-stats { display: flex; gap: 2.8rem; flex-wrap: wrap; border-top: 1px solid rgba(233, 225, 217, 0.8); padding-top: 1.5rem; }
.stat dt {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--espresso);
  display: flex; align-items: baseline; gap: 0.18rem;
}
.stat dt::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-bottom: 0.35rem; display: inline-block; }
.stat dd { color: var(--neutral-500); font-size: 0.88rem; letter-spacing: 0.02em; }
.hero-art { position: relative; }
.hero-art img {
  border-radius: 26px;
  border: 10px solid #fff;
  box-shadow: var(--shadow-lift);
}
.hero-art::after {
  content: ''; position: absolute; inset: 10px; border-radius: 18px;
  border: 1px solid rgba(205, 176, 139, 0.55); pointer-events: none;
}

/* --------------------------- Форма записи ------------------------- */

.booking-form { padding: 2.2rem; display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.45rem; }
/* Финансовый мониторинг (админка) */
.fin-period { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.3rem; }
.fin-period a {
  padding: 0.45rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--primary-200); background: #fff;
  font-size: 0.9rem; font-weight: 600; color: var(--primary-700);
  text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease;
}
.fin-period a:hover { border-color: var(--primary-600); background: var(--primary-50); }
.fin-period a.active { background: var(--primary-700); border-color: var(--primary-700); color: #fff; }

.fin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.fin-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  background: #fff; border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm); padding: 1rem 1.15rem;
}
.fin-card--main { background: var(--primary-700); border-color: var(--primary-700); color: #fff; }
.fin-card--main .fin-label { color: var(--primary-100); }
.fin-card--planned { border-style: dashed; }
.fin-card--warn { border-color: #c0392b; background: #fdf3f2; }
.fin-card .fin-label { font-size: 0.84rem; color: var(--neutral-500); }
.fin-card .fin-num { font-size: 1.55rem; font-weight: 750; letter-spacing: -0.02em; }
.fin-card .fin-sub { font-size: 0.8rem; color: var(--neutral-500); }
.fin-card--warn .fin-sub { color: #c0392b; }

.fin-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.fin-two .card { margin-bottom: 0; }
.fin-row {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.55rem 0; border-bottom: 1px dashed var(--neutral-200);
}
.fin-row:last-child { border-bottom: 0; }
.fin-row .fin-name { flex: 0 0 auto; max-width: 45%; font-weight: 650; font-size: 0.93rem; }
.fin-row .fin-share { flex: 1 1 auto; height: 8px; background: var(--neutral-100); border-radius: 999px; overflow: hidden; }
.fin-row .fin-share-bar { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary-600), var(--gold)); }
.fin-row .fin-cnt { flex: 0 0 auto; font-size: 0.82rem; color: var(--neutral-500); white-space: nowrap; }
.fin-row .fin-sum { flex: 0 0 auto; font-weight: 700; font-size: 0.93rem; white-space: nowrap; }
.fin-row-sub { margin: -0.35rem 0 0.45rem; font-size: 0.78rem; color: var(--neutral-400); }
.fin-row + .fin-row-sub + .fin-row { border-top: 0; }

.fin-bars { display: flex; align-items: stretch; gap: 5px; height: 150px; padding-top: 0.4rem; }
.fin-bars .fin-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.3rem; min-width: 0; }
.fin-bars .fin-col-v { font-size: 0.62rem; color: var(--neutral-500); font-weight: 650; white-space: nowrap; }
.fin-bars .bar { width: 100%; background: linear-gradient(180deg, var(--primary-600), var(--primary-700)); border-radius: 6px 6px 2px 2px; min-height: 3px; transition: height 0.25s ease; }
.fin-bars .fin-col:nth-child(odd) .bar { opacity: 0.85; }
.fin-bars em { font-style: normal; font-size: 0.66rem; color: var(--neutral-400); }

/* Журнал бота (админка) */
.botlog { list-style: none; display: grid; gap: 0.4rem; margin: 0 0 0.6rem; font-size: 0.88rem; }
.botlog li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.4rem 0.6rem; border-radius: 10px; background: var(--neutral-100); }
.botlog li[data-type="conflict"] { background: #fdf3f2; border: 1px solid #ef9a9a; }
.botlog .botlog-time { color: var(--neutral-400); font-size: 0.78rem; flex: 0 0 auto; }
.botlog .botlog-type { font-weight: 700; font-size: 0.78rem; color: var(--primary-700); flex: 0 0 auto; }
.botlog li[data-type="conflict"] .botlog-type { color: #c0392b; }
.botlog .botlog-msg { font-size: 0.85rem; min-width: 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

/* Режим работы по дням (админка) */
.hours-grid { display: grid; gap: 0.35rem; }
.hours-row {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.4rem 0.6rem; border-radius: 10px;
  border: 1px solid var(--neutral-200); background: #fff;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.hours-row.is-off { opacity: 0.55; background: var(--neutral-100); }
.hours-day { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: 0.92rem; min-width: 9.5rem; }
.hours-day input { accent-color: var(--primary-600); }
.hours-row .time { width: auto; padding: 0.35rem 0.5rem; font-size: 0.92rem; }
.hours-row .dash { color: var(--neutral-400); }
.field label, .field .label { font-weight: 650; font-size: 0.93rem; letter-spacing: 0.01em; }
.optional { color: var(--neutral-500); font-weight: 400; font-size: 0.85rem; }
.hint { color: var(--neutral-500); font-size: 0.82rem; }

/* Поле даты + календарь */
.field-date { position: relative; }
.date-display {
  font: inherit; color: var(--espresso);
  width: 100%; text-align: left; padding: 0.8rem 1rem;
  border: 1px solid var(--neutral-200); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; display: inline-block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.date-display::after { content: ' 📅'; }
.date-display:hover, .date-display[aria-expanded="true"] {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(205, 176, 139, 0.18);
}
.date-display.has-value { font-weight: 650; }
.date-display.shake { animation: shake 0.4s ease; border-color: var(--danger); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.calendar-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  width: 300px; max-width: 92vw;
  background: #fff; border: 1px solid rgba(233, 225, 217, 0.9);
  border-radius: 18px; box-shadow: var(--shadow-lift); padding: 1rem;
  animation: calIn 0.18s ease;
}
@keyframes calIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; }
.cal-title { font-weight: 700; font-size: 0.95rem; color: var(--espresso); }
.cal-nav {
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--neutral-200); background: #fff;
  font-size: 1.05rem; cursor: pointer; font: inherit; line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cal-nav:hover:not(:disabled) { border-color: var(--gold-soft); background: var(--primary-50); }
.cal-nav:disabled { opacity: 0.32; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow {
  font-size: 0.66rem; font-weight: 700; color: var(--neutral-500);
  text-align: center; padding: 0.25rem 0; text-transform: uppercase; letter-spacing: 0.08em;
}
.cal-day {
  height: 35px; border: none; background: transparent; border-radius: 10px;
  font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer;
  transition: background 0.12s ease;
}
.cal-day:hover:not(:disabled) { background: var(--primary-100); }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--gold-soft); }
.cal-day.is-selected { background: var(--espresso); color: #fdf9f4; box-shadow: none; }
.cal-day:disabled { color: #cbc0b6; background: transparent; cursor: not-allowed; }
.cal-day.is-dayoff:disabled { text-decoration: line-through; background: var(--danger-bg); color: #d9a49b; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: flex-start; align-content: flex-start; }
.chip {
  display: inline-flex; align-items: center; align-self: flex-start;
  padding: 0.32rem 0.8rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  line-height: 1.3; white-space: nowrap;
  background: var(--danger-bg); color: var(--danger); border: 1px solid #f0c4bd;
}

input, select, textarea {
  font: inherit; color: var(--espresso);
  padding: 0.8rem 1rem; border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm); background: #fff; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(232, 180, 165, 0.45);
}
textarea { resize: vertical; }

.field-error { color: var(--danger); font-size: 0.85rem; font-weight: 600; }

/* Слоты времени */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 0.5rem; }
.slot {
  padding: 0.58rem 0.4rem; border-radius: 999px; border: 1.5px solid var(--neutral-200);
  background: #fff; font: inherit; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: all 0.13s ease;
}
.slot:hover:not(:disabled) { border-color: var(--gold-soft); box-shadow: 0 3px 10px rgba(176, 141, 87, 0.16); }
.slot.is-selected {
  background: linear-gradient(135deg, var(--espresso), #4a1826);
  border-color: var(--espresso); color: #fdf9f4;
  box-shadow: 0 6px 16px rgba(34, 26, 21, 0.3);
}
.slot:disabled { background: var(--neutral-100); color: #c9bcb2; cursor: not-allowed; text-decoration: line-through; }
.slots-empty { grid-column: 1 / -1; color: var(--neutral-500); font-size: 0.92rem; padding: 0.4rem 0; }

.form-status { display: grid; gap: 0.4rem; }
.form-status__box { padding: 1.05rem 1.25rem; border-radius: var(--radius-sm); font-weight: 500; line-height: 1.55; }
.form-status__box--ok { background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); }
.form-status__box--err { background: var(--danger-bg); border: 1px solid #f0c4bd; color: var(--danger); }
.consent { color: var(--neutral-500); font-size: 0.8rem; text-align: center; }

/* ---------------------------- Портфолио --------------------------- */

.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.portfolio-item {
  position: relative; border: none; padding: 0; border-radius: var(--radius-sm);
  overflow: hidden; cursor: zoom-in; background: none; font: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.portfolio-item:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.portfolio-item img { width: 100%; height: 178px; object-fit: cover; display: block; transition: transform 0.4s ease; }
.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-item::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius-sm);
  pointer-events: none; opacity: 0; transition: opacity 0.25s ease;
}
.portfolio-item:hover::after { opacity: 1; }
.portfolio-caption {
  position: absolute; inset: auto 0 0 0; padding: 0.85rem 0.95rem 0.8rem;
  background: linear-gradient(transparent, rgba(20, 16, 15, 0.82));
  color: #fff; text-align: left; display: grid;
}
.portfolio-caption strong { font-family: var(--font-display); font-size: 0.98rem; letter-spacing: 0.01em; }
.portfolio-caption span { font-size: 0.75rem; opacity: 0.85; }

.lightbox {
  border: none; border-radius: var(--radius-sm); padding: 0; overflow: hidden;
  max-width: min(920px, 94vw);
  background: #fffdfa; box-shadow: var(--shadow-lift);
}
.lightbox::backdrop { background: rgba(24, 16, 14, 0.72); backdrop-filter: blur(3px); }
/* сброс '* { margin:0 }' ломает центрирование модального <dialog> */
.lightbox[open] { position: fixed; inset: 0; margin: auto; }
.lightbox img {
  display: block; width: auto;
  max-width: 100%; max-height: 78vh;
  object-fit: contain; margin: 0 auto;
  background: #f7f4f3;
}
.lightbox p { padding: 0.9rem 1.2rem; font-family: var(--font-display); font-size: 1.06rem; }
.lightbox-close {
  position: absolute; top: 0.6rem; right: 0.8rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border-radius: 999px; border: none;
  background: rgba(20, 16, 15, 0.82); color: #F4F1EE;
  font-size: 1.25rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.lightbox-close:hover { background: rgba(110, 34, 51, 0.92); }
/* запасной режим для старых браузеров без <dialog>.showModal() (например, Safari до 15.4) */
.lightbox[open].lightbox--polyfill {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 999; margin: 0;
}
body.lightbox-lock { overflow: hidden; }

/* ------------------------------ О студии -------------------------- */

.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2.6rem; align-items: start; }
.about-text {
  font-size: 1.08rem; color: var(--neutral-700);
  border-left: 2px solid var(--gold-soft); padding-left: 1.5rem;
}
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.feature-card {
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(233, 225, 217, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.4rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-card h3 { font-size: 1.12rem; margin-bottom: 0.5rem; color: var(--espresso); }
.feature-card p { color: var(--neutral-500); font-size: 0.92rem; }

/* ------------------------------ Отзывы ---------------------------- */

.reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.review-card {
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(233, 225, 217, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.7rem; display: grid; gap: 0.85rem; align-content: start;
  position: relative;
}
.review-card::before {
  content: '“'; position: absolute; top: 0.4rem; right: 1.2rem;
  font-family: var(--font-display); font-size: 3.4rem; line-height: 1;
  color: var(--primary-200);
}
.review-stars { color: var(--gold); letter-spacing: 0.18em; font-size: 0.95rem; }
.review-text { color: var(--neutral-700); }
.review-card footer { display: grid; }
.review-card footer span { color: var(--neutral-500); font-size: 0.85rem; }

/* -------------------------------- FAQ ----------------------------- */

.faq-list { display: grid; gap: 0.85rem; }
.faq-item {
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(233, 225, 217, 0.9);
  border-radius: var(--radius-sm);
  padding: 1.05rem 1.35rem; box-shadow: var(--shadow-sm);
}
.faq-item summary {
  font-weight: 650; cursor: pointer; list-style: none; position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 0.4rem; top: 0;
  color: var(--gold); font-weight: 700; transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item p { color: var(--neutral-500); margin-top: 0.6rem; }

/* ----------------------------- Контакты --------------------------- */

.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.4rem; align-items: stretch; }
.contact-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.contact-list { list-style: none; display: grid; gap: 0.65rem; margin-bottom: 1.4rem; }
.contact-list a { color: var(--primary-700); text-decoration: none; font-weight: 650; }
.contact-list a:hover { color: var(--gold); }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1.4rem; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 1rem;
  border-radius: 999px; font-weight: 650; font-size: 0.9rem;
  color: var(--primary-700); text-decoration: none;
  background: #fff; border: 1px solid var(--primary-200);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.contact-links a:hover { border-color: var(--primary-600); background: var(--primary-100); transform: translateY(-1px); }
.msg-ic { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; display: block; }
.contact-map {
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(220, 174, 183, 0.25), transparent 70%),
    var(--primary-50);
  color: var(--neutral-500); min-height: 240px;
  border-radius: var(--radius-sm);
}
.contact-map:has(iframe) { padding: 0; }
.contact-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; border-radius: inherit; }

/* ------------------------------ Футер ----------------------------- */

.site-footer {
  border-top: 1px solid rgba(233, 225, 217, 0.9);
  background: linear-gradient(170deg, var(--espresso), #18090f 70%, #35121e);
  color: rgba(253, 249, 244, 0.85);
  padding: 2.2rem 0;
}
.site-footer .logo { color: #F4F1EE; }
.site-footer a, .site-footer .muted, .footer-inner a { color: rgba(253, 249, 244, 0.62); }
.site-footer .footer-inner nav a:hover, .site-footer a:hover { color: var(--gold-soft); }
.footer-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 1.3rem; margin-right: auto; }
.footer-inner a { text-decoration: none; font-size: 0.92rem; transition: color 0.15s ease; }

/* ==================================================================
   АДМИНКА
   ================================================================== */

.admin-body { background: #fbf9f6; }
.admin-main { padding: 2.6rem 0 4rem; min-height: 60vh; }
.admin-main h1 { font-size: 2rem; margin-bottom: 0.6rem; color: var(--espresso); }
.admin-disabled .card { box-shadow: var(--shadow); }

.inline-form { display: inline-flex; gap: 0.6rem; align-items: center; }
.days-form input { width: 180px; }

.flash {
  padding: 0.95rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.flash--ok { background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); }
.flash--err { background: var(--danger-bg); border: 1px solid #f0c4bd; color: var(--danger); }

.booking-list { display: grid; gap: 1.1rem; margin: 1.6rem 0 2rem; }

.booking-card-admin { display: grid; gap: 1rem; }
.booking-card--archived { opacity: 0.82; }
.booking-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.booking-head h2 { font-size: 1.3rem; }
.phone-link { color: var(--primary-700); font-weight: 700; text-decoration: none; font-size: 1.06rem; }
.phone-link:hover { text-decoration: underline; }
.booking-when { text-align: right; display: grid; }
.booking-when strong { color: var(--primary-700); font-size: 1.02rem; }
.booking-when span { color: var(--neutral-500); }

.booking-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1.1rem;
}
.booking-meta div { display: grid; }
.booking-meta dt { font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--neutral-500); font-weight: 700; }
.booking-meta dd { font-weight: 500; }

.booking-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.edit-block { border-top: 1px dashed var(--neutral-200); padding-top: 0.85rem; }
.edit-block summary {
  cursor: pointer; font-weight: 700; color: var(--primary-700);
  width: fit-content; list-style: none; padding: 0.2rem 0;
}
.edit-block summary::-webkit-details-marker { display: none; }
.edit-form { display: grid; gap: 0.95rem; margin-top: 1rem; }
.edit-form input[type="date"] { width: 100%; }

.empty-state { text-align: center; padding: 2.6rem 1rem; }

.new-service-card { margin-top: 1.6rem; }
.new-service-card h2 { font-size: 1.3rem; margin-bottom: 1rem; }

.days-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; margin-top: 1.6rem; }
.day-off-card { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; }

/* Галерея «Мои работы» (вкладка «Работы») */
.work-upload-card { margin-bottom: 1.6rem; }
.work-upload-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.works-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem; margin-top: 1.6rem;
}
.work-card { display: grid; gap: 0.8rem; align-content: start; }
.work-thumb {
  width: 100%; height: 130px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--neutral-200);
  display: block;
}
.work-form input[type="text"] { margin-bottom: 0.5rem; }
.work-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* Уведомления (вкладка «Уведомления») */
.notify-card { margin-bottom: 1.4rem; }
.notify-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.notify-card .field-row { margin-bottom: 0.4rem; }
.notify-card input[readonly] { font-size: 0.86rem; color: var(--neutral-500); cursor: text; }

.tg-last {
  margin-top: 1rem; padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm); font-size: 0.9rem;
  background: var(--neutral-100); border: 1px solid var(--neutral-200);
}
.tg-last .tg-ok { color: var(--ok-text); }
.tg-last .tg-err { color: var(--danger); margin-right: 0.4rem; }
.tg-last .tg-detail { color: var(--neutral-700); word-break: break-word; }

/* --------------------------- Адаптив ------------------------------ */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-art { margin: 0 auto; max-width: 350px; }
  .about-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .booking-actions form { margin-right: 0.6rem; }
}

@media (max-width: 720px) {
  .header-inner { gap: 1rem; }
  /* меню превращается в выпадающую панель по кнопке-гамбургеру */
  .site-header .nav, .admin-header .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 0.15rem; overflow-x: visible;
    background: rgba(247, 244, 243, 0.97);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid rgba(232, 225, 222, 0.9);
    box-shadow: var(--shadow);
    padding: 0.55rem 1rem 1rem;
  }
  .site-header .nav.open, .admin-header .nav.open { display: flex; }
  .site-header .nav a, .admin-header .nav a {
    flex: initial; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 1rem;
  }
  .site-header .nav a:hover, .admin-header .nav a:hover { background: #fff; }
  /* сама кнопка-гамбургер */
  .nav-toggle { display: inline-flex; }
  .hours-row { flex-wrap: wrap; }
  .hours-day { min-width: 0; width: 100%; }
  .fin-two { grid-template-columns: 1fr; }
  .fin-row .fin-name { max-width: 42%; }
  .fin-bars .bar { min-width: 12px; }
  .field-row { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-item img { height: 140px; }
  .about-features { grid-template-columns: 1fr; }
  .booking-form { padding: 1.4rem; }
  .booking-when { text-align: left; }
  .section { padding: 3.4rem 0; }
  .hero { padding: 2.6rem 0 3.4rem; }
  .hero-text { text-align: center; }
  .hero-actions .btn { width: 100%; }
  .hero-actions { justify-content: center; }
  /* три показателя — в одну строку */
  .hero-stats { display: flex; flex-wrap: nowrap; gap: 0.55rem; justify-content: space-between; align-items: flex-start; padding-top: 1.2rem; }
  .hero-stats .stat { flex: 1 1 0; min-width: 0; text-align: center; }
  .hero-stats .stat dt { font-size: 1.5rem; justify-content: center; }
  .hero-stats .stat dd { font-size: 0.68rem; line-height: 1.35; }
  .calendar-pop { left: 50%; transform: translateX(-50%); }
  .cal-head { justify-content: space-between; }
}

/* ============ Мобильная адаптация (фронт + админка) ============ */

@media (max-width: 720px) {
  /* iOS не зумит поля при фокусе, если шрифт ≥ 16px */
  input, select, textarea { font-size: 16px; }
  .btn { padding: 0.75rem 1.2rem; }

  /* админка: хедер, заголовки, карточки */
  .header-inner { flex-wrap: wrap; gap: 0.6rem 1rem; padding: 0.6rem 0; }
  .admin-header .btn { padding: 0.5rem 0.9rem; }
  h1 { font-size: 1.5rem; }
  .card { padding: 1rem; margin-bottom: 1.1rem; }
  .container { padding: 0 1rem; }
  .booking-meta { grid-template-columns: 1fr 1fr; }
  .edit-form .field-row { gap: 0.7rem; }
  .works-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .work-thumb { height: 110px; }
  .work-actions .btn { padding: 0.45rem 0.7rem; }
  .days-grid { grid-template-columns: 1fr; }
  .notify-card input[readonly] { font-size: 12px; }
  .inline-form { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .works-grid { grid-template-columns: 1fr; }
  .work-thumb { height: 150px; }
  .booking-meta { grid-template-columns: 1fr; }
}
