:root {
  --paper: #f7f5ef;
  --paper-deep: #eeece4;
  --white: #fffefa;
  --sage: #dfe7dc;
  --sage-soft: #edf1e9;
  --sage-dark: #5f705d;
  --ink: #28302b;
  --muted: #717a73;
  --line: #dfe1d9;
  --rose: #eee0d7;
  --lavender: #e8e1ec;
  --danger: #9d433a;
  --success: #4e744c;
  --shadow: 0 24px 70px rgba(44, 55, 47, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(91, 113, 88, 0.35);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand > span:last-child,
.brand strong,
.brand small { display: block; }

.brand strong {
  font: 600 20px/1 var(--serif);
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #7c8a79;
  border-radius: 50%;
  color: var(--sage-dark);
  font: italic 600 24px/1 var(--serif);
}

.brand-light { color: white; }
.brand-light small { color: #aeb9b0; }
.brand-light .brand-mark { border-color: #91a090; color: #d8e2d5; }

.eyebrow {
  margin: 0 0 13px;
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 12px 21px;
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: 0.58; transform: none; }
.button-primary { background: #647461; color: white; }
.button-primary:hover { background: #536550; }
.button-secondary { border: 1px solid #cfd4cc; background: var(--white); color: #536253; }
.button-wide { width: 100%; }

.public-header {
  display: flex;
  max-width: 1180px;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  margin: auto;
  padding: 20px 28px;
}

.admin-link {
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.hero {
  display: grid;
  max-width: 1180px;
  min-height: 550px;
  grid-template-columns: 54% 46%;
  margin: auto;
  overflow: hidden;
  background: #e3e8df;
}

.hero-copy { align-self: center; padding: 76px 30px 76px 74px; }
.hero h1 {
  max-width: 630px;
  margin: 0 0 25px;
  font: 500 clamp(44px, 5vw, 64px)/0.98 var(--serif);
  letter-spacing: -0.025em;
}
.hero h1 em { color: #647461; font-weight: 500; }
.hero-lead {
  max-width: 525px;
  margin: 0 0 33px;
  color: #69736b;
  font-size: 14px;
  line-height: 1.8;
}

.hero-art { position: relative; min-height: 550px; overflow: hidden; }
.art-arch {
  position: absolute;
  right: 35px;
  bottom: 0;
  width: 360px;
  height: 475px;
  border-radius: 190px 190px 0 0;
  background: linear-gradient(150deg, #ccd6c7, #eef0e9 62%, #d6ddd2);
  box-shadow: inset 0 0 80px rgba(255,255,255,.44);
}
.art-sun {
  position: absolute;
  top: 45px;
  right: 10px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(250, 241, 224, 0.72);
  filter: blur(1px);
}
.art-bottle {
  position: absolute;
  bottom: 64px;
  z-index: 2;
  border-radius: 9px 9px 22px 22px;
  background: linear-gradient(90deg, #84917d, #bac3b4 45%, #788573);
  box-shadow: 0 26px 35px rgba(44, 55, 47, 0.22), inset 9px 0 17px rgba(255,255,255,.2);
}
.art-bottle i {
  position: absolute;
  left: 50%;
  top: -25px;
  width: 56%;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 5px 5px 2px 2px;
  background: #5e6e5b;
}
.art-bottle-tall { right: 215px; width: 104px; height: 230px; }
.art-bottle-low { right: 76px; width: 135px; height: 170px; background: linear-gradient(90deg, #d0bfae, #efe3d8 50%, #bba897); }
.art-bottle-low i { background: #978675; }
.art-leaf { position: absolute; z-index: 3; top: 100px; right: 285px; width: 120px; height: 180px; transform: rotate(-20deg); border-left: 2px solid #7d9179; }
.art-leaf span { position: absolute; width: 55px; height: 24px; border-radius: 80% 0 80% 0; background: #8ca087; }
.art-leaf span:nth-child(1) { left: -52px; top: 28px; transform: rotate(18deg); }
.art-leaf span:nth-child(2) { left: 0; top: 70px; transform: scaleX(-1) rotate(18deg); }
.art-leaf span:nth-child(3) { left: -50px; top: 112px; transform: rotate(18deg); }

.benefits {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(3, 1fr);
  margin: auto;
  border: 1px solid var(--line);
  background: var(--white);
}
.benefits span {
  padding: 24px 28px;
  border-right: 1px solid var(--line);
  color: #69736b;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.benefits span:last-child { border-right: 0; }

.booking-section {
  display: grid;
  max-width: 1060px;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 74px;
  margin: 110px auto;
  padding: 0 28px;
}

.booking-intro { padding-top: 15px; }
.booking-intro h2,
.success-card h2,
.calm-section h2 {
  margin: 0 0 16px;
  font: 600 40px/1.06 var(--serif);
}
.booking-intro > p:not(.eyebrow) { margin: 0 0 35px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.booking-note { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.booking-note span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--sage); color: var(--sage-dark); font-size: 9px; font-weight: 800; }
.booking-note p { margin: 0; color: #68716a; font-size: 11px; }

.booking-card {
  min-height: 520px;
  border: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.88);
  padding: 38px;
  box-shadow: 0 12px 50px rgba(47, 58, 50, 0.05);
}

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 23px; }
.service-option {
  position: relative;
  display: grid;
  min-height: 92px;
  grid-template-columns: 21px 1fr;
  gap: 10px;
  align-items: center;
  padding: 15px;
  border: 2px solid transparent;
  background: var(--sage);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}
.service-option:nth-child(4n+2) { background: var(--rose); }
.service-option:nth-child(4n+3) { background: var(--lavender); }
.service-option:nth-child(4n+4) { background: #e7e8d9; }
.service-option:hover { transform: translateY(-1px); }
.service-option:has(input:checked) { border-color: #657762; }
.service-option input { width: 16px; height: 16px; margin: 0; accent-color: #5e735a; }
.service-option strong { display: block; font: 600 17px/1.1 var(--serif); }
.service-option small { display: block; margin-top: 7px; color: #6d746e; font-size: 9px; }
.loading-card { grid-column: 1/-1; padding: 28px; background: var(--sage-soft); color: var(--muted); font-size: 12px; text-align: center; }

.booking-card label,
.login-card label,
.service-dialog label {
  display: block;
  margin: 15px 0;
  font-size: 11px;
  font-weight: 800;
}
.optional { color: var(--muted); font-weight: 500; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #d4d8d0;
  border-radius: 3px;
  background: white;
  padding: 13px 14px;
  color: var(--ink);
  outline: 0;
}
input:focus, select:focus, textarea:focus { border-color: #72816f; box-shadow: 0 0 0 3px rgba(103, 123, 99, .12); }
textarea { min-height: 84px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.consent { display: grid !important; grid-template-columns: 17px 1fr; gap: 9px; align-items: start; color: var(--muted); font-weight: 500 !important; line-height: 1.5; }
.consent input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: #61745e; }
.consent a { color: #526650; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-message { margin: 12px 0; border-radius: 4px; padding: 11px 13px; font-size: 11px; line-height: 1.5; }
.error-message { background: #f7e7e4; color: var(--danger); }
.form-footnote { margin: 12px 0 0; color: #8b918c; text-align: center; font-size: 9px; }

.success-card { min-height: 480px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 30px; }
.success-icon { display: grid; width: 62px; height: 62px; place-items: center; margin-bottom: 27px; border-radius: 50%; background: var(--sage); color: var(--success); font-size: 28px; }
.success-card > p:not(.eyebrow) { max-width: 470px; margin: 0 0 28px; color: var(--muted); line-height: 1.7; }

.calm-section { max-width: 1180px; margin: 0 auto 100px; padding: 75px 28px; background: #ede6dd; text-align: center; }
.calm-section h2 { font-size: 46px; }
.calm-section > p:last-child { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 12px; line-height: 1.8; }
.public-footer { display: grid; grid-template-columns: 1fr auto auto; gap: 40px; align-items: center; padding: 44px max(28px, calc((100vw - 1124px) / 2)); background: #29342d; color: white; }
.public-footer p, .public-footer > a { color: #aeb6ae; font-size: 10px; line-height: 1.6; }

.legal-page { min-height: 100vh; padding-bottom: 80px; }
.legal-card { max-width: 850px; margin: 35px auto; border: 1px solid var(--line); background: var(--white); padding: 65px 75px; box-shadow: var(--shadow); }
.legal-card h1 { margin: 0; font: 600 45px/1 var(--serif); }
.legal-card h2 { margin: 36px 0 8px; font: 600 22px/1.2 var(--serif); }
.legal-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.legal-updated { margin-bottom: 40px; }
.legal-note { margin-top: 45px; border-left: 3px solid #b8c4b5; background: var(--sage-soft); padding: 17px 20px; color: #586358 !important; }

/* Admin */
.admin-page { min-height: 100vh; background: #f2f0ea; }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 25px; background: radial-gradient(circle at 75% 20%, #dce5d8 0, transparent 32%), #f2f0ea; }
.login-card { width: min(440px, 100%); border: 1px solid var(--line); background: var(--white); padding: 50px; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 55px; }
.login-card h1 { margin: 0 0 11px; font: 600 39px/1 var(--serif); }
.login-card > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-back { display: block; margin-top: 23px; color: var(--muted); text-align: center; font-size: 10px; text-decoration: none; }

.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 245px 1fr; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; background: #29342d; color: #d9e0d9; padding: 29px 21px; }
.sidebar .brand { margin: 0 8px 47px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav button {
  display: grid;
  width: 100%;
  grid-template-columns: 26px 1fr;
  align-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 12px 13px;
  color: #aeb7b0;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
}
.sidebar nav button span { color: #879489; font-size: 17px; }
.sidebar nav button:hover, .sidebar nav button.active { background: #3b493f; color: white; }
.sidebar-bottom { display: grid; gap: 7px; margin-top: auto; border-top: 1px solid #435047; padding: 20px 6px 0; }
.sidebar-bottom a, .sidebar-bottom button { border: 0; background: transparent; padding: 7px; color: #aeb7b0; cursor: pointer; text-align: left; font-size: 10px; text-decoration: none; }

.admin-main { min-width: 0; padding: 42px 52px 80px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.admin-header h1 { margin: 0; font: 600 36px/1 var(--serif); }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.notice { position: fixed; z-index: 20; top: 24px; right: 25px; margin: 0; border-radius: 5px; background: #304138; padding: 13px 18px; color: white; box-shadow: var(--shadow); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stats-grid article { position: relative; min-height: 145px; border: 1px solid var(--line); background: var(--white); padding: 22px; }
.stats-grid article::after { position: absolute; top: 18px; right: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--sage); content: ""; }
.stats-grid article > span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.stats-grid strong { display: block; margin-top: 20px; font: 600 35px/1 var(--serif); }
.stats-grid small { color: var(--muted); font-size: 9px; }
.panel { border: 1px solid var(--line); background: var(--white); }
.panel-title, .section-actions { display: flex; align-items: center; justify-content: space-between; padding: 25px 28px; border-bottom: 1px solid var(--line); }
.panel-title h2, .section-actions h2, .reminder-hero h2 { margin: 0; font: 600 27px/1 var(--serif); }
.text-button { border: 0; background: transparent; color: var(--sage-dark); cursor: pointer; font-size: 10px; font-weight: 800; }

.appointment-list:empty::after, .client-list:empty::after, .admin-services:empty::after { display: block; padding: 50px; color: var(--muted); content: "Пока нет данных"; text-align: center; font-size: 11px; }
.appointment-row {
  display: grid;
  grid-template-columns: 86px minmax(140px, 1.1fr) minmax(160px, 1.4fr) 125px auto;
  gap: 15px;
  align-items: center;
  min-height: 76px;
  padding: 13px 28px;
  border-bottom: 1px solid #ecece6;
}
.appointment-row:last-child { border-bottom: 0; }
.appointment-time strong, .appointment-person strong, .appointment-service strong { display: block; font-size: 11px; }
.appointment-time small, .appointment-person small, .appointment-service small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.status-select { margin: 0; padding: 8px; border-radius: 20px; background: var(--sage-soft); font-size: 9px; }
.whatsapp-button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #b9cbb7; border-radius: 4px; background: #eff7ed; padding: 8px 10px; color: #467145; cursor: pointer; font-size: 9px; font-weight: 800; text-decoration: none; }
.whatsapp-button.sent { background: #eee; color: #777; }

.client-row { display: grid; grid-template-columns: 42px 1.3fr 1fr 1fr; gap: 16px; align-items: center; min-height: 72px; padding: 12px 28px; border-bottom: 1px solid #ecece6; }
.client-avatar { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; background: var(--sage); color: var(--sage-dark); font: 600 13px var(--serif); }
.client-row strong, .client-row small { display: block; }
.client-row strong { font-size: 11px; }
.client-row small, .client-contact { margin-top: 4px; color: var(--muted); font-size: 9px; }

.section-actions { margin-bottom: 18px; border: 0; background: transparent; padding: 0; }
.admin-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.service-admin-card { display: grid; min-height: 145px; grid-template-columns: 1fr auto; gap: 20px; border: 1px solid var(--line); background: var(--white); padding: 25px; }
.service-admin-card h3 { margin: 0 0 7px; font: 600 22px/1 var(--serif); }
.service-admin-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.service-admin-card small { display: block; margin-top: 15px; color: var(--sage-dark); font-size: 9px; font-weight: 800; }
.switch { position: relative; width: 40px; height: 23px; border: 0; border-radius: 20px; background: #c8ccc5; cursor: pointer; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: white; content: ""; transition: transform .2s; }
.switch.active { background: #687c64; }
.switch.active::after { transform: translateX(17px); }

.reminder-hero { display: grid; grid-template-columns: 65px 1fr; gap: 22px; align-items: start; margin-bottom: 18px; border: 1px solid #d5e1d2; background: #eaf2e7; padding: 35px; }
.reminder-hero p:last-child { max-width: 720px; margin: 11px 0 0; color: #657165; font-size: 11px; line-height: 1.7; }
.whatsapp-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: #5d8a5a; color: white; font-size: 22px; }

.service-dialog { width: min(520px, calc(100% - 30px)); border: 0; border-radius: 7px; padding: 0; box-shadow: var(--shadow); }
.service-dialog::backdrop { background: rgba(26, 34, 29, .7); }
.service-dialog form { padding: 34px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; font: 600 29px/1 var(--serif); }
.dialog-close { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 27px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 62% 38%; }
  .hero-copy { padding-left: 48px; }
  .art-arch { right: -80px; }
  .art-bottle-tall { right: 135px; }
  .art-bottle-low { right: 5px; }
  .art-leaf { right: 190px; }
  .booking-section { grid-template-columns: 250px 1fr; gap: 38px; }
  .admin-shell { grid-template-columns: 210px 1fr; }
  .admin-main { padding: 36px 28px 70px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .appointment-row { grid-template-columns: 100px 1fr 1fr; }
  .appointment-row > :nth-child(4), .appointment-row > :nth-child(5) { grid-column: auto; }
}

@media (max-width: 760px) {
  .public-header { min-height: 75px; padding: 15px 17px; }
  .public-header .brand small { display: none; }
  .admin-link { font-size: 0; }
  .admin-link span, .admin-link::before { font-size: 10px; }
  .admin-link::before { content: "Кабинет "; }
  .hero { display: block; min-height: auto; }
  .hero-copy { padding: 65px 24px 72px; }
  .hero h1 { font-size: 43px; }
  .hero-art { display: none; }
  .benefits { grid-template-columns: 1fr; }
  .benefits span { border-right: 0; border-bottom: 1px solid var(--line); }
  .benefits span:last-child { border-bottom: 0; }
  .booking-section { grid-template-columns: 1fr; gap: 30px; margin: 70px auto; padding: 0 16px; }
  .booking-note { display: none; }
  .booking-card { padding: 24px 18px; }
  .service-grid, .form-grid { grid-template-columns: 1fr; gap: 0; }
  .service-grid { gap: 8px; }
  .calm-section { margin-bottom: 0; padding: 60px 20px; }
  .calm-section h2 { font-size: 38px; }
  .public-footer { grid-template-columns: 1fr; gap: 15px; padding: 38px 22px; }
  .legal-card { margin: 10px; padding: 38px 24px; }
  .legal-card h1 { font-size: 37px; }
  .login-card { padding: 35px 24px; }

  .admin-shell { display: block; }
  .sidebar { position: fixed; z-index: 30; left: -260px; width: 245px; transition: left .2s ease; }
  .sidebar.open { left: 0; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .admin-main { padding: 24px 14px 60px; }
  .admin-header { gap: 12px; align-items: flex-start; }
  .admin-header .button { padding: 10px 12px; }
  .menu-button { display: block; margin-top: 4px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats-grid article { min-height: 125px; padding: 17px; }
  .panel-title { padding: 20px 17px; }
  .appointment-row { grid-template-columns: 92px 1fr; gap: 10px; padding: 15px 17px; }
  .appointment-service { grid-column: 2; }
  .appointment-row .status-select { grid-column: 1 / -1; }
  .appointment-row .whatsapp-button { grid-column: 1 / -1; }
  .client-row { grid-template-columns: 37px 1fr; padding: 14px 17px; }
  .client-row > :nth-child(3), .client-row > :nth-child(4) { grid-column: 2; }
  .admin-services { grid-template-columns: 1fr; }
  .section-actions { align-items: flex-end; }
  .section-actions .button { padding: 10px 13px; }
  .reminder-hero { grid-template-columns: 1fr; padding: 25px; }
}
