:root {
  --paper: #fbf5f3;
  --paper-deep: #f5eae8;
  --white: #fffdfb;
  --ink: #2f2024;
  --muted: #8f7a7f;
  --line: rgba(91, 55, 64, 0.12);
  --rose: #e9aeb8;
  --rose-soft: #f6dfe2;
  --rose-pale: #fbecef;
  --berry: #7d3045;
  --berry-dark: #572334;
  --sage: #758b78;
  --amber: #b87848;
  --danger: #a94553;
  --shadow: 0 18px 48px rgba(95, 48, 61, 0.12);
  --shadow-soft: 0 8px 24px rgba(95, 48, 61, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { background: #eededc; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(255,255,255,.9) 0 1px, transparent 2px) 0 0/18px 18px,
    linear-gradient(145deg, #fffaf8 0%, var(--paper) 45%, #f7e9e7 100%);
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.ambient {
  position: fixed;
  z-index: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  opacity: .5;
}
.ambient-one { top: -140px; right: -110px; background: radial-gradient(circle, #f2bdc6, transparent 68%); }
.ambient-two { bottom: -150px; left: -100px; background: radial-gradient(circle, #efd4cc, transparent 68%); }

#app { position: relative; z-index: 1; min-height: 100vh; }

.launch-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}
.launch-mark { position: relative; width: 62px; height: 64px; margin-bottom: 16px; }
.launch-mark span {
  position: absolute;
  bottom: 0;
  width: 17px;
  height: 49px;
  border: 1px solid rgba(125,48,69,.2);
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(#f8cdd5, #dfa0ac);
  box-shadow: inset 2px 4px 7px rgba(255,255,255,.55);
  animation: nail-rise .8s both cubic-bezier(.2,.8,.2,1);
}
.launch-mark span:nth-child(1) { left: 3px; transform: rotate(-12deg); animation-delay: .1s; }
.launch-mark span:nth-child(2) { left: 23px; height: 58px; animation-delay: .22s; }
.launch-mark span:nth-child(3) { right: 2px; transform: rotate(12deg); animation-delay: .34s; }
.launch-screen h1 { margin: 8px 0 24px; font: 600 40px/0.98 'Cormorant Infant', serif; letter-spacing: -.03em; }
.launch-screen h1 em { color: var(--berry); font-weight: 600; }
.loading-line { width: 150px; height: 3px; overflow: hidden; border-radius: 99px; background: var(--rose-soft); }
.loading-line i { display: block; width: 45%; height: 100%; border-radius: inherit; background: var(--berry); animation: loading 1.2s infinite ease-in-out; }

.app-shell {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(92px + var(--safe-bottom));
}
.app-shell.admin-shell { max-width: 760px; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: var(--safe-top) 20px 10px;
  background: linear-gradient(to bottom, rgba(251,245,243,.96) 68%, rgba(251,245,243,0));
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--berry);
  box-shadow: 0 7px 18px rgba(125,48,69,.2);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-copy { min-width: 0; }
.brand-name { display: block; overflow: hidden; font: 600 22px/1 'Cormorant Infant', serif; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.avatar-button {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(125,48,69,.12);
  border-radius: 50%;
  color: var(--berry);
  background: var(--rose-pale);
  font-size: 13px;
  font-weight: 700;
}

.screen { padding: 8px 18px 28px; }
.screen > * { animation: reveal .45s both cubic-bezier(.2,.75,.2,1); }
.screen > *:nth-child(2) { animation-delay: .05s; }
.screen > *:nth-child(3) { animation-delay: .1s; }
.screen > *:nth-child(4) { animation-delay: .15s; }

.eyebrow { margin: 0; color: var(--berry); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.page-title { margin: 5px 0 8px; font: 600 clamp(34px, 9vw, 48px)/.98 'Cormorant Infant', serif; letter-spacing: -.035em; }
.page-title em { color: var(--berry); font-weight: 600; }
.page-lead { max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.hero {
  position: relative;
  min-height: 205px;
  overflow: hidden;
  margin: 4px 0 26px;
  padding: 25px 22px;
  border: 1px solid rgba(125,48,69,.08);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(125deg, rgba(255,255,255,.84), rgba(255,248,246,.48)),
    var(--rose-soft);
  box-shadow: var(--shadow);
}
.hero::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -86px;
  width: 210px;
  height: 210px;
  border: 35px solid rgba(255,255,255,.38);
  border-radius: 50%;
}
.hero::before {
  content: '';
  position: absolute;
  right: 28px;
  top: 18px;
  width: 68px;
  height: 124px;
  border-radius: 55% 55% 48% 48%;
  background: linear-gradient(155deg, rgba(255,255,255,.78), rgba(232,164,177,.72));
  box-shadow: inset 8px 10px 20px rgba(255,255,255,.46), 0 18px 30px rgba(125,48,69,.13);
  transform: rotate(19deg);
}
.hero-copy { position: relative; z-index: 2; max-width: 70%; }
.hero h1 { margin: 8px 0 9px; font: 600 39px/.93 'Cormorant Infant', serif; letter-spacing: -.04em; }
.hero h1 em { color: var(--berry); font-weight: 600; }
.hero p:last-child { margin: 0; color: #766168; font-size: 12px; line-height: 1.55; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 17px; padding: 7px 10px; border-radius: 99px; color: var(--berry); background: rgba(255,255,255,.6); font-size: 10px; font-weight: 700; }
.hero-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }

.next-card {
  position: relative;
  overflow: hidden;
  margin: 4px 0 24px;
  padding: 21px;
  border-radius: var(--radius-xl);
  color: #fff8f8;
  background: linear-gradient(135deg, var(--berry-dark), var(--berry));
  box-shadow: 0 18px 38px rgba(87,35,52,.22);
}
.next-card::after { content: 'L'; position: absolute; right: -5px; bottom: -35px; color: rgba(255,255,255,.06); font: italic 600 150px/1 'Cormorant Infant', serif; }
.next-card .eyebrow { color: #f4ccd4; }
.next-title { position: relative; z-index: 1; margin: 9px 0 16px; font: 600 29px/1 'Cormorant Infant', serif; }
.next-info { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.next-info span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 99px; background: rgba(255,255,255,.1); font-size: 11px; }
.next-info svg { width: 14px; }

.section { margin: 24px 0 30px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { margin: 0; font: 600 25px/1.05 'Cormorant Infant', serif; letter-spacing: -.02em; }
.section-note { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.text-button { padding: 5px; border: 0; color: var(--berry); background: none; font-size: 11px; font-weight: 700; cursor: pointer; }

.service-list { display: flex; gap: 10px; margin: 0 -18px; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.service-list::-webkit-scrollbar, .date-rail::-webkit-scrollbar { display: none; }
.service-chip {
  min-width: 150px;
  max-width: 230px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 19px;
  text-align: left;
  background: rgba(255,253,251,.72);
  box-shadow: 0 5px 18px rgba(91,55,64,.04);
  cursor: pointer;
  transition: transform .2s, border .2s, background .2s;
}
.service-chip:active { transform: scale(.98); }
.service-chip.active { border-color: rgba(125,48,69,.35); background: var(--berry); color: white; box-shadow: 0 12px 24px rgba(125,48,69,.18); }
.service-icon { display: grid; width: 31px; height: 31px; margin-bottom: 13px; place-items: center; border-radius: 50%; color: var(--berry); background: var(--rose-pale); }
.service-chip.active .service-icon { color: var(--white); background: rgba(255,255,255,.13); }
.service-icon svg { width: 15px; height: 15px; }
.service-name { display: block; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.service-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.service-chip.active .service-meta { color: #edcbd2; }

.date-rail { display: flex; gap: 8px; margin: 0 -18px; padding: 1px 18px 7px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.date-pill {
  width: 58px;
  min-width: 58px;
  padding: 11px 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,253,251,.7);
  text-align: center;
  scroll-snap-align: start;
  cursor: pointer;
  transition: .2s ease;
}
.date-pill .dow { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.date-pill .day { display: block; margin: 4px 0 2px; color: var(--ink); font: 600 24px/1 'Cormorant Infant', serif; }
.date-pill .dot { display: block; width: 4px; height: 4px; margin: 5px auto 0; border-radius: 50%; background: var(--rose); opacity: 0; }
.date-pill.has-slots .dot { opacity: 1; }
.date-pill.unavailable { border-style: dashed; color: #b8aaad; background: rgba(255,255,255,.24); cursor: not-allowed; opacity: .42; }
.date-pill.unavailable .day { color: #aa9ca0; }
.date-pill.active { color: #f7dfe4; border-color: var(--berry); background: var(--berry); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(125,48,69,.18); }
.date-pill.active .day { color: white; }
.date-pill.active .dot { background: white; }
.availability-legend { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 8px; font-weight: 600; }
.availability-legend span { display: inline-flex; align-items: center; gap: 5px; }
.availability-legend i { width: 7px; height: 7px; border-radius: 50%; }
.availability-legend i.available { background: var(--berry); }
.availability-legend i.unavailable { border: 1px solid #b8aaad; background: transparent; }

.times-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.time-button {
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,253,251,.78);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s, color .18s, background .18s;
}
.time-button:hover, .time-button:focus-visible { border-color: var(--berry); }
.time-button:active { transform: scale(.96); }
.time-button.active { color: white; border-color: var(--berry); background: var(--berry); }

.primary-button, .secondary-button, .danger-button, .ghost-button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 0;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s, opacity .16s, box-shadow .16s;
}
.primary-button { color: white; background: var(--berry); box-shadow: 0 10px 20px rgba(125,48,69,.18); }
.secondary-button { color: var(--berry); border: 1px solid rgba(125,48,69,.15); background: var(--rose-pale); }
.ghost-button { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.danger-button { color: var(--danger); background: #fae6e8; }
.primary-button:active, .secondary-button:active, .danger-button:active, .ghost-button:active { transform: scale(.97); }
button:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.full-button { width: 100%; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.button-row > button { flex: 1; }
.icon-only { width: 42px; min-height: 42px; padding: 0; flex: 0 0 auto !important; }
button svg { width: 17px; height: 17px; stroke-width: 1.8; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(var(--nav-count, 3), 1fr);
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 9px 12px var(--safe-bottom);
  border-top: 1px solid rgba(91,55,64,.08);
  background: rgba(255,253,251,.92);
  box-shadow: 0 -14px 35px rgba(91,55,64,.08);
  backdrop-filter: blur(20px);
}
.admin-shell .bottom-nav { width: min(100%, 760px); }
.nav-button { position: relative; display: flex; min-height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; color: #aa969b; background: none; font-size: 9px; font-weight: 700; cursor: pointer; }
.nav-button svg { width: 20px; height: 20px; }
.nav-button.active { color: var(--berry); }
.nav-button.active::before { content: ''; position: absolute; top: -9px; width: 26px; height: 3px; border-radius: 0 0 9px 9px; background: var(--berry); }
.nav-badge { position: absolute; top: 2px; left: calc(50% + 7px); display: grid; min-width: 16px; height: 16px; padding: 0 4px; place-items: center; border: 2px solid var(--white); border-radius: 99px; color: white; background: var(--berry); font-size: 8px; }

.empty-state { padding: 28px 18px; border: 1px dashed rgba(125,48,69,.18); border-radius: var(--radius-lg); text-align: center; background: rgba(255,255,255,.32); }
.empty-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 12px; place-items: center; border-radius: 50%; color: var(--berry); background: var(--rose-pale); }
.empty-icon svg { width: 22px; }
.empty-state h3 { margin: 0 0 6px; font: 600 22px/1 'Cormorant Infant', serif; }
.empty-state p { max-width: 280px; margin: 0 auto; color: var(--muted); font-size: 11px; line-height: 1.55; }

.booking-list, .request-list, .agenda-list, .settings-stack { display: grid; gap: 12px; }
.booking-card, .request-card, .settings-card, .service-admin-card, .agenda-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,253,251,.75);
  box-shadow: var(--shadow-soft);
}
.booking-card { position: relative; overflow: hidden; }
.booking-card::before { content: ''; position: absolute; top: 18px; bottom: 18px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--rose); }
.booking-card.status-confirmed::before { background: var(--sage); }
.booking-card.status-admin_proposed::before { background: var(--amber); }
.booking-card.status-cancelled::before, .booking-card.status-declined::before { background: #c8babc; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-title { margin: 0; font-size: 13px; font-weight: 700; }
.card-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 99px;
  color: var(--berry);
  background: var(--rose-pale);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.confirmed { color: #527057; background: #e7f0e7; }
.status.admin_proposed { color: #9b5b2b; background: #faebdc; }
.status.cancelled, .status.declined { color: #88777b; background: #f0e9e9; }
.booking-details { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.detail-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 10px; color: #705b61; background: var(--paper-deep); font-size: 10px; font-weight: 600; }
.detail-pill svg { width: 13px; height: 13px; }
.message-box { margin: 12px 0; padding: 11px 12px; border-left: 2px solid var(--rose); border-radius: 0 10px 10px 0; color: #6e545b; background: var(--rose-pale); font-size: 10px; line-height: 1.5; }

.profile-hero { padding: 24px 20px; border-radius: var(--radius-xl); text-align: center; background: linear-gradient(145deg, var(--rose-soft), #fff9f7); box-shadow: var(--shadow-soft); }
.profile-avatar { display: grid; width: 66px; height: 66px; margin: 0 auto 12px; place-items: center; border: 5px solid rgba(255,255,255,.66); border-radius: 50%; color: white; background: var(--berry); box-shadow: 0 10px 22px rgba(125,48,69,.17); font: 600 26px 'Cormorant Infant', serif; }
.profile-hero h2 { margin: 0; font: 600 27px/1 'Cormorant Infant', serif; }
.profile-hero p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0 26px; }
.metric { min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,251,.7); box-shadow: var(--shadow-soft); }
.metric strong { display: block; margin-bottom: 3px; color: var(--berry); font: 600 29px/1 'Cormorant Infant', serif; }
.metric span { display: block; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 700; text-overflow: ellipsis; text-transform: uppercase; }

.request-card { padding: 0; overflow: hidden; }
.request-main { padding: 17px; }
.client-row { display: flex; align-items: center; gap: 11px; }
.client-avatar { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--berry); background: var(--rose-pale); font: 600 18px 'Cormorant Infant', serif; }
.telegram-avatar { position: relative; overflow: hidden; isolation: isolate; }
.telegram-avatar b { font: inherit; }
.telegram-avatar img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; color: var(--berry); background: var(--rose-pale); font: 600 14px 'Cormorant Infant', serif; box-shadow: 0 5px 12px rgba(87,35,52,.1); }
.client-copy { min-width: 0; flex: 1; }
.client-name { display: block; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.client-contact { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.request-time { margin: 15px 0 4px; font: 600 25px/1 'Cormorant Infant', serif; }
.request-service { margin: 0; color: var(--muted); font-size: 10px; }
.request-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; padding: 12px; border-top: 1px solid var(--line); background: rgba(247,235,234,.5); }
.request-actions button { min-height: 40px; padding: 8px 10px; font-size: 10px; }

.agenda-card { display: flex; align-items: center; gap: 12px; }
.agenda-time { flex: 0 0 46px; color: var(--berry); font: 600 23px/1 'Cormorant Infant', serif; }
.agenda-divider { width: 1px; align-self: stretch; background: var(--line); }
.agenda-copy { min-width: 0; flex: 1; }
.agenda-copy strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.upcoming-section { margin-top: 12px; }
.upcoming-list { display: grid; gap: 9px; }
.upcoming-card { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid rgba(117,139,120,.2); border-radius: 19px; background: linear-gradient(120deg, rgba(231,240,231,.82), rgba(255,253,251,.86)); box-shadow: var(--shadow-soft); }
.upcoming-date { display: grid; width: 47px; height: 53px; flex: 0 0 auto; place-items: center; align-content: center; border-radius: 15px; color: white; background: var(--sage); box-shadow: 0 8px 16px rgba(82,112,87,.16); }
.upcoming-date strong { font: 600 23px/.8 'Cormorant Infant', serif; }
.upcoming-date small { margin-top: 5px; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.upcoming-copy { min-width: 0; flex: 1; }
.upcoming-copy strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.upcoming-card .status { padding: 6px; font-size: 7px; }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 12px; }
.calendar-toolbar h2 { margin: 0; font: 600 27px/1 'Cormorant Infant', serif; text-transform: capitalize; }
.calendar-toolbar .button-row { flex-wrap: nowrap; }
.calendar-toolbar button { width: 38px; min-height: 38px; padding: 0; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 22px; }
.month-dow { padding: 4px 0; color: var(--muted); text-align: center; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.month-day { position: relative; display: grid; aspect-ratio: 1; border: 0; border-radius: 13px; place-items: center; background: transparent; font-size: 10px; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.month-day.other { opacity: .25; }
.month-day.today { color: var(--berry); font-weight: 700; box-shadow: inset 0 0 0 1px var(--rose); }
.month-day.has-booking:not(.selected) { color: #44644a; background: #e7f0e7; box-shadow: inset 0 0 0 1px rgba(82,112,87,.22); font-weight: 700; }
.month-day.has-request:not(.selected) { color: #8b542d; background: #fae8d7; box-shadow: inset 0 0 0 1px rgba(184,120,72,.24); }
.month-day.selected { color: white; background: var(--berry); box-shadow: 0 7px 14px rgba(125,48,69,.16); }
.month-day.has-slots::after { content: ''; position: absolute; right: 50%; bottom: 5px; width: 3px; height: 3px; border-radius: 50%; background: var(--rose); transform: translateX(50%); }
.month-day.selected::after { background: white; }
.day-count { position: absolute; top: 3px; right: 3px; display: grid; min-width: 14px; height: 14px; padding: 0 3px; place-items: center; border: 2px solid var(--paper); border-radius: 99px; color: white; background: var(--sage); font-size: 7px; font-style: normal; font-weight: 700; line-height: 1; }
.month-day.has-request .day-count { background: var(--amber); }
.month-day.selected .day-count { color: var(--berry); border-color: var(--berry); background: white; }
.calendar-legend { display: flex; gap: 12px; margin: -10px 0 22px; color: var(--muted); font-size: 8px; font-weight: 600; flex-wrap: wrap; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 50%; }
.calendar-legend i.free { background: var(--rose); }
.calendar-legend i.booked { background: var(--sage); }
.calendar-legend i.request { background: var(--amber); }

.slot-admin-list { display: grid; gap: 8px; }
.slot-admin {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 57px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,251,.72);
}
.slot-admin.has-client { grid-template-columns: 51px 34px minmax(0, 1fr) auto; gap: 8px; }
.slot-admin.closed { opacity: .58; }
.slot-time { color: var(--berry); font: 600 21px 'Cormorant Infant', serif; }
.slot-avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 2px solid white; border-radius: 50%; color: #527057; background: #e7f0e7; font: 600 13px 'Cormorant Infant', serif; box-shadow: 0 5px 12px rgba(82,112,87,.12); }
.slot-state { min-width: 0; }
.slot-state strong { display: block; font-size: 10px; }
.slot-state span { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.slot-tools { display: flex; gap: 5px; }
.slot-tools button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 0; border-radius: 11px; color: var(--muted); background: var(--paper-deep); cursor: pointer; }
.slot-tools button svg { width: 14px; }
.floating-add { position: fixed; z-index: 19; right: max(18px, calc((100vw - 760px) / 2 + 18px)); bottom: calc(88px + var(--safe-bottom)); display: flex; min-height: 48px; align-items: center; gap: 8px; padding: 0 17px; border: 0; border-radius: 99px; color: white; background: var(--berry); box-shadow: 0 14px 27px rgba(87,35,52,.27); font-size: 11px; font-weight: 700; cursor: pointer; }

.service-admin-list { gap: 14px; }
.service-admin-card { position: relative; display: grid; gap: 13px; padding: 16px; overflow: hidden; }
.service-admin-card::after { content: ''; position: absolute; top: -38px; right: -38px; width: 95px; height: 95px; border: 1px solid rgba(233,174,184,.2); border-radius: 50%; pointer-events: none; }
.service-card-head { display: flex; min-width: 0; align-items: center; gap: 11px; }
.service-admin-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 15px; color: var(--berry); background: var(--rose-pale); }
.service-admin-icon svg { width: 19px; }
.service-admin-title { min-width: 0; flex: 1; }
.service-admin-title strong { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.service-admin-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.service-admin-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.service-admin-meta > span { display: grid; min-width: 82px; gap: 2px; padding: 9px 11px; border: 1px solid rgba(125,48,69,.08); border-radius: 13px; background: var(--paper-deep); }
.service-admin-meta strong { color: var(--berry); font: 600 18px/1 'Cormorant Infant', serif; }
.service-admin-meta small { color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.service-admin-meta.empty-meta { padding: 10px 11px; border-radius: 12px; color: var(--muted); background: var(--paper-deep); font-size: 8px; }
.service-admin-description { margin: 0; color: #6f5b61; font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.service-admin-description.muted { color: var(--muted); font-style: italic; }
.service-edit-button { position: relative; z-index: 1; display: flex; min-height: 39px; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border: 1px solid rgba(125,48,69,.14); border-radius: 12px; color: var(--berry); background: rgba(255,255,255,.58); font-size: 9px; font-weight: 700; cursor: pointer; }
.service-edit-button svg { width: 14px; height: 14px; }
.service-edit-button:active { transform: scale(.985); }
.inactive { opacity: .5; }

.settings-card h3 { margin: 0 0 4px; font: 600 21px 'Cormorant Infant', serif; }
.settings-card > p { margin: 0 0 16px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.field label { color: #715d63; font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.field small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.input, .textarea, .select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.74);
  font-size: 12px;
  transition: border .2s, box-shadow .2s;
}
.textarea { min-height: 86px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(125,48,69,.55); box-shadow: 0 0 0 3px rgba(233,174,184,.2); }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.checkbox-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.switch { position: relative; width: 43px; height: 25px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #ddcfd1; transition: .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: .2s; }
.switch input:checked + i { background: var(--berry); }
.switch input:checked + i::after { transform: translateX(18px); }
.user-admin-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.user-admin-row:last-child { border-bottom: 0; }

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 30px;
  background: rgba(49,28,34,.36);
  backdrop-filter: blur(6px);
  animation: fade-in .2s both;
}
.modal {
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 11px 18px calc(20px + var(--safe-bottom));
  border-radius: 29px 29px 0 0;
  background: var(--white);
  box-shadow: 0 -20px 60px rgba(49,28,34,.2);
  animation: sheet-up .32s both cubic-bezier(.2,.8,.2,1);
}
.modal-handle { width: 39px; height: 4px; margin: 0 auto 18px; border-radius: 99px; background: #e7d9db; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.modal-head h2 { margin: 0; font: 600 30px/.98 'Cormorant Infant', serif; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.close-button { display: grid; width: 36px; height: 36px; flex: 0 0 auto; padding: 0; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: var(--paper-deep); cursor: pointer; }
.app-confirm-backdrop { position: fixed; z-index: 110; inset: 0; display: grid; padding: max(22px, var(--safe-top)) 22px max(22px, var(--safe-bottom)); place-items: center; background: rgba(49,28,34,.44); backdrop-filter: blur(8px); animation: fade-in .18s both; }
.app-confirm { position: relative; width: min(100%, 350px); padding: 25px 22px 20px; overflow: hidden; border: 1px solid rgba(125,48,69,.12); border-radius: 25px; text-align: center; background: linear-gradient(155deg, #fffdfb, #fbf2f1); box-shadow: 0 24px 70px rgba(49,28,34,.28); animation: confirm-pop .25s both cubic-bezier(.2,.8,.2,1); }
.app-confirm::before { content: ''; position: absolute; top: -72px; right: -58px; width: 160px; height: 160px; border: 1px solid rgba(233,174,184,.22); border-radius: 50%; pointer-events: none; }
.app-confirm-icon { position: relative; display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border-radius: 18px; color: var(--berry); background: var(--rose-pale); box-shadow: inset 0 0 0 1px rgba(125,48,69,.06); }
.app-confirm-icon svg { width: 22px; height: 22px; }
.app-confirm .eyebrow { position: relative; margin: 0 0 7px; }
.app-confirm h2 { position: relative; margin: 0; color: var(--ink); font: 600 29px/1 'Cormorant Infant', serif; }
.app-confirm > p:not(.eyebrow) { position: relative; margin: 10px auto 20px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.app-confirm-actions { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app-confirm-actions button { min-height: 45px; padding: 9px 11px; font-size: 9px; }
.app-confirm-actions .danger-button { color: white; background: var(--berry); box-shadow: 0 9px 20px rgba(125,48,69,.18); }
.summary-box { display: grid; gap: 9px; margin-bottom: 18px; padding: 15px; border-radius: 18px; background: var(--rose-pale); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.summary-row span { color: var(--muted); }
.summary-row strong { text-align: right; }
.proposal-current { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin: -4px 0 18px; padding: 12px; border: 1px solid rgba(125,48,69,.1); border-radius: 17px; background: linear-gradient(120deg, var(--rose-pale), rgba(255,253,251,.82)); }
.proposal-avatar { display: grid; width: 44px; height: 44px; place-items: center; border: 3px solid rgba(255,255,255,.8); border-radius: 50%; color: white; background: var(--berry); font: 600 17px 'Cormorant Infant', serif; box-shadow: 0 7px 15px rgba(125,48,69,.15); }
.proposal-current > span { min-width: 0; }
.proposal-current small, .proposal-current strong, .proposal-current em { display: block; }
.proposal-current small { color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.proposal-current strong { margin-top: 3px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.proposal-current em { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.proposal-current > b { color: var(--berry); font: 600 22px 'Cormorant Infant', serif; }
.proposal-picker { margin-bottom: 17px; }
.proposal-days { display: grid; max-height: 43vh; gap: 11px; overflow-y: auto; padding: 2px 2px 4px; overscroll-behavior: contain; scrollbar-width: thin; }
.proposal-day { padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(251,245,243,.62); }
.proposal-day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.proposal-day-head strong { display: block; font: 600 18px/1 'Cormorant Infant', serif; text-transform: capitalize; }
.proposal-day-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.proposal-day-head > span { padding: 5px 7px; border-radius: 99px; color: #527057; background: #e7f0e7; font-size: 7px; font-weight: 700; }
.busy-clients { margin-top: 10px; }
.busy-clients > p { margin: 0 0 6px; color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.busy-client-list { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.busy-client-list::-webkit-scrollbar { display: none; }
.busy-client { display: flex; min-width: max-content; align-items: center; gap: 7px; padding: 6px 9px 6px 6px; border: 1px solid rgba(82,112,87,.14); border-radius: 99px; background: rgba(231,240,231,.72); }
.busy-avatar { display: grid; width: 27px; height: 27px; place-items: center; border: 2px solid white; border-radius: 50%; color: #527057; background: white; font: 600 11px 'Cormorant Infant', serif; }
.busy-client span { display: grid; gap: 1px; }
.busy-client strong { max-width: 116px; overflow: hidden; color: #405946; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.busy-client small { color: #78907c; font-size: 7px; }
.slot-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.slot-choice { position: relative; cursor: pointer; }
.slot-choice input { position: absolute; opacity: 0; pointer-events: none; }
.slot-choice > span { display: grid; min-height: 47px; place-items: center; align-content: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.74); transition: .18s ease; }
.slot-choice strong { color: var(--ink); font: 600 17px/1 'Cormorant Infant', serif; }
.slot-choice small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.slot-choice input:checked + span { color: white; border-color: var(--berry); background: var(--berry); box-shadow: 0 7px 16px rgba(125,48,69,.18); transform: translateY(-1px); }
.slot-choice input:checked + span strong, .slot-choice input:checked + span small { color: white; }
.slot-choice input:focus-visible + span { outline: 3px solid rgba(233,174,184,.38); outline-offset: 2px; }
.template-picker { margin-bottom: 16px; }
.template-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.template-picker-head strong, .template-picker-head small { display: block; }
.template-picker-head strong { color: #715d63; font-size: 9px; letter-spacing: .03em; }
.template-picker-head small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.template-picker-head > button { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid rgba(125,48,69,.14); border-radius: 10px; color: var(--berry); background: var(--rose-pale); font-size: 8px; font-weight: 700; cursor: pointer; }
.template-picker-head > button svg { width: 12px; }
.time-template-list { display: grid; gap: 9px; }
.time-template-card { position: relative; display: grid; gap: 10px; padding: 12px; overflow: hidden; border: 1px solid rgba(125,48,69,.12); border-radius: 17px; background: linear-gradient(135deg, rgba(247,235,234,.86), rgba(255,253,251,.9)); }
.time-template-card::after { content: ''; position: absolute; top: -42px; right: -37px; width: 88px; height: 88px; border: 1px solid rgba(233,174,184,.24); border-radius: 50%; pointer-events: none; }
.time-template-head { position: relative; z-index: 1; display: grid; grid-template-columns: 35px minmax(0, 1fr) 31px; align-items: center; gap: 9px; }
.time-template-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 12px; color: white; background: var(--berry); box-shadow: 0 7px 15px rgba(125,48,69,.15); }
.time-template-mark svg { width: 16px; }
.time-template-head strong, .time-template-head small { display: block; }
.time-template-head strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.time-template-head small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.time-template-head > button { display: grid; width: 31px; height: 31px; padding: 0; place-items: center; border: 0; border-radius: 10px; color: var(--berry); background: rgba(255,255,255,.68); cursor: pointer; }
.time-template-head > button svg { width: 13px; }
.time-template-hours { position: relative; z-index: 1; display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.time-template-hours::-webkit-scrollbar { display: none; }
.time-template-hours span { flex: 0 0 auto; padding: 5px 7px; border: 1px solid rgba(125,48,69,.09); border-radius: 9px; color: #715d63; background: rgba(255,255,255,.68); font-size: 8px; font-weight: 700; }
.template-apply-button { position: relative; z-index: 1; display: flex; min-height: 39px; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px; color: white; background: var(--berry); box-shadow: 0 8px 17px rgba(125,48,69,.15); font-size: 9px; font-weight: 700; cursor: pointer; }
.template-apply-button svg { width: 14px; }
.template-apply-button:active { transform: scale(.985); }
.template-empty { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; margin-bottom: 16px; padding: 13px; border: 1px dashed rgba(125,48,69,.2); border-radius: 17px; background: rgba(247,235,234,.46); }
.template-empty > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; color: var(--berry); background: var(--rose-pale); }
.template-empty > span svg { width: 17px; }
.template-empty strong { display: block; font-size: 10px; }
.template-empty p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.template-empty > button { grid-column: 1 / -1; min-height: 37px; border: 1px solid rgba(125,48,69,.14); border-radius: 11px; color: var(--berry); background: rgba(255,255,255,.7); font-size: 9px; font-weight: 700; cursor: pointer; }
.template-divider { display: flex; align-items: center; gap: 10px; margin: 3px 0 14px; color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.template-divider::before, .template-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.template-quick-times { margin-top: -3px; }
.template-form-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 17px; }
.template-form-actions button { min-height: 45px; }
.template-form-actions .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.template-form-actions .danger-button svg { width: 14px; }
.quick-times { display: flex; gap: 7px; margin: 8px 0 13px; flex-wrap: wrap; }
.quick-times button { min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 10px; cursor: pointer; }

.toast-root { position: fixed; z-index: 120; right: 12px; bottom: calc(86px + var(--safe-bottom)); left: 12px; display: grid; justify-items: center; pointer-events: none; }
.toast { display: flex; max-width: 410px; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; color: white; background: #3f2c31; box-shadow: 0 14px 35px rgba(49,28,34,.25); font-size: 10px; line-height: 1.4; animation: toast-in .3s both; }
.toast.error { background: #812f40; }
.toast svg { width: 16px; flex: 0 0 auto; }

.fatal { display: grid; min-height: 100vh; padding: 34px; place-items: center; text-align: center; }
.fatal-card { max-width: 360px; padding: 28px 22px; border-radius: var(--radius-xl); background: rgba(255,253,251,.8); box-shadow: var(--shadow); }
.fatal-card h1 { margin: 12px 0 8px; font: 600 32px/1 'Cormorant Infant', serif; }
.fatal-card p { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.skeleton { position: relative; overflow: hidden; min-height: 60px; border-radius: 18px; background: #f0e4e3; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.4s infinite; transform: translateX(-100%); }

@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(35px); opacity: .7; } }
@keyframes confirm-pop { from { opacity: .65; transform: translateY(12px) scale(.96); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes nail-rise { from { height: 8px; opacity: 0; } }
@keyframes loading { 0% { transform: translateX(-110%); } 60%,100% { transform: translateX(240%); } }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (min-width: 760px) {
  body { padding: 18px 0; }
  .app-shell { min-height: calc(100vh - 36px); border: 1px solid rgba(91,55,64,.1); border-radius: 34px; background: rgba(251,245,243,.86); box-shadow: 0 28px 80px rgba(76,37,48,.16); }
  .topbar { top: 18px; border-radius: 34px 34px 0 0; }
  .bottom-nav { bottom: 18px; border: 1px solid rgba(91,55,64,.08); border-radius: 0 0 34px 34px; }
  .modal-backdrop { align-items: center; }
  .modal { max-height: 82vh; border-radius: 28px; padding-bottom: 24px; }
  .modal-handle { display: none; }
}

@media (max-width: 360px) {
  .screen { padding-right: 14px; padding-left: 14px; }
  .hero { padding: 21px 17px; }
  .hero h1 { font-size: 34px; }
  .hero-copy { max-width: 74%; }
  .metrics { gap: 6px; }
  .metric { padding: 12px 9px; }
  .request-actions { grid-template-columns: 1fr 1fr; }
  .request-actions .icon-only { grid-column: span 2; width: 100%; }
  .slot-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-admin.has-client { grid-template-columns: 46px 30px minmax(0, 1fr) 30px; gap: 6px; padding-right: 8px; padding-left: 10px; }
  .slot-avatar { width: 30px; height: 30px; }
  .slot-tools button { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
