:root {
	--turquoise: #087f7a;
	--turquoise-dark: #075d59;
	--turquoise-soft: #dff2ef;
	--ivory: #f7f4ed;
	--paper: #fffdf8;
	--ink: #173432;
	--muted: #627573;
	--line: #d5e2df;
	--warning: #a96012;
	--danger: #a33a3a;
	--shadow: 0 18px 50px rgb(20 73 69 / 10%);
	--radius: 22px;
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ink);
	background: var(--ivory);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ivory); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% -20%, #d9f3ef 0, transparent 42%), var(--ivory); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #f0a33a; outline-offset: 3px; }
.skip-link { position: fixed; inset-inline-start: 1rem; top: -5rem; z-index: 999; padding: .75rem 1rem; color: white; background: var(--ink); }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.app-shell { width: min(1180px, 100%); min-height: 100vh; margin: 0 auto; }
.app-header { min-height: 82px; padding: 14px clamp(18px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: rgb(255 253 248 / 88%); border-bottom: 1px solid rgb(8 127 122 / 12%); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark, .avatar { display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--turquoise); font-weight: 800; letter-spacing: -.04em; }
.brand-mark { width: 48px; height: 48px; border-radius: 15px 15px 15px 5px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: .92rem; }
.brand-copy small { margin-top: 4px; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.language-select { min-height: 42px; border: 1px solid var(--line); border-radius: 13px; padding: 0 10px; background: white; color: var(--ink); }
main { padding: clamp(24px, 5vw, 60px) clamp(18px, 5vw, 64px) 110px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(2rem, 6vw, 4.7rem); line-height: .98; letter-spacing: -.055em; }
h2 { font-size: clamp(1.45rem, 3vw, 2.2rem); letter-spacing: -.035em; }
p { line-height: 1.65; }
.eyebrow { margin-bottom: 9px; color: var(--turquoise); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero { min-height: 360px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(210px, .65fr); align-items: center; gap: 40px; padding: clamp(32px, 7vw, 78px); border-radius: 34px; overflow: hidden; }
.panel-accent { color: white; background: linear-gradient(135deg, var(--turquoise-dark), var(--turquoise)); box-shadow: var(--shadow); }
.panel-accent .eyebrow { color: #aee6df; }
.hero p { max-width: 650px; margin-bottom: 0; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-symbol { position: relative; aspect-ratio: 1; border: 1px solid rgb(255 255 255 / 24%); border-radius: 50%; }
.hero-symbol::before, .hero-symbol::after, .hero-symbol span { content: ""; position: absolute; border-radius: 50%; background: rgb(255 255 255 / 15%); }
.hero-symbol::before { width: 42%; height: 42%; top: 10%; inset-inline-start: 9%; }
.hero-symbol::after { width: 31%; height: 31%; bottom: 12%; inset-inline-end: 7%; }
.hero-symbol span:nth-child(1) { width: 17%; height: 17%; top: 18%; inset-inline-end: 17%; }
.hero-symbol span:nth-child(2) { width: 24%; height: 24%; bottom: 18%; inset-inline-start: 12%; }
.hero-symbol span:nth-child(3) { width: 12%; height: 12%; inset: 44% auto auto 46%; background: white; }
.availability { width: fit-content; margin: 22px 0 42px; padding: 10px 15px; display: flex; align-items: center; gap: 9px; border-radius: 999px; background: white; box-shadow: 0 8px 22px rgb(20 73 69 / 7%); font-weight: 650; }
.availability-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 5px rgb(169 96 18 / 12%); }
.availability.is-open .availability-dot { background: #2b966e; box-shadow: 0 0 0 5px rgb(43 150 110 / 12%); }
.content-section { margin-top: 40px; }
.section-heading { margin-bottom: 25px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading h1, .section-heading h2 { margin-bottom: 0; }
.intent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.intent-card { min-height: 90px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 20px; color: var(--ink); text-align: start; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.intent-card:hover { transform: translateY(-2px); border-color: var(--turquoise); box-shadow: var(--shadow); }
.intent-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--turquoise-dark); background: var(--turquoise-soft); border-radius: 14px; font-size: 1.2rem; font-weight: 800; }
.safety-note, .notice { margin-top: 28px; padding: 20px 22px; border-inline-start: 4px solid var(--warning); background: #fff6e7; border-radius: 4px 16px 16px 4px; }
.safety-note p { margin: 7px 0 0; }
.button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 14px; font-weight: 750; transition: transform .15s ease, opacity .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; }
.button-primary { color: white; background: var(--turquoise); }
.button-secondary { color: var(--turquoise-dark); background: var(--turquoise-soft); }
.button-ghost { color: var(--turquoise-dark); background: transparent; border: 1px solid var(--line); }
.button-block { width: 100%; }
.text-button, .back-link { padding: 8px 0; color: var(--turquoise-dark); border: 0; background: transparent; font-weight: 700; }
.back-link { margin-bottom: 24px; font-size: 1rem; }
.form-page { max-width: 820px; margin: 0 auto; }
.form-page h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.form-card, .modal form { display: grid; gap: 18px; }
.form-card { padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
label { display: grid; gap: 8px; color: var(--ink); font-weight: 700; }
input, textarea, select { width: 100%; color: var(--ink); border: 1px solid #b9ceca; border-radius: 13px; background: white; }
input, select { min-height: 48px; padding: 0 13px; }
textarea { min-height: 120px; padding: 13px; resize: vertical; line-height: 1.45; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.conversation-list { display: grid; gap: 10px; }
.conversation-card { width: 100%; padding: 16px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; color: var(--ink); text-align: start; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.conversation-card:hover { border-color: var(--turquoise); }
.conversation-card.is-unread { border-color: var(--turquoise); background: #f4fffd; }
.conversation-card .unread-dot { display: inline-block; width: 9px; min-width: 9px; height: 9px; margin-inline-start: 6px; border-radius: 50%; background: var(--turquoise); vertical-align: middle; }
.avatar { width: 46px; height: 46px; border-radius: 15px; font-size: .78rem; }
.conversation-card span { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.conversation-card small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.conversation-card span:last-child { align-items: flex-end; }
.conversation-card em { color: var(--turquoise-dark); font-size: .74rem; font-style: normal; font-weight: 750; }
.conversation-card time { color: var(--muted); font-size: .72rem; }
.empty-state, .loading { padding: 50px 25px; text-align: center; color: var(--muted); border: 1px dashed #acc9c4; border-radius: var(--radius); }
.thread-page { min-height: calc(100vh - 220px); display: grid; grid-template-rows: auto auto minmax(300px, 1fr) auto auto; border: 1px solid var(--line); border-radius: 25px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.load-older-messages { justify-self: center; padding: 10px 18px; }
.thread-header { padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.thread-header .back-link { margin: 0 4px 0 0; font-size: 1.8rem; }
.thread-header h1 { margin: 0 0 2px; font-size: 1.05rem; letter-spacing: 0; }
.thread-header small { color: var(--muted); }
.message-list { max-height: calc(100vh - 350px); overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(#f7fbfa, #fffdf8); }
.message-bubble { width: min(76%, 620px); padding: 12px 15px 9px; border-radius: 18px 18px 18px 5px; background: white; box-shadow: 0 5px 18px rgb(20 73 69 / 8%); }
.message-bubble.is-own { align-self: flex-end; color: white; border-radius: 18px 18px 5px 18px; background: var(--turquoise); }
.message-bubble strong { font-size: .72rem; }
.message-bubble p { margin: 4px 0 5px; line-height: 1.45; }
.message-bubble time { display: block; color: var(--muted); font-size: .68rem; text-align: end; }
.message-bubble.is-own time { color: rgb(255 255 255 / 72%); }
.typing-indicator { padding: 7px 24px; color: var(--muted); font-size: .8rem; }
.composer { padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 48px; align-items: end; gap: 10px; border-top: 1px solid var(--line); background: white; }
.composer textarea { min-height: 48px; max-height: 150px; }
.composer .button { min-width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.profile-page { max-width: 780px; margin: 0 auto; }
.appointment-page { max-width: 820px; margin: 0 auto; }
.appointment-header { margin: 24px 0; }
.appointment-header h1 { margin-bottom: 14px; font-size: clamp(2rem, 6vw, 3.6rem); }
.appointment-header small { display: block; margin-top: 8px; color: var(--muted); }
.appointment-progress { height: 7px; overflow: hidden; border-radius: 999px; background: var(--turquoise-soft); }
.appointment-progress span { display: block; height: 100%; border-radius: inherit; background: var(--turquoise); transition: width .25s ease; }
.appointment-form { display: grid; gap: 20px; }
.appointment-actions { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; }
.input-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.input-with-unit > span { color: var(--muted); font-weight: 700; }
.form-hint { margin: -8px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.responsible-card { margin: 0; padding: 18px; display: grid; gap: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fbfdfc; }
.responsible-card legend { padding: 0 7px; color: var(--turquoise-dark); font-weight: 800; }
.secondary-responsible { border-radius: 16px; background: var(--turquoise-soft); }
.secondary-responsible summary { padding: 16px 18px; cursor: pointer; color: var(--turquoise-dark); font-weight: 750; }
.secondary-responsible .responsible-card { margin: 0 12px 12px; background: white; }
.appointment-review > p { color: var(--muted); }
.appointment-review dl { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.appointment-review dl > div { padding: 13px 16px; display: grid; grid-template-columns: minmax(130px, .42fr) 1fr; gap: 16px; border-bottom: 1px solid var(--line); }
.appointment-review dl > div:last-child { border-bottom: 0; }
.appointment-review dt { color: var(--muted); font-size: .82rem; font-weight: 700; }
.appointment-review dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.appointment-confirm { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); text-align: center; }
.captcha-container { min-height: 78px; margin: 22px auto; display: flex; justify-content: center; }
.profile-page h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.profile-page h2 { margin-top: 36px; }
.profile-card, .patient-card, .session-list > div { padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.profile-card { display: grid; gap: 5px; }
.notification-preference { gap: 14px; }
.notification-preference p { margin: 0; color: var(--muted); }
.notification-preference .button { justify-self: start; }
.install-offer { margin: 0 0 24px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #a8d8d2; border-radius: 17px; background: linear-gradient(135deg, var(--turquoise-soft), var(--paper)); }
.install-offer div { display: grid; gap: 5px; }
.install-offer p { margin: 0; color: var(--muted); }
.install-offer small { color: var(--turquoise-dark); }
.install-offer .button { flex: 0 0 auto; }
.profile-card small, .patient-card small { color: var(--muted); }
.patient-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.patient-card { display: flex; align-items: center; gap: 13px; }
.patient-card div { display: grid; gap: 4px; }
.session-list { display: grid; gap: 8px; margin-bottom: 24px; }
.session-list > div { display: flex; justify-content: space-between; }
.session-list strong { color: #2b966e; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 18px; display: grid; place-items: center; background: rgb(10 35 33 / 60%); backdrop-filter: blur(5px); }
.modal { position: relative; width: min(480px, 100%); max-height: 92vh; overflow-y: auto; padding: 32px; border-radius: 24px; background: var(--paper); box-shadow: 0 30px 90px rgb(0 0 0 / 24%); }
.modal h2 { margin-bottom: 24px; }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--turquoise-soft); font-size: 1.4rem; }
.toast-region { position: fixed; z-index: 200; inset-inline-end: 18px; bottom: 20px; display: grid; gap: 8px; }
.toast { width: min(370px, calc(100vw - 36px)); padding: 14px 18px; color: white; border-radius: 14px; background: var(--ink); box-shadow: var(--shadow); }
.toast-error { background: var(--danger); }
.network-status { position: sticky; top: 82px; z-index: 15; padding: 10px 18px; color: white; text-align: center; background: var(--warning); }
.bottom-nav { position: fixed; z-index: 30; bottom: max(10px, env(safe-area-inset-bottom)); inset-inline-start: 50%; transform: translateX(-50%); width: min(430px, calc(100% - 24px)); padding: 7px; grid-template-columns: repeat(3, 1fr); gap: 4px; border: 1px solid rgb(8 127 122 / 15%); border-radius: 18px; background: rgb(255 253 248 / 94%); box-shadow: 0 14px 50px rgb(20 73 69 / 20%); backdrop-filter: blur(18px); }
.bottom-nav:not([hidden]) { display: grid; }
.bottom-nav button { min-height: 45px; color: var(--muted); border: 0; border-radius: 13px; background: transparent; font-size: .78rem; font-weight: 750; }
.bottom-nav button:hover { color: var(--turquoise-dark); background: var(--turquoise-soft); }

[dir="rtl"] .hero-symbol { transform: scaleX(-1); }
[dir="rtl"] .safety-note, [dir="rtl"] .notice { border-inline-start-width: 4px; border-radius: 16px 4px 4px 16px; }
[dir="rtl"] .message-bubble { border-radius: 18px 18px 5px 18px; }
[dir="rtl"] .message-bubble.is-own { border-radius: 18px 18px 18px 5px; }

@media (max-width: 720px) {
	.app-header { min-height: 70px; padding: 10px 14px; }
	.brand-mark { width: 42px; height: 42px; }
	.brand-copy strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.brand-copy small { display: none; }
	.header-actions .button { padding-inline: 11px; font-size: .78rem; }
	main { padding: 20px 14px 100px; }
	.hero { min-height: 340px; grid-template-columns: 1fr; padding: 30px 24px; border-radius: 25px; }
	.hero-symbol { display: none; }
	.hero h1 { font-size: clamp(2.5rem, 13vw, 4.2rem); }
	.intent-grid { grid-template-columns: 1fr; }
	.intent-card { min-height: 76px; }
	.form-row, .patient-list { grid-template-columns: 1fr; }
	.appointment-review dl > div { grid-template-columns: 1fr; gap: 4px; }
	.appointment-actions .button { flex: 1 1 0; }
	.install-offer { align-items: stretch; flex-direction: column; }
	.install-offer .button { align-self: start; }
	.section-heading { align-items: flex-start; flex-direction: column; }
	.section-heading .button { width: 100%; }
	.conversation-card { grid-template-columns: 44px minmax(0, 1fr); }
	.conversation-card span:last-child { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; }
	.thread-page { min-height: calc(100vh - 130px); margin: -6px; border-radius: 18px; }
	.message-list { max-height: calc(100vh - 300px); padding: 16px 12px; }
	.message-bubble { width: 88%; }
	.modal { padding: 28px 22px; }
}

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