/* Оформление кабинета и форм. Цвета — в theme.css. */
.app-page { min-height: 100svh; display: flex; flex-direction: column; }
.app-main { flex: 1; padding: 52px 0 64px; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 600; line-height: 1.1; letter-spacing: -1.8px; overflow-wrap: anywhere; }
h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.6px; }
h3 { font-size: 18px; font-weight: 500; }
.muted, .page-heading p { color: var(--muted); line-height: 1.6; }
.eyebrow { margin: 0 0 16px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }
.page-heading { margin-bottom: 32px; }
.page-heading p { margin: 12px 0 0; overflow-wrap: anywhere; }
.toolbar, .link-actions, .section-heading, .modal-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar { padding: 20px; margin-bottom: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 2); box-shadow: var(--surface-shadow); }
.app-main .card--default { border: 1px solid var(--border); }
.section-heading { justify-content: space-between; margin-bottom: 20px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.client-card { padding: 24px; }
.client-cancel { margin: 24px 0 0; }
.booking-telegram { margin-bottom: 0; }
.booking-telegram .link-actions { margin: 16px 0; }
.client-card h2 { margin: 0 0 20px; overflow-wrap: anywhere; }
.client-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; margin: 0; }
.client-details dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.client-details dd { margin: 0; overflow-wrap: anywhere; }
.link-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; }
.link-copy { min-width: 0; }
.link-title { font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }
.link-url { display: block; margin: 8px 0 12px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.link-actions { flex-shrink: 0; }
.chip { font-size: 11px; }
.empty-state { align-items: center; padding: 48px 24px; text-align: center; }
.empty-state p { margin: 12px auto 24px; max-width: 440px; color: var(--muted); line-height: 1.6; }
.empty-icon { display: block; margin-bottom: 20px; font-size: 38px; }
.form-card { max-width: 620px; margin: auto; padding: 36px; }
.booking-page .app-page { max-width: 700px; }
.booking-page .app-main { flex: initial; padding: clamp(16px, 4vw, 40px) 0 0; }
.booking-credit { margin: 24px 0 32px; text-align: center; font-size: 13px; color: var(--muted); }
.booking-credit a { font-weight: 600; color: var(--accent); }
.booking-credit a:hover { text-decoration: underline; text-underline-offset: 3px; }
.phone-input { display: flex; align-items: center; gap: 10px; }
.phone-prefix { flex-shrink: 0; font-weight: 500; }
.phone-number, .address-value { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; }
.phone-input:focus-within, .address-input:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.stack-form { display: grid; gap: 20px; }
.stack-form > .button { width: 100%; }
.field { display: grid; gap: 8px; min-width: 0; font-size: 13px; }
.booking-times { padding: 0; border: 0; }
.booking-timezone { margin: 8px 0 16px; font-size: 12px; }
.time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.time-slot { position: relative; cursor: pointer; }
.time-slot span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--border); border-radius: var(--field-radius); background: var(--surface); font-size: 14px; }
.time-slot:hover span { background: var(--surface-secondary); }
.time-slot input:checked + span { background: var(--accent); color: var(--accent-foreground); border-color: var(--accent); }
.time-slot input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.input { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.native-select { appearance: auto; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-label { position: relative; display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 28px; font-size: 13px; cursor: pointer; }
.native-control { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.check-label:has(input:focus-visible) > [aria-hidden] { outline: 2px solid var(--focus); outline-offset: 3px; }
.checkbox:has(input:checked) .checkbox__control::before { opacity: 1; scale: 1; }
.checkbox__indicator { color: var(--accent-foreground); opacity: 0; }
.checkbox:has(input:checked) .checkbox__indicator { opacity: 1; }
.switch:has(input:checked) .switch__control { background: var(--accent); }
.switch:has(input:checked) .switch__thumb { margin-inline-start: calc(100% - 1.5rem); background: var(--accent-foreground); }
.days-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
fieldset { min-width: 0; }
legend { font-size: 13px; font-weight: 500; }
.service-row { padding: 20px; border: 1px solid var(--border); border-radius: 20px; }
.service-row legend { padding: 0 6px; }
.service-row .field, .service-row > .button { margin-top: 12px; }
[data-services-list] { display: grid; gap: 16px; }
.address-input { display: flex; align-items: center; gap: 0; }
.address-input > span { flex-shrink: 0; color: var(--muted); }
.app-dialog { position: fixed; inset: 0; z-index: var(--z-index-overlay); width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 16px; border: 0; background: var(--backdrop); }
.app-dialog[open] { display: grid; place-items: center; }
.app-dialog::backdrop { background: transparent; }
body:has(.app-dialog[open]) { overflow: hidden; }
.modal__dialog { width: 100%; max-width: 620px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 32px; color: var(--foreground); }
.modal-heading { justify-content: space-between; flex-wrap: nowrap; margin-bottom: 26px; }
.modal-heading h2 { margin: 0; }
.modal-heading .button { flex-shrink: 0; }
.notice { margin-bottom: 24px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; line-height: 1.6; }
.connect-state { padding: 24px; margin-bottom: 24px; background: var(--surface-secondary); border-radius: 16px; }
.connect-state h3 { margin: 16px 0 8px; }
.connect-state p { margin: 0; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
[role="status"]:not(:empty) { margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--surface-secondary); line-height: 1.6; overflow-wrap: anywhere; }
.error-code { margin-bottom: 16px; font-size: 80px; line-height: 1; letter-spacing: -5px; }
.text-link { text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
form[aria-busy="true"] { cursor: progress; }
@media (max-width: 640px) {
    .app-main { padding: 32px 0 40px; }
    .app-page .site-header nav { gap: 2px; }
    .app-page .site-header .button { padding-inline: 10px; }
    .toolbar { padding: 16px; gap: 10px; }
    .toolbar .button { flex: 1 1 140px; }
    .link-row { align-items: flex-start; flex-direction: column; padding: 20px; gap: 16px; }
    .link-actions { width: 100%; }
    .form-card { padding: 24px 20px; }
    .modal__dialog { padding: 24px 20px; }
    .modal-heading h2 { font-size: 22px; }
    .field-pair { grid-template-columns: 1fr; }
    .service-row { padding: 16px; }
}
