:root {
  --ink: #17231f;
  --ink-2: #27332f;
  --paper: #fbfaf6;
  --white: #fff;
  --sage: #e7eee8;
  --line: #d9dfda;
  --muted: #6f7974;
  --coral: #ef6a4c;
  --coral-soft: #fde4dc;
  --blue: #527ca8;
  --blue-soft: #e5eef7;
  --violet: #7c69a5;
  --violet-soft: #eee8f7;
  --olive: #788750;
  --olive-soft: #edf0df;
  --holiday: #bd443a;
  --slot: 36px;
  --day-slot: 52px;
  --radius: 18px;
  --shadow: 0 18px 55px rgba(23, 35, 31, .12);
  --body: "DM Sans", system-ui, sans-serif;
  --display: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--body); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(239, 106, 76, .42); outline-offset: 3px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand b { font: 600 27px/1 var(--display); }
.brand-mark { width: 29px; height: 28px; display: flex; align-items: flex-end; gap: 3px; }
.brand-mark i { display: block; width: 7px; border-radius: 6px 6px 2px 2px; background: var(--coral); }
.brand-mark i:nth-child(1) { height: 16px; }
.brand-mark i:nth-child(2) { height: 28px; }
.brand-mark i:nth-child(3) { height: 21px; }
.brand-light { color: var(--white); }
.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; }

.login-view { min-height: 100svh; display: grid; grid-template-columns: minmax(350px, .9fr) minmax(520px, 1.1fr); }
.login-art { position: relative; min-height: 100svh; padding: clamp(32px, 5vw, 70px); overflow: hidden; display: grid; place-items: center; background: #ececeb; }
.login-art::before { content: ""; position: absolute; width: 72vw; aspect-ratio: 1; left: -42vw; bottom: -50vw; border: 1px solid rgba(226, 42, 136, .19); border-radius: 50%; box-shadow: 0 0 0 75px rgba(226,42,136,.025), 0 0 0 150px rgba(226,42,136,.018); }
.login-art::after { content: ""; position: absolute; inset: 0; opacity: .24; background: linear-gradient(125deg, transparent 0 64%, rgba(255,255,255,.8) 64% 64.2%, transparent 64.2%); }
.salon-cover { position: relative; z-index: 1; width: min(570px, 88%); aspect-ratio: 1; padding: 28px; display: grid; place-items: center; border-radius: 24px; background: #fff; box-shadow: 0 28px 70px rgba(50,55,54,.13); }
.salon-cover img { width: 100%; height: 100%; display: block; object-fit: contain; }
.salon-cover-label { position: absolute; top: 22px; left: 24px; padding: 6px 9px; border-radius: 999px; color: #757777; background: #f4f4f3; font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.login-panel { min-height: 100svh; display: grid; place-items: center; padding: 42px; }
.login-box { width: min(430px, 100%); }
.login-box .brand { margin-bottom: 86px; }
.login-box h1 { margin: 14px 0 10px; font: 600 clamp(46px, 5vw, 68px)/.95 var(--display); letter-spacing: -.03em; }
.login-intro { margin: 0 0 35px; color: var(--muted); line-height: 1.65; }
form label { display: grid; gap: 8px; margin-bottom: 18px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; color: var(--ink); background: var(--white); transition: border-color .2s, box-shadow .2s; }
input { min-height: 47px; }
select { min-height: 47px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(23, 35, 31, .08); }
form label small { min-height: 14px; color: var(--olive); font-size: 10px; font-weight: 500; }
.form-error { min-height: 20px; margin: -4px 0 8px; color: var(--holiday); font-size: 12px; }
.button { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 28px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.button-dark { width: 100%; justify-content: space-between; color: #fff; background: var(--ink); }
.button-dark:hover { background: #26352f; }
.preview-access { margin-top: 24px; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.preview-access button { padding: 0; border: 0; color: var(--ink); background: none; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.app-view { min-height: 100svh; background: #f3f3ee; }
.app-header { min-height: 78px; padding: 12px clamp(18px, 3vw, 44px); display: grid; grid-template-columns: 190px 1fr auto; align-items: center; gap: 24px; color: #fff; background: var(--ink); }
.header-center { display: flex; align-items: center; justify-content: center; gap: 9px; }
.header-center h1 { min-width: 260px; margin: 0 0 0 18px; font: 500 26px/1 var(--display); }
.icon-button, .today-button { height: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: #fff; background: transparent; cursor: pointer; }
.icon-button { width: 38px; font-size: 18px; }
.today-button { padding: 0 14px; font-size: 12px; font-weight: 700; }
.icon-button:hover, .today-button:hover { background: rgba(255,255,255,.09); }
.header-actions { display: flex; align-items: center; gap: 13px; }
.archive-button { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: #fff; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.archive-button:hover, .archive-button.is-active { color: var(--ink); background: #fff; }
.archive-button span { color: var(--coral); font-size: 17px; }
.view-switch { display: flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.1); }
.view-switch button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 7px; color: rgba(255,255,255,.68); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.view-switch button.is-active { color: var(--ink); background: #fff; }
.user-button { display: flex; align-items: center; gap: 8px; border: 0; color: #fff; background: none; cursor: pointer; }
.user-button span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--sage); font-size: 10px; font-weight: 700; }
.user-button b { font-size: 11px; }

.app-main { padding: clamp(18px, 3vw, 38px); }
.calendar-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 40px rgba(23,35,31,.06); }
.calendar-toolbar { min-height: 72px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.calendar-toolbar p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.legend { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.appointment-dot { background: var(--coral); }
.shift-dot { background: var(--ink); }
.holiday-dot { background: var(--holiday); }

.week-scroll { position: relative; overflow: auto; max-height: calc(100svh - 188px); overscroll-behavior: contain; scrollbar-color: #b6beb9 transparent; -webkit-overflow-scrolling: touch; }
.week-surface { min-width: 1120px; }
.week-days, .shift-band, .timeline-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(140px, 1fr)); }
.week-days { position: sticky; top: 0; z-index: 8; background: #fff; border-bottom: 1px solid var(--line); }
.week-corner { position: sticky; z-index: 10; left: 0; display: grid; place-items: center; color: var(--muted); background: #fff; font-size: 9px; letter-spacing: .08em; }
.day-head { width: 100%; min-height: 76px; padding: 10px 12px; border: 0; border-left: 1px solid var(--line); text-align: left; background: #fff; cursor: pointer; }
.day-head:hover { background: var(--sage); }
.day-head-top { display: flex; align-items: center; justify-content: space-between; }
.day-head b { font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.day-head strong { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font: 600 20px/1 var(--display); }
.day-head.is-today strong { color: #fff; background: var(--coral); }
.day-head.is-weekend { background: #faf6f3; }
.day-head.is-holiday { background: #fff2ee; }
.day-status { min-height: 17px; margin-top: 5px; overflow: hidden; color: var(--holiday); font-size: 9px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.shift-band { position: sticky; top: 77px; z-index: 7; background: #f8f9f6; border-bottom: 1px solid var(--line); }
.shift-label { position: sticky; z-index: 9; left: 0; padding: 12px 7px; display: grid; place-items: start center; color: var(--muted); background: #f8f9f6; font-size: 8px; letter-spacing: .08em; }
.shift-day { min-height: 74px; padding: 9px 10px; border: 0; border-left: 1px solid var(--line); text-align: left; background: transparent; cursor: pointer; }
.shift-day:hover { background: var(--sage); }
.shift-day .shift-hours { display: block; margin-bottom: 6px; color: var(--ink); font-size: 10px; font-weight: 700; }
.shift-day .working, .shift-day .off { display: block; overflow: hidden; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.shift-day .off { margin-top: 2px; color: #a45850; }
.shift-day .empty-shift { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; }
.shift-day .empty-shift b { font-size: 16px; font-weight: 400; }

.time-axis { position: sticky; z-index: 6; left: 0; height: calc(var(--slot) * 24); background: #fafaf7; box-shadow: 1px 0 var(--line); }
.time-axis span { position: absolute; right: 10px; transform: translateY(-6px); color: var(--muted); font-size: 9px; }
.time-axis span:first-child { transform: none; }
.day-column { position: relative; height: calc(var(--slot) * 24); border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--slot) - 1px), #e8ece8 calc(var(--slot) - 1px) var(--slot)); cursor: crosshair; }
.day-column.is-weekend { background-color: #fdfaf8; }
.day-column.is-holiday { background-color: #fff8f5; }
.day-column::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--slot) * 2 - 1px), #cfd7d1 calc(var(--slot) * 2 - 1px) calc(var(--slot) * 2)); }
.now-line { position: absolute; z-index: 5; left: -1px; right: 0; height: 1px; background: var(--coral); pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.appointment { position: absolute; z-index: 3; min-height: 24px; padding: 6px 7px; overflow: hidden; border: 0; border-left: 3px solid currentColor; border-radius: 6px; text-align: left; cursor: pointer; box-shadow: 0 3px 8px rgba(23,35,31,.08); }
.appointment:hover { z-index: 4; filter: brightness(.98); box-shadow: 0 6px 15px rgba(23,35,31,.14); }
.appointment.coral { color: #a23e2c; background: var(--coral-soft); }
.appointment.blue { color: #345f88; background: var(--blue-soft); }
.appointment.violet { color: #5e478b; background: var(--violet-soft); }
.appointment.olive { color: #596931; background: var(--olive-soft); }
.appointment.is-done { opacity: .78; }
.appointment.is-done::after { content: "✓"; position: absolute; top: 4px; right: 5px; font-size: 9px; font-weight: 800; }
.appointment.is-cancelled { opacity: .55; text-decoration: line-through; }
.appointment-time, .appointment-name, .appointment-service { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.appointment-time { font-size: 8px; font-weight: 700; }
.appointment-name { margin-top: 2px; color: var(--ink); font-size: 10px; font-weight: 700; }
.appointment-service { margin-top: 1px; color: var(--ink-2); font-size: 8px; }
.appointment.untimed { top: 4px !important; height: 30px !important; border-style: dashed; opacity: .95; }

.day-view { background: #fff; }
.day-overview { min-height: 104px; padding: 18px 22px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, .8fr); align-items: center; gap: 22px; border-bottom: 1px solid var(--line); background: linear-gradient(105deg, #fbfaf6 0 58%, #f1f5f0 58%); }
.day-identity { display: flex; align-items: center; gap: 16px; }
.back-week { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.day-identity strong { display: block; margin-top: 4px; font: 600 30px/1.05 var(--display); }
.day-identity small { display: block; min-height: 16px; margin-top: 5px; color: var(--holiday); font-size: 10px; font-weight: 700; }
.day-shift-card { width: 100%; min-height: 66px; padding: 12px 15px; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 5px 14px; border: 1px solid #d8e1da; border-radius: 12px; text-align: left; color: var(--ink); background: rgba(255,255,255,.82); cursor: pointer; }
.day-shift-card .eyebrow { grid-row: 1 / span 2; padding-top: 3px; color: var(--olive); }
.day-shift-card b { font-size: 11px; }
.day-shift-card span:last-child { color: var(--muted); font-size: 10px; line-height: 1.45; }
.day-scroll { max-height: calc(100svh - 292px); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.day-surface { min-width: 0; }
.day-untimed { padding: 10px 14px; display: flex; align-items: stretch; gap: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #fff; }
.day-untimed > span { padding: 9px 4px 0 0; flex: 0 0 auto; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.day-untimed button { min-width: 160px; padding: 8px 10px; display: grid; gap: 2px; border: 1px dashed #bdc8c1; border-radius: 8px; text-align: left; background: #f8faf7; cursor: pointer; }
.day-untimed b { font-size: 10px; }
.day-untimed small { color: var(--muted); font-size: 8px; }
.day-timeline { display: grid; grid-template-columns: 72px minmax(0, 1fr); }
.day-time-axis { position: sticky; z-index: 7; left: 0; height: calc(var(--day-slot) * 24); background: #fafaf7; box-shadow: 1px 0 var(--line); }
.day-time-axis span { position: absolute; right: 12px; transform: translateY(-7px); color: var(--ink-2); font-size: 10px; font-weight: 700; }
.day-time-axis span.is-half { color: #98a19c; font-size: 8px; font-weight: 500; }
.day-time-axis span:first-child { transform: none; }
.day-column-single { position: relative; height: calc(var(--day-slot) * 24); background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--day-slot) - 1px), #e4e9e5 calc(var(--day-slot) - 1px) var(--day-slot)); cursor: crosshair; }
.day-column-single::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--day-slot) * 2 - 1px), #cbd4ce calc(var(--day-slot) * 2 - 1px) calc(var(--day-slot) * 2)); }
.day-column-single.is-weekend { background-color: #fdfaf8; }
.day-column-single.is-holiday { background-color: #fff8f5; }
.day-appointment { min-height: 32px; padding: 7px 9px; border-left-width: 4px; border-radius: 8px; }
.day-appointment .appointment-time { font-size: 9px; }
.day-appointment .appointment-name { margin-top: 3px; font-size: 12px; }
.day-appointment .appointment-service { margin-top: 2px; font-size: 9px; }
.day-appointment .appointment-contact { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }

.month-view { padding: 0 18px 20px; }
.month-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); }
.month-weekdays span { padding: 14px 10px 10px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-align: right; }
.month-day { min-height: 132px; padding: 9px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; cursor: pointer; }
.month-day:nth-child(7n) { border-right: 1px solid var(--line); }
.month-day:nth-last-child(-n+7) { border-bottom: 1px solid var(--line); }
.month-day.is-outside { color: #aab1ad; background: #fafaf8; }
.month-day.is-weekend { background: #fdf9f7; }
.month-day.is-holiday { background: #fff4f0; }
.month-day.is-today .month-number { color: #fff; background: var(--coral); }
.month-day-head { width: 100%; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 0; text-align: left; color: inherit; background: transparent; cursor: pointer; }
.month-day-head:hover .month-number { box-shadow: 0 0 0 2px var(--sage); }
.month-number { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; font: 600 17px var(--display); }
.month-holiday { overflow: hidden; color: var(--holiday); font-size: 8px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.month-shift { margin: 7px 0 5px; color: var(--muted); font-size: 8px; }
.month-appointment { margin-top: 4px; padding: 4px 6px; overflow: hidden; border-radius: 5px; color: var(--ink); background: var(--sage); font-size: 8px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.month-more { margin-top: 5px; color: var(--muted); font-size: 8px; }

.clients-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 40px rgba(23,35,31,.06); }
.clients-head { min-height: 132px; padding: 25px 28px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--line); }
.clients-head h2 { margin: 8px 0 3px; font: 600 38px/1 var(--display); }
.clients-head p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.clients-layout { min-height: calc(100svh - 288px); display: grid; grid-template-columns: minmax(250px, 330px) 1fr; }
.client-sidebar { padding: 18px; border-right: 1px solid var(--line); background: #fafaf7; }
.search-field { position: relative; display: block; }
.search-field span { position: absolute; z-index: 1; left: 13px; top: 8px; color: var(--muted); font-size: 23px; }
.search-field input { padding-left: 39px; background: #fff; }
.client-count { margin: 16px 2px 9px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.client-list { display: grid; gap: 5px; max-height: calc(100svh - 390px); overflow: auto; }
.client-row { width: 100%; padding: 12px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; border: 0; border-radius: 10px; text-align: left; background: transparent; cursor: pointer; }
.client-row:hover, .client-row.is-active { background: var(--sage); }
.client-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--ink); font: 600 15px var(--display); }
.client-row b, .client-row small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.client-row b { font-size: 11px; }
.client-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.client-row > small { color: var(--coral); font-weight: 700; }
.client-profile { padding: clamp(24px, 4vw, 54px); min-width: 0; }
.client-empty { min-height: 420px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.client-empty > span { font-size: 50px; color: var(--coral); }
.client-empty h3 { margin: 13px 0 4px; color: var(--ink); font: 600 29px var(--display); }
.client-empty p { max-width: 360px; margin: 0; font-size: 12px; line-height: 1.6; }
.profile-top { padding-bottom: 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); }
.profile-person { display: flex; align-items: center; gap: 15px; }
.profile-person .client-avatar { width: 52px; height: 52px; font-size: 20px; }
.profile-person h3 { margin: 0; font: 600 35px/1 var(--display); }
.profile-person a, .profile-person p { margin: 4px 0 0; color: var(--muted); font-size: 11px; text-decoration: none; }
.profile-stats { display: flex; gap: 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.profile-stats div { display: grid; gap: 2px; }
.profile-stats b { font: 600 25px var(--display); }
.profile-stats span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.history-head { margin: 28px 0 14px; display: flex; align-items: center; justify-content: space-between; }
.history-head h4 { margin: 0; font: 600 22px var(--display); }
.history-list { display: grid; }
.history-item { padding: 15px 0; display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; border-top: 1px solid var(--line); }
.history-date { color: var(--muted); font-size: 10px; font-weight: 700; }
.history-copy b { display: block; font-size: 12px; }
.history-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.history-meta { display: flex; align-items: flex-start; gap: 7px; }
.history-status { padding: 4px 7px; border-radius: 999px; color: var(--muted); background: var(--sage); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.history-status.done { color: #42602b; background: var(--olive-soft); }
.history-status.cancelled { color: #91483f; background: var(--coral-soft); }
.history-edit { border: 0; color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.history-empty { padding: 30px 0; color: var(--muted); font-size: 12px; }

.new-appointment { position: fixed; z-index: 10; right: 28px; bottom: calc(24px + env(safe-area-inset-bottom)); min-height: 50px; padding: 0 19px; display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; color: #fff; background: var(--coral); font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 28px rgba(189,68,58,.27); }
.new-appointment span { font-size: 23px; font-weight: 400; }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; padding: 25px; display: grid; place-items: center; overflow: auto; background: rgba(10, 19, 16, .57); backdrop-filter: blur(5px); }
.modal { width: min(610px, 100%); max-height: calc(100svh - 50px); padding: 28px; overflow: auto; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.modal-small { width: min(500px, 100%); }
.modal-head { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; }
.modal-head h2 { margin: 7px 0 0; font: 600 37px/1 var(--display); }
.modal-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.close-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-wide { grid-column: 1 / -1; }
.color-field { margin: 0 0 18px; padding: 0; border: 0; }
.color-field legend { margin-bottom: 9px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
#colorOptions { display: flex; gap: 10px; }
#colorOptions label { margin: 0; display: block; }
#colorOptions input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#colorOptions span { width: 27px; height: 27px; display: block; border: 3px solid var(--paper); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
#colorOptions input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
#colorOptions .coral { background: var(--coral); }
#colorOptions .blue { background: var(--blue); }
#colorOptions .violet { background: var(--violet); }
#colorOptions .olive { background: var(--olive); }
.modal-actions { padding-top: 18px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.modal-actions > span { flex: 1; }
.button-accent { color: #fff; background: var(--coral); }
.button-quiet { border: 1px solid var(--line); background: transparent; }
.delete-button { padding: 0; border: 0; color: var(--holiday); background: none; font-size: 11px; font-weight: 700; cursor: pointer; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; padding: 12px 17px; transform: translate(-50%, 20px); border-radius: 9px; color: #fff; background: var(--ink); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  .app-header { grid-template-columns: auto 1fr auto; }
  .header-center h1 { min-width: 210px; font-size: 22px; }
  .user-button b { display: none; }
  .archive-button { width: 38px; padding: 0; justify-content: center; font-size: 0; }
}

@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-art { min-height: 215px; padding: 18px; }
  .salon-cover { width: 176px; padding: 7px; border-radius: 15px; box-shadow: 0 14px 40px rgba(50,55,54,.12); }
  .salon-cover-label { display: none; }
  .login-panel { min-height: auto; padding: 30px 24px 40px; }
  .login-box .brand { margin-bottom: 35px; }
  .login-box h1 { font-size: 44px; }
  .login-intro { margin-bottom: 25px; }
  .login-box form label { margin-bottom: 13px; }
  .app-header { min-height: 122px; padding: 12px 16px; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 10px; }
  .header-center { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .header-center h1 { min-width: 0; margin-left: auto; font-size: 20px; }
  .view-switch button { padding: 0 11px; }
  .user-button { display: none; }
  .header-actions { gap: 6px; }
  .app-main { padding: 12px; }
  .calendar-toolbar { min-height: 58px; padding: 12px 14px; }
  .calendar-toolbar > div:first-child p:last-child, .legend span:not(:first-child) { display: none; }
  .week-scroll { max-height: calc(100svh - 204px); }
  .week-surface { width: 1054px; min-width: 0; padding-right: calc(100vw - 210px); box-sizing: content-box; }
  .week-days, .shift-band, .timeline-grid { width: 1054px; grid-template-columns: 60px repeat(7, 142px); }
  .week-corner, .shift-label, .time-axis { left: 0; box-shadow: 2px 0 8px rgba(23,35,31,.09); }
  .time-axis { z-index: 12; background: #fff; }
  .time-axis span { right: 9px; color: var(--ink-2); font-size: 10px; font-weight: 700; }
  .day-overview { min-height: 0; padding: 14px; grid-template-columns: 1fr; gap: 12px; background: #fbfaf6; }
  .day-identity { gap: 12px; }
  .day-identity strong { font-size: 27px; }
  .day-shift-card { min-height: 60px; }
  .day-scroll { max-height: calc(100svh - 368px); }
  .day-timeline { grid-template-columns: 64px minmax(0, 1fr); }
  .day-time-axis { background: #fff; box-shadow: 2px 0 8px rgba(23,35,31,.09); }
  .day-time-axis span { right: 9px; font-size: 10px; }
  .day-appointment { padding: 6px 8px; }
  .month-view { padding: 0 10px 15px; overflow: auto; }
  .month-weekdays, .month-grid { min-width: 730px; }
  .new-appointment { right: 18px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .clients-head { padding: 20px; align-items: flex-start; }
  .clients-head h2 { font-size: 31px; }
  .clients-head p:last-child { display: none; }
  .clients-layout { min-height: calc(100svh - 270px); grid-template-columns: 1fr; }
  .client-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .client-list { max-height: 230px; }
  .client-profile { padding: 24px 18px; }
  .modal-backdrop { padding: 12px; align-items: end; }
  .modal { width: 100%; max-height: calc(100svh - 24px); padding: 22px 18px; border-radius: 18px 18px 8px 8px; }
}

@media (max-width: 460px) {
  .preview-access { align-items: flex-start; flex-direction: column; gap: 10px; }
  .brand b { font-size: 24px; }
  .header-center h1 { max-width: 178px; overflow: hidden; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; }
  .today-button { padding: 0 10px; }
  .view-switch button { padding: 0 8px; font-size: 10px; }
  .day-scroll { max-height: calc(100svh - 354px); }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: 1; }
  .modal-actions { flex-wrap: wrap; }
  .clients-head { gap: 12px; }
  .clients-head .button { min-width: 46px; padding: 0 12px; font-size: 0; }
  .clients-head .button::before { content: "+"; font-size: 20px; }
  .profile-top { flex-direction: column; }
  .profile-stats { gap: 20px; }
  .history-item { grid-template-columns: 74px 1fr; gap: 10px; }
  .history-meta { grid-column: 2; }
}

@media (max-width: 360px) {
  .app-header .brand b { display: none; }
  .header-center { gap: 6px; }
  .header-center h1 { width: calc(100vw - 205px); max-width: none; margin-left: auto; font-size: 14px; }
}

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