/* Экраны кабинета, окна, образцы документов, напоминание. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.strong { font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.muted { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.text, .text-dark { margin: 0; }
.push-down { margin-top: auto; }
.card-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.title-block { display: flex; flex-direction: column; gap: 5px; }
.eyebrow-soft { color: var(--muted-2); }
.text-soft { color: #4d7099; }
.link-ok { color: var(--ok); text-decoration: underline; }
.link-center { align-self: center; text-align: center; padding: 6px; color: var(--muted); }
.btn-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.demo-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); padding: 10px 14px; border-radius: 12px; background: var(--soft); }
.soft-box { padding: 18px 20px; border-radius: 16px; background: var(--soft); font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.stack-sm { gap: 24px; }

/* Вход */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-inner { width: 100%; max-width: 424px; display: flex; flex-direction: column; gap: 24px; }
.login-logo { display: flex; align-items: center; justify-content: center; gap: 12px; }
.login-logo .logo-name { font-size: 25px; }
.login-logo .logo-sub { font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-head { display: flex; flex-direction: column; gap: 7px; }
.login-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 23px; color: var(--ink); }
.field-input { width: 100%; border: 1px solid var(--border); border-radius: 16px; padding: 15px 18px; font-size: 17px; font-family: inherit; color: var(--ink); background: #fff; outline: none; }
.field-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(42, 127, 212, 0.14); }
.code-input { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.4em; }
.alert-bad { padding: 13px 15px; border-radius: 14px; background: #f9ecec; font-size: 14px; line-height: 1.5; color: var(--bad); }
.login-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.hint-box { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 12px 15px; border-radius: 14px; background: var(--soft); font-size: 13.5px; color: var(--muted); }
.hint-box b { color: var(--ink); letter-spacing: 0.08em; }
.login-foot { text-align: center; }

/* Главная */
.hero { flex-direction: row; flex-wrap: wrap; gap: 36px; align-items: stretch; }
.hero-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-side { flex: 0 1 320px; min-width: 0; background: var(--soft); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.hero-none { align-items: center; }
.hero-none .hero-main { gap: 14px; }
.hero-none .hero-side { gap: 11px; }
.hero-label { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.hero-when { display: flex; flex-direction: column; gap: 4px; }
.hero-date { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.15; color: var(--ink); }
.hero-time { font-family: var(--font-display); font-weight: 300; font-size: 34px; line-height: 1.15; color: var(--blue); }
.hero-when.is-struck .hero-date, .hero-when.is-struck .hero-time { color: #9db0c4; text-decoration: line-through; text-decoration-thickness: 1px; }
.info-list { display: flex; flex-direction: column; gap: 11px; padding-top: 15px; border-top: 1px solid #eaf1f8; }
.info-list-wide { border-top: none; padding-top: 0; gap: 13px; }
.info-row { display: flex; gap: 14px; align-items: baseline; }
.info-label { flex: 0 0 104px; font-size: 14px; color: var(--muted); }
.info-list-wide .info-label { flex-basis: 168px; }
.info-value { font-size: 15px; color: var(--ink-2); min-width: 0; }
.info-value.is-strong { font-weight: 600; color: var(--ink); }
.plan-count { display: flex; align-items: baseline; gap: 10px; }
.plan-num { font-family: var(--font-display); font-size: 30px; color: var(--ink); line-height: 1; }
.plan-bars { display: flex; gap: 5px; }
.plan-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--track); }
.plan-bar.is-done { background: var(--blue); }
.tax-shortcut { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 22px 28px; }
.tax-shortcut-text { display: flex; flex-direction: column; gap: 6px; }

/* Документы */
.doc-list { display: flex; flex-direction: column; }
.doc-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.doc-name { flex: 1 1 auto; min-width: 0; text-align: left; border: none; background: transparent; padding: 0; font-family: inherit; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.doc-name:hover .doc-title { color: var(--blue); }
.doc-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.doc-meta { font-size: 12.5px; color: var(--muted); }
.doc-date { flex: 0 0 auto; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.doc-list-compact .doc-title { font-size: 14.5px; }
.doc-row-static { border-top: none; padding: 14px 16px; border-radius: 16px; background: var(--soft); }
.doc-row-static .doc-name { cursor: default; }

/* История */
.year-group { display: flex; flex-direction: column; gap: 10px; }
.year-label { font-family: var(--font-display); font-size: 15px; font-weight: 500; color: var(--muted); padding-left: 4px; }
.visit-row { width: 100%; border: none; cursor: pointer; text-align: left; font-family: inherit; background: #fff; border-radius: 22px; padding: 22px 26px; box-shadow: 0 1px 2px rgba(22, 50, 79, 0.04), 0 12px 30px -26px rgba(22, 50, 79, 0.4); display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; transition: box-shadow 0.15s; }
.visit-row:hover { box-shadow: 0 1px 2px rgba(22, 50, 79, 0.06), 0 16px 34px -22px rgba(22, 50, 79, 0.5); }
.visit-day { flex: 0 0 76px; display: flex; flex-direction: column; gap: 1px; }
.visit-day-num { font-family: var(--font-display); font-size: 25px; color: var(--ink); line-height: 1.1; }
.visit-day-month { font-size: 13px; color: var(--muted); }
.visit-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.visit-title { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.visit-meta { font-size: 14px; color: var(--muted); }
.visit-more { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 14px; font-weight: 600; }
.empty-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px; padding: 34px 28px; }
.empty-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 9px; }

/* Карточка приёма */
.proc-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--line-2); }
.proc-name { flex: 1 1 220px; min-width: 0; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.proc-price { flex: 0 0 96px; text-align: right; font-size: 15px; color: var(--muted); white-space: nowrap; }
.proc-total { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; padding: 14px 0 8px; }
.proc-sum { font-family: var(--font-display); font-size: 22px; color: var(--ink); white-space: nowrap; }
.next-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 20px; }
.next-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 7px; }
.doctor { display: flex; gap: 14px; align-items: center; }
.avatar { flex: 0 0 48px; height: 48px; border-radius: 50%; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 16px; color: var(--blue); }
.doctor-text { display: flex; flex-direction: column; gap: 3px; }

/* Профиль */
.channel { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; padding: 16px 18px; border-radius: 18px; }
.channel-on { background: var(--ok-bg); color: var(--ok-icon); }
.channel-text { flex: 1 1 180px; min-width: 0; font-size: 15px; font-weight: 600; color: var(--ok); }
.channel-off { flex-direction: column; align-items: stretch; gap: 12px; background: var(--soft); }
.switch-list { display: flex; flex-direction: column; }
.switch-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line-2); }
.switch-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.switch { flex: 0 0 auto; position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--track); border: none; cursor: pointer; padding: 0; transition: background-color 0.15s; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(22, 50, 79, 0.2); transition: transform 0.15s; }
.switch.is-on { background: var(--blue); }
.switch.is-on .switch-knob { transform: translateX(20px); }
.contact { display: flex; flex-direction: column; gap: 4px; }
.link-btn .icon { vertical-align: -3px; }

/* Справка и выбор времени */
.narrow { max-width: 640px; }
.form-card { gap: 0; }
.form-block { display: flex; flex-direction: column; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line-2); }
.form-block:first-child { padding-top: 0; border-top: none; }
.form-block:last-child { padding-bottom: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.choice-col { display: flex; flex-direction: column; gap: 8px; }
.choice { border: 1px solid var(--line); border-radius: 14px; padding: 12px 20px; background: #fff; cursor: pointer; font-family: var(--font-display); font-size: 16px; color: var(--ink); text-align: left; transition: border-color 0.15s, background-color 0.15s; }
.choice:hover { border-color: var(--border-hover); }
.choice.is-active { background: var(--blue-soft); border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.choice-wide { width: 100%; font-family: var(--font); font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.sum-box { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; justify-content: space-between; padding: 15px 18px; border-radius: 16px; background: var(--soft); }
.sum { font-family: var(--font-display); font-size: 20px; color: var(--ink); white-space: nowrap; }
.slots-card { gap: 0; }
.slot-day { display: flex; flex-direction: column; gap: 3px; min-width: 96px; padding: 12px 16px; font-family: var(--font); }
.slot-day.is-empty .slot-date { color: var(--muted); }
.slot-date { font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.slot-time { padding: 13px 20px; }
.slot-footer { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line-2); }
.slot-picked { flex: 1 1 220px; display: flex; flex-direction: column; gap: 3px; }

/* Окна */
body.has-overlay { overflow: hidden; }
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15, 38, 63, 0.42); display: flex; align-items: center; justify-content: center; padding: 32px; animation: fade-in 0.18s ease-out; }
.dialog { width: min(520px, 100%); max-height: 100%; overflow: auto; background: #fff; border-radius: 26px; padding: 28px; display: flex; flex-direction: column; gap: 20px; outline: none; animation: pop-in 0.2s ease-out; }
.dialog-wide { width: min(720px, 100%); }
.dialog-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.dialog-head > div { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.dialog-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--ink); line-height: 1.25; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Образец документа */
.sheet-frame { background: var(--soft); border-radius: 18px; padding: 18px; max-height: 58vh; overflow: auto; }
.sheet { position: relative; overflow: hidden; background: #fff; border-radius: 6px; padding: 30px 32px; box-shadow: 0 1px 3px rgba(22, 50, 79, 0.12); color: #1c2733; font-size: 13.5px; line-height: 1.55; }
.sheet-watermark { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-family: var(--font-display); font-size: 74px; font-weight: 600; letter-spacing: 0.1em; color: rgba(42, 127, 212, 0.07); pointer-events: none; white-space: nowrap; }
.sheet-head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 2px solid var(--blue); }
.sheet-org { font-family: var(--font-display); font-size: 16px; font-weight: 500; color: var(--ink); }
.sheet-small { font-size: 11.5px; color: #5d6b78; line-height: 1.5; }
.sheet-body h3 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.3; color: var(--ink); }
.sheet-body h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #5d6b78; }
.sheet-body p { margin: 0 0 8px; }
.sheet-body ul, .sheet-body ol { margin: 0; padding-left: 20px; }
.sheet-line { display: flex; gap: 12px; justify-content: space-between; padding: 5px 0; border-bottom: 1px dotted #d3dde7; }
.sheet-line > span:first-child { color: #5d6b78; }
.sheet-line > span:last-child { text-align: right; }
.sheet-table { margin: 8px 0; }
.sheet-stages li { padding: 5px 0; }
.sheet-stages li span { display: block; font-size: 12px; color: #5d6b78; }
.sheet-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 12px; border-top: 1px solid #d3dde7; font-size: 12.5px; color: #5d6b78; }
.sheet-image { padding: 12px; background: #0f1b28; }
.xray { display: block; width: 100%; height: auto; }
.sheet-info { display: flex; flex-direction: column; gap: 8px; }
#print-root { display: none; }

/* Напоминание в телефоне */
.phone { align-self: center; width: min(340px, 100%); border-radius: 30px; padding: 10px; background: #16324f; box-shadow: 0 24px 50px -30px rgba(22, 50, 79, 0.8); }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 22px 22px 0 0; background: #fff; font-size: 14px; color: var(--ink); }
.phone-top > span { display: flex; flex-direction: column; }
.phone-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.phone-chat { display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 20px; border-radius: 0 0 22px 22px; min-height: 250px; justify-content: flex-end; }
.tg-chat { background: linear-gradient(160deg, #cfe3f2, #e3eedc); }
.bubble { position: relative; max-width: 92%; padding: 10px 13px 22px; border-radius: 16px 16px 16px 4px; background: #fff; font-size: 14px; line-height: 1.45; color: #1c2733; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.bubble-time { position: absolute; right: 10px; bottom: 5px; font-size: 11px; color: #8a9aab; }
.tg-keys { display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.tg-key { border: none; border-radius: 10px; padding: 10px; background: rgba(33, 63, 94, 0.34); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.tg-key:hover { background: rgba(33, 63, 94, 0.5); }
.sms-chat { background: #f2f4f7; }
.sms-avatar { width: 30px; height: 30px; border-radius: 50%; background: #9aa9b8; color: #fff; display: flex !important; align-items: center; justify-content: center; font-weight: 700; }
.sms-bubble { background: #e5e8ee; }

@media print {
  @page { margin: 12mm; }
  body.printing { background: #fff; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
  body.printing .sheet { box-shadow: none; border-radius: 0; padding: 0; font-size: 12pt; }
  body.printing .sheet-watermark { color: rgba(42, 127, 212, 0.1); }
}
