/* Hair Solution Aftercare — patient app. Mobile first. Brand: navy, indigo, gold, Poppins. */
@font-face { font-family: "HS Poppins"; src: url("../../preventivi/assets/pdf/fonts/Poppins_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "HS Poppins"; src: url("../../preventivi/assets/pdf/fonts/Poppins_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "HS Poppins"; src: url("../../preventivi/assets/pdf/fonts/Poppins_600SemiBold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }
/* Ink, background, lines, gold and navy come from hub/tokens.css (loaded first).
   The accent can be changed in the Aftercare settings; these are its defaults. */
:root {
	--hs-accent: var(--hs-indigo);
	--hs-accent-soft: var(--hs-lav);
	--hs-accent-tint: var(--hs-indigo-tint);
	--hs-accent-line: var(--hs-indigo-line);
	--hs-warm-bg: #FFF6E8;
	--hs-warm-line: #F1DDB8;
	--hs-warm-ink: #6B4A12;
	--hs-red-bg: #FDF0EE;
	--hs-red-line: #F2D2CC;
	--hs-red-ink: #7A2E22;
	--hs-radius: 18px;
	--hs-font: "HS Poppins", Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.hs-body-root {
	margin: 0;
	background: var(--hs-bg);
	color: var(--hs-ink);
	font-family: var(--hs-font);
	font-size: 16px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--hs-accent); }
button, input { font: inherit; color: inherit; }
h1, h2 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
small { font-size: 13px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--hs-accent); outline-offset: 2px; }

.hs-muted { color: var(--hs-muted); }
.hs-center { text-align: center; }
.hs-small { font-size: 12px; }
.hs-eyebrow {
	margin: 4px 0 0;
	font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	color: var(--hs-muted);
}
.hs-kicker { font-size: 12px; font-weight: 700; color: var(--hs-accent); }

/* Logo + language switch */
.hs-logo {
	flex: none; width: 38px; height: 38px; border-radius: 10px;
	background: var(--hs-accent); color: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 13px;
}
.hs-logo--light { background: #fff; color: var(--hs-accent); }
.hs-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.hs-lang { display: flex; border: 1px solid var(--hs-line); border-radius: 999px; padding: 3px; background: #fff; }
.hs-lang a, .hs-lang button {
	border: 0; background: transparent; color: var(--hs-muted);
	font-size: 12px; font-weight: 700; padding: 0 10px; min-height: 32px; min-width: 36px;
	border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
	text-decoration: none; cursor: pointer;
}
.hs-lang .is-on { background: var(--hs-ink); color: #fff; }

/* Buttons */
.hs-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 50px; padding: 0 18px; border-radius: 12px; border: 0;
	font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.hs-btn--primary { background: var(--hs-accent); color: #fff; }
.hs-btn--white { background: #fff; color: var(--hs-accent); }
.hs-btn--soft { background: var(--hs-accent-tint); color: var(--hs-accent); border: 1px solid var(--hs-accent-line); }
.hs-btn--big { min-height: 56px; font-size: 16px; border-radius: 14px; width: 100%; }
.hs-btn.is-done { background: var(--hs-accent-soft); color: var(--hs-accent); border: 1px solid var(--hs-accent-line); }
.hs-btn:disabled { opacity: .6; }
.hs-iconbtn {
	width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--hs-line);
	display: inline-flex; align-items: center; justify-content: center; color: var(--hs-muted); background: #fff;
}

/* ---------------- Login ---------------- */
.hs-login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.hs-login__hero {
	background: var(--hs-accent); color: #fff;
	padding: calc(22px + env(safe-area-inset-top)) 22px 34px;
	border-radius: 0 0 28px 28px;
	display: flex; flex-direction: column; gap: 14px;
}
.hs-login__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hs-login__hero .hs-lang { background: transparent; border-color: rgba(255,255,255,.4); }
.hs-login__hero .hs-lang a { color: #fff; }
.hs-login__hero .hs-lang .is-on { background: #fff; color: var(--hs-accent); }
.hs-login__hero h1 { font-size: 28px; line-height: 1.15; }
.hs-login__hero p { margin: 0; color: rgba(255,255,255,.86); font-size: 15px; }
.hs-login__form {
	padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
	display: flex; flex-direction: column; gap: 16px;
	width: 100%; max-width: 460px; margin: 0 auto;
}
.hs-login__form h2 { font-size: 22px; }
.hs-login__form > p { margin: -10px 0 0; }
.hs-field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; }
.hs-field input {
	height: 52px; padding: 0 14px; font-size: 17px; font-weight: 400;
	border: 1px solid #CFCBC1; border-radius: 12px; background: #fff; color: var(--hs-ink);
	width: 100%;
}
.hs-field input:focus { border-color: var(--hs-accent); outline: 2px solid var(--hs-accent-line); }
.hs-field small { font-weight: 400; color: var(--hs-muted); }
.hs-alert {
	display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
	background: var(--hs-red-bg); border: 1px solid var(--hs-red-line); color: var(--hs-red-ink); font-size: 14px;
}
.hs-alert svg { flex: none; margin-top: 1px; }

@media (min-width: 900px) {
	.hs-login { flex-direction: row; }
	.hs-login__hero { flex: 0 0 44%; border-radius: 0; padding: 48px; justify-content: center; }
	.hs-login__top { position: absolute; top: 40px; left: 48px; width: calc(44% - 96px); }
	.hs-login__hero h1 { font-size: 40px; }
	.hs-login__hero p { font-size: 17px; max-width: 460px; }
	.hs-login__form { align-self: center; background: #fff; border: 1px solid var(--hs-line); border-radius: 20px; padding: 36px; margin: 40px auto; }
}

/* ---------------- App shell ---------------- */
.hs-app { min-height: 100vh; min-height: 100dvh; }
.hs-top {
	position: sticky; top: 0; z-index: 20;
	background: #fff; border-bottom: 1px solid var(--hs-line);
	padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.hs-top__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hs-top__text { display: flex; flex-direction: column; min-width: 0; }
.hs-top__text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-top__text small { font-size: 12px; color: var(--hs-muted); }
.hs-top__right { display: flex; align-items: center; gap: 8px; flex: none; }

.hs-nav {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	background: #fff; border-top: 1px solid var(--hs-line);
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
	padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.hs-nav button {
	display: flex; flex-direction: column; align-items: center; gap: 3px;
	border: 0; border-radius: 12px; background: transparent; color: var(--hs-muted);
	font-size: 12px; font-weight: 600; min-height: 54px; padding: 6px 0; cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.hs-nav button.is-on { background: var(--hs-accent-soft); color: var(--hs-accent); }

.hs-layout { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.hs-side { display: none; }
.hs-main { min-width: 0; }
.hs-tab { display: none; flex-direction: column; gap: 16px; }
.hs-tab.is-on { display: flex; }
.hs-head { display: flex; flex-direction: column; gap: 4px; }

/* Cards */
.hs-card {
	background: var(--hs-card); border: 1px solid var(--hs-line); border-radius: var(--hs-radius);
	padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.hs-progress__row { display: flex; align-items: baseline; justify-content: space-between; }
.hs-progress__row strong { font-size: 20px; }
.hs-progress__row span { font-size: 14px; font-weight: 700; color: var(--hs-accent); }
.hs-progress small { display: flex; align-items: center; gap: 6px; color: var(--hs-muted); }
.hs-bar { height: 8px; background: var(--hs-line-2); border-radius: 999px; overflow: hidden; }
.hs-bar span { display: block; height: 100%; background: var(--hs-accent); border-radius: 999px; }

.hs-days { display: flex; flex-direction: column; gap: 8px; }
.hs-days__strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.hs-days__strip::-webkit-scrollbar { display: none; }
.hs-chip {
	flex: none; width: 40px; height: 48px; border-radius: 12px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 15px; font-weight: 700;
	background: #fff; border: 1px solid var(--hs-line); color: var(--hs-muted);
}
.hs-chip.is-past { background: #e4e6f7; border-color: #e4e6f7; color: var(--hs-accent); }
.hs-chip.is-today { background: var(--hs-accent); border-color: var(--hs-accent); color: #fff; }
.hs-chip.is-done:not(.is-today) { background: var(--hs-accent-tint); }

.hs-note {
	display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px;
	background: var(--hs-warm-bg); border: 1px solid var(--hs-warm-line); color: var(--hs-warm-ink);
	font-size: 14px; font-weight: 500;
}
.hs-note svg { flex: none; margin-top: 1px; }
.hs-note--ok { background: var(--hs-accent-tint); border-color: var(--hs-accent-line); color: #0B4A48; }

/* Video */
.hs-video {
	position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--hs-radius);
	overflow: hidden; background: var(--hs-ink);
}
.hs-video iframe, .hs-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.hs-video--empty, .hs-video--locked {
	display: flex; align-items: center; justify-content: center; text-align: center;
	background: radial-gradient(120% 120% at 90% 10%, #2e3480, #11142e 75%);
	color: #d8b77c; font-size: 14px; font-weight: 600; padding: 16px;
}
.hs-video--locked span { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.hs-steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.55; color: var(--hs-ink-2); }
.hs-text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--hs-ink-2); }
.hs-warn {
	display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45;
	background: var(--hs-red-bg); border: 1px solid var(--hs-red-line); color: var(--hs-red-ink);
}
.hs-warn svg { flex: none; margin-top: 2px; }

/* Checklist */
.hs-check { display: flex; align-items: center; gap: 12px; min-height: 46px; font-size: 16px; cursor: pointer; }
.hs-check input { flex: none; width: 24px; height: 24px; accent-color: var(--hs-accent); margin: 0; }
.hs-check input:checked + span { color: var(--hs-muted); text-decoration: line-through; }

/* Photo */
.hs-photo {
	display: flex; align-items: center; gap: 14px; padding: 16px;
	border-radius: var(--hs-radius); background: var(--hs-accent-tint);
}
.hs-photo > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; }
.hs-photo > div span { font-size: 13px; color: var(--hs-ink-2); }
.hs-photo__status { font-size: 13px; font-style: normal; font-weight: 700; color: var(--hs-accent); }
.hs-photo__status:empty { display: none; }
.hs-photo .hs-btn { flex: none; min-height: 46px; }

/* Steps list */
.hs-phases { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--hs-line); border-radius: 16px; padding: 8px; }
.hs-phase {
	display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
	padding: 12px; border-radius: 12px; border: 1px solid transparent; background: transparent;
	min-height: 62px; cursor: pointer;
}
.hs-phase.is-current { background: var(--hs-accent-soft); border-color: var(--hs-accent-line); }
.hs-phase.is-locked { opacity: .72; }
.hs-phase__dot {
	flex: none; width: 32px; height: 32px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 700; background: var(--hs-line-2); color: var(--hs-muted);
}
.hs-phase.is-done .hs-phase__dot { background: var(--hs-accent); color: #fff; }
.hs-phase.is-current .hs-phase__dot { background: #fff; color: var(--hs-accent); border: 2px solid var(--hs-accent); }
.hs-phase__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hs-phase__text small { font-size: 12px; color: var(--hs-muted); font-weight: 500; }
.hs-phase__text small:first-child { font-weight: 700; }
.hs-phase__text strong { font-size: 15px; color: var(--hs-ink); }
.hs-phase__chev { flex: none; color: #8A929C; display: inline-flex; }
.hs-back {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
	border: 0; background: transparent; color: var(--hs-accent); font-weight: 700; font-size: 14px;
	min-height: 44px; padding: 0; cursor: pointer;
}
.hs-step { display: flex; flex-direction: column; gap: 14px; }

/* Meds */
.hs-item {
	display: flex; align-items: center; gap: 14px; padding: 14px 16px;
	background: #fff; border: 1px solid var(--hs-line); border-radius: var(--hs-radius);
}
.hs-item__icon {
	flex: none; width: 44px; height: 44px; border-radius: 12px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--hs-accent-tint); color: var(--hs-accent);
}
.hs-item__icon--warm { background: var(--hs-warm-bg); color: #8A5A12; }
.hs-item__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hs-item__text small { color: var(--hs-muted); }
.hs-tag { flex: none; font-size: 12px; font-weight: 700; color: var(--hs-accent); background: var(--hs-accent-soft); border-radius: 999px; padding: 5px 10px; }

/* Help */
.hs-contact { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--hs-accent-tint); }
.hs-contact > span { font-size: 14px; color: var(--hs-ink-2); }
.hs-faq { background: #fff; border: 1px solid var(--hs-line); border-radius: 16px; overflow: hidden; }
.hs-faq details { border-bottom: 1px solid var(--hs-line-2); }
.hs-faq details:last-child { border-bottom: 0; }
.hs-faq summary {
	list-style: none; cursor: pointer; padding: 15px 44px 15px 16px; font-weight: 600; position: relative; min-height: 52px;
}
.hs-faq summary::-webkit-details-marker { display: none; }
.hs-faq summary::after {
	content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
	border-right: 2px solid var(--hs-muted); border-bottom: 2px solid var(--hs-muted); transform: rotate(45deg); transition: transform .2s;
}
.hs-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.hs-faq p { margin: 0; padding: 0 16px 15px; color: var(--hs-muted); font-size: 15px; }

/* ---------------- Desktop: steps on the left, content in the centre ---------------- */
@media (min-width: 960px) {
	.hs-top { padding: 14px 32px; }
	.hs-nav {
		position: sticky; top: 61px; bottom: auto;
		display: flex; justify-content: center; gap: 6px;
		padding: 8px 32px; border-top: 0; border-bottom: 1px solid var(--hs-line);
	}
	.hs-nav button { flex-direction: row; gap: 8px; min-height: 42px; padding: 0 18px; font-size: 14px; }
	.hs-layout {
		display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px;
		max-width: 1280px; margin: 0 auto; padding: 28px 32px 48px;
	}
	.hs-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 140px; align-self: start; }
	.hs-side__wa { margin-top: 4px; }
	.hs-main { max-width: 860px; }
	.hs-only-mobile { display: none; }
	.hs-tab[data-tab="steps"] .hs-steps-index { display: none; }
	h1 { font-size: 28px; }
}
@media (min-width: 960px) {
	.hs-side .hs-phase.is-open { box-shadow: inset 3px 0 0 var(--hs-accent); }
}


/* ---------------- Hair Solution brand layer ---------------- */
h1, h2 { font-weight: 600; }
.hs-logo { background: var(--hs-navy); border-radius: 12px; overflow: hidden; }
.hs-logo img { width: 70%; height: 70%; object-fit: contain; display: block; }
.hs-logo--light { background: rgba(255,255,255,.1); border: 1px solid rgba(216,183,124,.45); }
.hs-kicker { color: var(--hs-gold); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; font-size: 11px; }
.hs-login__hero {
	position: relative; overflow: hidden; isolation: isolate;
	background: radial-gradient(120% 120% at 90% 10%, #3d44a0 0%, #2e3480 35%, #11142e 100%);
}
.hs-login__hero::after {
	content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='xMaxYMax slice'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M180 330C270 260 200 170 290 120S390 60 440 10' stroke='%23d8b77c' stroke-width='2.2' opacity='.7'/%3E%3Cpath d='M230 330C320 250 250 180 340 140S420 90 460 50' stroke='%23d8b77c' stroke-width='1' opacity='.45'/%3E%3C/g%3E%3C/svg%3E") right bottom / cover no-repeat;
}
.hs-login__hero h1 { font-weight: 600; }
.hs-login__hero .hs-lang .is-on { background: var(--hs-gold-2); color: var(--hs-navy); }

/* ===== 2.1 — plan day by day, day note, medicines of the day, photos with the clinic's answer ===== */
button.hs-chip { cursor: pointer; font-family: inherit; }
button.hs-chip:hover { border-color: var(--hs-accent); }
.hs-daylist { gap: 2px; }
.hs-daylist__group { margin: 10px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hs-gold); }
.hs-daylist__group:first-child { margin-top: 2px; }
.hs-dayrow { min-height: 54px; padding: 8px 10px; }
.hs-dayrow .hs-phase__text strong { font-size: 15px; }
.hs-dayrow.is-done:not(.is-completed) .hs-phase__dot { background: #e4e6f7; color: var(--hs-accent); }
.hs-dayrow__note { flex: none; display: inline-flex; color: var(--hs-gold); }
.hs-daynote { display: flex; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--hs-warm-bg); border: 1px solid var(--hs-warm-line); color: var(--hs-warm-ink); }
.hs-daynote svg { flex: none; margin-top: 2px; }
.hs-daynote strong { display: block; margin-bottom: 4px; }
.hs-daynote p, .hs-daynote ol, .hs-daynote ul { margin: 0; }
.hs-medstoday h2 { display: flex; align-items: center; gap: 8px; }
.hs-medstoday .hs-check span { display: flex; flex-direction: column; gap: 1px; }
.hs-medstoday .hs-check small { font-size: 13px; color: var(--hs-muted); text-decoration: none; }
.hs-item.is-today { border-color: var(--hs-accent-line); background: var(--hs-accent-soft); }
.hs-item.is-over { opacity: .55; }
.hs-tag--today { background: var(--hs-accent); color: #fff; }
.hs-tag--over { background: var(--hs-line-2); color: var(--hs-muted); }
.hs-reply { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #e4f3ea; border: 1px solid #bfe1cc; color: #155c35; }
.hs-reply svg { flex: none; margin-top: 2px; }
.hs-reply div { display: flex; flex-direction: column; gap: 3px; }
.hs-reply small { color: #3f7a57; font-size: 12px; }
.hs-myphotos__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.hs-myphoto { margin: 0; border: 1px solid var(--hs-line); border-radius: 14px; overflow: hidden; background: #fff; }
.hs-myphoto img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--hs-accent-soft); }
.hs-myphoto figcaption { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; }
.hs-myphoto figcaption small { font-size: 12px; color: var(--hs-muted); }
.hs-myphoto__status { font-size: 13px; color: var(--hs-warm-ink); }
.hs-myphoto.is-seen .hs-myphoto__status { color: #1e7a46; }
.hs-myphoto__msg { font-size: 13px; color: var(--hs-ink); background: var(--hs-accent-soft); border-radius: 10px; padding: 6px 8px; }
