/* LimfMed design system
   Palette taken from the LimfMed brand material: navy #002C54 (wordmark "Limf") and turquoise #42B8B2 ("Med", lymph lines).
   Typeface: DM Sans (self-hosted, SIL Open Font License), matching the geometric sans used on the flyers. */

@font-face {
    font-family: "DM Sans";
    src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("fonts/dm-sans-latin-wght-italic.woff2") format("woff2");
    font-weight: 100 1000;
    font-style: italic;
    font-display: swap;
}

:root {
    --navy: #002c54;
    --navy-800: #0a3a66;
    --navy-100: #e5edf5;
    --teal: #42b8b2;
    --teal-600: #2a9d97;
    --teal-700: #1e7f7a;       /* text-safe teal on white (AA) */
    --mint: #eef8f7;
    --mint-200: #d6efec;
    --ink: #1f2d3a;
    --muted: #5b6b78;
    --line: #e2ecee;
    --surface: #ffffff;
    --surface-soft: #f5fafa;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --warning: #9a4a07;
    --warning-bg: #fffaeb;
    --success: #067647;
    --success-bg: #ecfdf3;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0, 44, 84, .06), 0 8px 24px rgba(0, 44, 84, .06);
    --font: "DM Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;

    --bs-body-font-family: var(--font);
    --bs-body-color: var(--ink);
    --bs-link-color-rgb: 30, 127, 122;
    --bs-link-hover-color-rgb: 0, 44, 84;
    --bs-border-color: var(--line);
    --bs-border-radius: var(--radius-sm);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--surface);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--navy); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.2rem; }
h1:focus { outline: none; }
a { color: var(--teal-700); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
.text-muted, .muted { color: var(--muted) !important; }
.lead { font-size: 1.15rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--teal-700); margin-bottom: .5rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---- Buttons & forms (Bootstrap overrides) ---- */
.btn { border-radius: 999px; font-weight: 600; padding: .62rem 1.35rem; }
.btn-sm { padding: .35rem .85rem; font-size: .875rem; }
.btn-lg { padding: .8rem 1.7rem; font-size: 1.05rem; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-800); --bs-btn-hover-border-color: var(--navy-800); --bs-btn-active-bg: var(--navy-800); --bs-btn-disabled-bg: var(--navy); --bs-btn-disabled-border-color: var(--navy); }
.btn-teal { --bs-btn-color: #fff; --bs-btn-bg: var(--teal-700); --bs-btn-border-color: var(--teal-700); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); --bs-btn-active-bg: var(--navy); }
.btn-outline-primary { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); --bs-btn-active-bg: var(--navy); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: var(--navy); }
.btn-danger { --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger); }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: #cfdde2; padding: .6rem .85rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(66, 184, 178, .25); }
.form-check-input:checked { background-color: var(--teal-700); border-color: var(--teal-700); }
.form-label { font-weight: 600; color: var(--navy); font-size: .95rem; }
.form-text { color: var(--muted); }
.valid.modified:not([type=checkbox]) { outline: none; }
.invalid { outline: 1px solid var(--danger); }
.validation-message { color: var(--danger); font-size: .9rem; }
.darker-border-checkbox.form-check-input { border-color: #929292; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand svg { flex: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; color: var(--navy); }
.brand-name span { color: var(--teal-600); }
.brand-sub { font-size: .8rem; color: var(--muted); margin-top: .2rem; letter-spacing: .01em; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a.active, .site-nav a:hover { color: var(--teal-700); }
.site-nav .btn { color: #fff; }
.nav-toggle { display: none; }
.nav-toggle summary { list-style: none; cursor: pointer; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; color: var(--navy); }
.nav-toggle summary::-webkit-details-marker { display: none; }

@media (max-width: 860px) {
    .site-nav.desktop { display: none; }
    .nav-toggle { display: block; position: relative; }
    .nav-toggle .site-nav { position: absolute; right: 0; top: calc(100% + .5rem); flex-direction: column; align-items: stretch; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .75rem; min-width: 230px; }
    .nav-toggle .site-nav a { padding: .55rem .75rem; border-radius: 8px; }
    .nav-toggle .site-nav a:hover { background: var(--mint); }
}

/* ---- Sections ---- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-soft { background: var(--surface-soft); }
.section-mint { background: var(--mint); }
.section-head { max-width: 720px; margin-bottom: 2.25rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #f3fbfa 0%, #e7f5f4 55%, #dff1f0 100%); padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .lymph-lines { position: absolute; top: -10px; left: -30px; width: 340px; opacity: .55; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: 3rem; align-items: center; }
.hero h1 span { color: var(--teal-700); }
.hero .lead { max-width: 600px; margin: 1.25rem 0 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 1.75rem; border: 1px solid var(--line); }
.hero-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .65rem; align-items: flex-start; padding: .35rem 0; }
.check-list svg { flex: none; margin-top: .3rem; color: var(--teal-600); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid-3, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; } }

.card-soft { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); height: 100%; }
.card-soft h3 { margin: .9rem 0 .4rem; }
.card-soft p { color: var(--muted); margin: 0; font-size: .98rem; }
.icon-badge { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--teal-700); color: #fff; }
.icon-badge.soft { background: var(--mint-200); color: var(--teal-700); }

.notice { display: flex; gap: .9rem; align-items: center; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-top: 2rem; }
.notice strong { color: var(--teal); }

.service-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); height: 100%; }
.service-card h3 { margin-bottom: .5rem; }
.service-card p { color: var(--muted); flex: 1; }
.price-list { list-style: none; padding: 0; margin: 1rem 0; border-top: 1px solid var(--line); }
.price-list li { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.price-list .price { font-weight: 700; color: var(--navy); }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.4rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--mint-200); color: var(--teal-700); font-weight: 700; display: grid; place-items: center; }
.step h3 { margin-bottom: .3rem; }
.step p { color: var(--muted); margin: 0; }

.cta-band { background: var(--navy); color: #fff; border-radius: 22px; padding: clamp(2rem, 5vw, 3.25rem); display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; margin: 0 0 .4rem; }
.cta-band p { color: #c9dae6; margin: 0; }

.disclaimer { background: var(--warning-bg); border: 1px solid #fedf89; border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: .95rem; color: #5c3a06; }
.disclaimer strong { color: #5c3a06; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.5rem; }
.placeholder { background: #fff4d6; padding: 0 .3rem; border-radius: 4px; font-family: ui-monospace, Consolas, monospace; font-size: .9em; }

.page-hero { background: linear-gradient(160deg, #f3fbfa 0%, #e5f4f3 100%); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem); }
.page-hero .lead { max-width: 680px; }

/* ---- About ---- */
.about-hero { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: center; }
.about-photo img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); border: 4px solid #fff; }
.about-aside { height: auto; }
.about-tagline { font-weight: 700; color: var(--teal-700); font-size: 1.1rem; margin-top: 1.5rem; }
@media (max-width: 760px) {
    .about-hero { grid-template-columns: 1fr; gap: 1.75rem; }
    .about-photo { max-width: 280px; }
}

.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; gap: .9rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.contact-list svg { color: var(--teal-700); flex: none; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: #c9dae6; padding: 3.5rem 0 2rem; margin-top: 0; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--teal); }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: .9rem; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-name span { color: var(--teal); }
.site-footer .brand-sub { color: #9fb6c8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: .25rem 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .85rem; color: #9fb6c8; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-bottom .footer-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom .footer-credit a:hover { color: var(--teal); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Booking form ---- */
.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
@media (max-width: 980px) { .booking-layout { grid-template-columns: 1fr; } }
.form-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.form-step > h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.form-step > h2 .num { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--mint-200); color: var(--teal-700); font-size: .95rem; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.option { position: relative; display: block; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--teal); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option.selected { border-color: var(--teal-700); background: var(--mint); box-shadow: 0 0 0 1px var(--teal-700) inset; }
.option:has(input:focus-visible) { outline: 3px solid rgba(66, 184, 178, .45); outline-offset: 2px; }
.option .title { display: block; font-weight: 700; color: var(--navy); }
.option .meta { display: block; color: var(--muted); font-size: .9rem; }
.option .price { display: block; font-weight: 700; color: var(--teal-700); margin-top: .25rem; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .5rem; }
.slot { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .5rem; font-weight: 600; color: var(--navy); }
.slot:hover { border-color: var(--teal); }
.slot.selected { background: var(--navy); border-color: var(--navy); color: #fff; }
.summary-card { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.summary-card h2 { font-size: 1.15rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.summary-row span:first-child { color: var(--muted); }
.summary-row.total { border-bottom: none; font-weight: 700; font-size: 1.1rem; color: var(--navy); padding-top: .8rem; }
.summary-row.total span:first-child { color: var(--navy); }
.summary-row.discount span:last-child { color: var(--teal-700); font-weight: 600; }
.promo-box { padding-top: .75rem; border-top: 1px dashed var(--line); }
.promo-box .form-control { min-width: 0; }
.alert-soft { border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: .95rem; }
.alert-soft.info { background: var(--mint); border: 1px solid var(--mint-200); }
.alert-soft.warn { background: var(--warning-bg); border: 1px solid #fedf89; color: #5c3a06; }
.alert-soft.error { background: var(--danger-bg); border: 1px solid #fecdca; color: var(--danger); }
.alert-soft.ok { background: var(--success-bg); border: 1px solid #abefc6; color: var(--success); }
.reference { display: inline-block; font-size: 1.6rem; font-weight: 700; letter-spacing: .04em; color: var(--navy); background: var(--mint); border: 1px dashed var(--teal); border-radius: var(--radius-sm); padding: .35rem 1rem; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .4rem; } }

/* ---- Auth pages ---- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #f3fbfa, #dff1f0); padding: 2rem 1rem; }
.auth-panel { width: 100%; max-width: 980px; }
.auth-panel > .brand { margin-bottom: 1.25rem; }
.auth-content { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.5rem); }
.auth-card { max-width: 440px; }
.qr-code { display: block; margin: .5rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; background: #fff; }

/* ---- Admin ---- */
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; background: var(--surface-soft); }
/* The sidebar stays fixed to the viewport so the account links are always visible without scrolling. */
.admin-side { background: var(--navy); color: #c9dae6; padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1.5rem;
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.admin-side .brand-name { color: #fff; font-size: 1.4rem; }
.admin-side .brand-name span { color: var(--teal); }
.admin-side .brand-sub { color: #9fb6c8; }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-nav a { color: #dbe7f0; text-decoration: none; padding: .55rem .8rem; border-radius: 10px; font-weight: 500; display: flex; gap: .6rem; align-items: center; }
.admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav a.active { background: var(--teal-700); color: #fff; }
.admin-side .who { margin-top: auto; font-size: .85rem; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1rem; }
.admin-side .who form button { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; }
.admin-main { padding: clamp(1.25rem, 3vw, 2.25rem); min-width: 0; }
.admin-main h1 { font-size: 1.7rem; margin-bottom: 1.25rem; }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.admin-top h1 { margin: 0; }
/* Short screens: tighten the sidebar so everything still fits without scrolling. */
@media (min-width: 901px) and (max-height: 720px) {
    .admin-side { padding: 1rem; gap: .9rem; }
    .admin-nav a { padding: .4rem .8rem; }
    .admin-side .who { padding-top: .75rem; }
}
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { padding: 1rem; gap: .75rem; position: static; height: auto; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-side .who { margin-top: 0; }
}
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.panel > h2 { font-size: 1.1rem; margin-bottom: 1rem; }

/* ---- Admin calendar ---- */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; }
.cal-nav, .cal-options { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.cal-nav .btn { min-width: 2.25rem; }
.cal-title { font-size: 1.2rem; margin: 0 0 0 .35rem; color: var(--navy); }
.cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: 0; margin: 1rem 0; font-size: .8rem; color: var(--muted); }
.cal-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.cal-key { width: 12px; height: 12px; border-radius: 3px; border-left-width: 4px; border-left-style: solid; display: inline-block; }

/* Status colours (left bar + tint), shared by the legend and the events. Status is also in each event's tooltip. */
.cal-PendingPayment { border-left-color: #dc8a10; background: var(--warning-bg); }
.cal-Confirmed { border-left-color: var(--teal-600); background: var(--mint); }
.cal-Completed { border-left-color: var(--success); background: var(--success-bg); }
.cal-NoShow { border-left-color: var(--danger); background: var(--danger-bg); }
.cal-Cancelled, .cal-Expired { border-left-color: #98a2b3; background: #f2f4f7; }

.cal-month { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-row + .cal-row { border-top: 1px solid var(--line); }
.cal-head { background: var(--surface-soft); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-head > div { padding: .5rem .6rem; }
.cal-day { min-height: 118px; padding: .35rem .4rem .5rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; background: #fff; }
.cal-day + .cal-day { border-left: 1px solid var(--line); }
.cal-day.is-outside { background: var(--surface-soft); }
.cal-day.is-outside .cal-daynum { color: #98a2b3; }
.cal-day.is-closed, .cal-wday.is-closed { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0, 44, 84, .035) 8px 9px); }
.cal-daynum { align-self: flex-start; border: 0; background: none; font-size: .85rem; font-weight: 700; color: var(--ink); width: 1.8rem; height: 1.8rem; border-radius: 50%; line-height: 1; }
.cal-daynum:hover { background: var(--navy-100); }
.is-today .cal-daynum, .is-today .cal-dnum { background: var(--navy); color: #fff; }

.cal-event { display: block; border-left-width: 4px; border-left-style: solid; border-radius: 6px; padding: .2rem .4rem; font-size: .75rem; line-height: 1.3; color: var(--ink); text-decoration: none; min-width: 0; }
.cal-event:hover { filter: brightness(.96); color: var(--ink); }
.cal-event:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.cal-event > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-time { font-weight: 700; }
.cal-what { color: var(--muted); }
.cal-what svg { vertical-align: -1px; }
.cal-Cancelled .cal-who, .cal-Expired .cal-who { text-decoration: line-through; }
.cal-more { border: 0; background: none; padding: 0 .2rem; font-size: .75rem; font-weight: 600; color: var(--teal-700); text-align: left; }
.cal-more:hover { text-decoration: underline; }
.cal-note { font-size: .7rem; font-weight: 600; color: #7a4b00; background: #fff4d6; border-radius: 4px; padding: .1rem .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.cal-wday { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; display: flex; flex-direction: column; gap: .35rem; min-height: 220px; min-width: 0; background: #fff; }
.cal-wday header { display: flex; align-items: center; gap: .4rem; margin-bottom: .15rem; }
.cal-dow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-dnum { font-weight: 700; display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; border-radius: 50%; }
.cal-week .cal-event { padding: .35rem .5rem; font-size: .8rem; }
.cal-week .cal-event > span { white-space: normal; }
.cal-empty { font-size: .8rem; color: #98a2b3; margin: 0; }

.cal-agenda { display: none; }
@media (max-width: 1100px) {
    .cal-week { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .cal-wday { min-height: 0; }
}
@media (max-width: 700px) {
    .cal-month { display: none; }
    .cal-agenda { display: flex; flex-direction: column; gap: .5rem; }
    .cal-agenda .cal-event > span { white-space: normal; }
    .cal-title { margin-left: 0; width: 100%; order: -1; }
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.stat .label { font-size: .85rem; color: var(--muted); }
.stat .value { font-size: 1.65rem; font-weight: 700; color: var(--navy); line-height: 1.2; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.table-admin { width: 100%; font-size: .93rem; }
.table-admin th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: .55rem .5rem; white-space: nowrap; }
.table-admin td { border-bottom: 1px solid var(--line); padding: .6rem .5rem; vertical-align: top; }
.table-admin td.num, .table-admin th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.badge-status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-PendingPayment { background: var(--warning-bg); color: var(--warning); }
.badge-Confirmed { background: var(--mint-200); color: var(--teal-700); }
.badge-Completed { background: var(--success-bg); color: var(--success); }
.badge-Cancelled, .badge-Expired { background: #f2f4f7; color: #475467; }
.badge-NoShow, .badge-Failed { background: var(--danger-bg); color: var(--danger); }
.badge-flag { background: #fff4d6; color: #7a4b00; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filters > div { min-width: 150px; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.timeline .when { color: var(--muted); font-size: .82rem; }
.health-notes { white-space: pre-wrap; background: var(--warning-bg); border: 1px solid #fedf89; border-radius: var(--radius-sm); padding: .75rem 1rem; }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: #14a39a; }
.chart .bar:hover { fill: #0e7f78; }
.chart .hit { fill: transparent; }
.chart .axis { stroke: var(--line); }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.chart .val { fill: var(--ink); font-weight: 600; }
.meter { height: 12px; border-radius: 999px; overflow: hidden; }
.meter > svg { display: block; }
.meter-home { fill: #14a39a; }
.meter-clinic { fill: #2f6db3; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; }
.legend-dot.home { background: #14a39a; }
.legend-dot.clinic { background: #2f6db3; }
.setting-help { font-size: .85rem; color: var(--muted); }

/* ---- Contact form ---- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-layout .card-soft { height: auto; }
.contact-layout h2 { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 1rem; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Client account ---- */
.my-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; border-bottom: 1px solid var(--line); padding-bottom: .75rem; }
.my-nav a, .my-nav button { color: var(--ink); text-decoration: none; font-weight: 500; padding: .4rem .85rem; border-radius: 999px; background: none; border: 0; font-size: .95rem; }
.my-nav a:hover, .my-nav button:hover { background: var(--mint); color: var(--teal-700); }
.my-nav a.active { background: var(--navy); color: #fff; }
.my-nav form { margin-left: auto; }
.booking-list { display: grid; gap: .75rem; }
.booking-card { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 1.1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.booking-card .when { text-align: center; background: var(--mint); border-radius: var(--radius-sm); padding: .45rem .25rem; line-height: 1.1; }
.booking-card .day { display: block; font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.booking-card .month { display: block; font-size: .78rem; color: var(--teal-700); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.booking-card h3 { font-size: 1.05rem; margin: 0 0 .2rem; }
.booking-card h3 a { color: var(--navy); text-decoration: none; }
.booking-card h3 a:hover { color: var(--teal-700); }
.booking-card .meta { color: var(--muted); font-size: .9rem; margin: 0 0 .35rem; }
.booking-card .side { text-align: right; }
.booking-card .total { display: block; font-weight: 700; color: var(--navy); margin-bottom: .4rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .booking-card { grid-template-columns: 60px minmax(0, 1fr); }
    .booking-card .side { grid-column: 1 / -1; text-align: left; display: flex; justify-content: space-between; align-items: center; }
    .booking-card .total { margin: 0; }
}
.file-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.file-list li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.file-list svg { color: var(--teal-700); }
.address-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; height: auto; }
.address-card p, .address-card div { color: var(--ink); }
.saved-addresses { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.profile-form h2 { font-size: 1.15rem; }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: var(--danger); --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); }

/* ---- Blazor framework UI ---- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
.blazor-error-boundary { background: var(--danger-bg); padding: 1rem; color: var(--danger); border-radius: var(--radius-sm); }
.blazor-error-boundary::after { content: "Something went wrong. Please reload the page." }

/* Multi-line text entered in the admin (e.g. the clinic address) keeps its line breaks. */
.pre-line { white-space: pre-line; }
