/* GenQi design system. Presentation only; existing component state hooks remain intact. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/plus-jakarta-sans-latin.woff2") format("woff2");
}

:root {
  --ink: #193a30;
  --forest: #173d31;
  --sage: #dce5da;
  --lime: #d8eaa6;
  --mist: #f5f7f4;
  --paper: #fbfcf9;
  --line: #e3e9e2;
  --muted: #5c6d62;
  --surface: #fff;
  --surface-soft: #f5f7f3;
  --surface-hover: #f0f5ee;
  --text-secondary: #52665c;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 4px 26px rgba(25, 58, 48, .035);
  --shadow-floating: 0 20px 70px rgba(15, 38, 29, .18);
  --sidebar-width: 242px;
  --transition: 160ms ease;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
}

html { scroll-padding-top: 100px; }
body { background: var(--paper); color: var(--ink); font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
img { max-width: 100%; }
body [hidden] { display: none !important; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; }
h1, h2 { text-wrap: balance; }
p { overflow-wrap: break-word; }
::selection { background: #dcebaa; color: var(--forest); }
:focus-visible { outline: 3px solid #679479; outline-offset: 3px; }
main:focus { outline: none; }
.ui-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ui-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 18px; border-radius: 10px; color: #fff; background: var(--forest); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.eyebrow { color: #536f4d; font-size: 10px; line-height: 1.5; font-weight: 800; letter-spacing: 1.8px; margin-bottom: 14px; }
.muted, .field-note, .form-note { color: var(--muted); }

/* Controls */
.button { gap: 9px; min-height: 46px; padding: 12px 20px; border: 1px solid var(--forest); border-radius: 10px; background: var(--forest); color: #fff; font-size: 13px; line-height: 1.4; font-weight: 700; box-shadow: 0 2px 2px rgba(24, 52, 41, .04); transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.button:hover { background: #265540; border-color: #265540; color: #fff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(24, 52, 41, .12); }
.button:active { transform: none; }
.button .ui-icon { width: 17px; height: 17px; }
.button-small { min-height: 39px; padding: 9px 14px; font-size: 12px; }
.button-outline { background: #fff; border-color: #d8e1d7; color: var(--forest); box-shadow: none; }
.button-outline:hover { background: #f1f5ee; border-color: #b6cbb7; color: var(--forest); box-shadow: none; }
.button-dark { background: var(--forest); color: #fff; }
.button-danger { background: #a83f42; border-color: #a83f42; color: #fff; }
.button-danger:hover { background: #8b3036; border-color: #8b3036; }
.button:disabled, .icon-action:disabled { opacity: .43; transform: none; box-shadow: none; cursor: not-allowed; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0; background: #fff; color: var(--forest); cursor: pointer; transition: background var(--transition); }
.icon-button:hover { background: var(--surface-hover); }
.genqi-app input:not([type="checkbox"]):not([type="hidden"]), .genqi-app select, .genqi-app textarea { min-width: 0; width: 100%; min-height: 44px; border: 1px solid #d9e2d8; border-radius: 9px; padding: 11px 13px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.5; box-sizing: border-box; transition: border-color var(--transition), box-shadow var(--transition); }
.genqi-app input::placeholder, .genqi-app textarea::placeholder { color: #849189; opacity: 1; }
.genqi-app input:focus, .genqi-app select:focus, .genqi-app textarea:focus { border-color: #789c7c; box-shadow: 0 0 0 3px rgba(111, 151, 116, .12); }
.genqi-app input:focus-visible, .genqi-app select:focus-visible, .genqi-app textarea:focus-visible { outline: 2px solid #679479; outline-offset: 1px; box-shadow: none; }
.genqi-app textarea { resize: vertical; }
.genqi-app input[readonly], .genqi-app input:disabled, .genqi-app select:disabled { background: #f4f6f2; color: #68796d; }
.genqi-app input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; margin: 0; padding: 0; accent-color: var(--forest); cursor: pointer; }
.genqi-app input[type="checkbox"]:disabled { cursor: not-allowed; }
.auth-form label, .work-form label, .account-profile-form label, .booking-form label, .accounting-dialog label { font-size: 12px; font-weight: 700; color: #40594c; line-height: 1.6; gap: 8px; }
.consent { line-height: 1.6; }
.genqi-app label.consent { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 10px; align-items: start; font-weight: 500; }
.genqi-app label.consent input { margin-top: 4px; }
.success, .form-error { border: 1px solid #cde2ce; border-left: 3px solid #719a6e; border-radius: 10px; padding: 15px 18px; background: #edf6eb; color: #2e593a; font-size: 13px; margin: 18px 0 24px; }
.form-error { color: #8a353b; background: #fdf0ee; border-color: #f0d5d1; border-left-color: #bd6162; }
.status-ok, .status-alert, .status-muted, .booking-status { display: inline-flex; align-items: center; width: fit-content; gap: 5px; padding: 5px 9px; border-radius: 6px; font-size: 10px; line-height: 1.5; font-weight: 700; white-space: nowrap; }
.status-ok, .booking-status { background: #edf5e8; color: #3b633e; }
.status-alert { background: #fff2dc; color: #865a18; }
.status-muted { background: #eef1ed; color: #627167; }

/* Public navigation and page rhythm */
.site-header { height: 88px; padding: 0 max(28px, calc((100vw - 1240px) / 2)); background: rgba(251, 252, 249, .97); border-color: var(--line); backdrop-filter: blur(12px); }
.brand-logo { width: 130px; max-height: 53px; }
.site-header nav { gap: 29px; font-size: 13px; font-weight: 600; }
.site-header nav a:not(.button) { color: #53685b; }
.site-header nav a:not(.button):hover { color: var(--forest); }
.site-header nav .public-login-link { padding-left: 27px; border-left: 1px solid var(--line); color: var(--ink); }
.public-menu-toggle { display: none; }
.section { padding: 96px max(28px, calc((100vw - 1200px) / 2)); }
.section h2 { font-size: clamp(30px, 3vw, 42px); line-height: 1.18; letter-spacing: -1.7px; font-weight: 650; max-width: 650px; }
.section-heading, .testimonial-heading { gap: 40px; }
.section-heading .muted, .testimonial-heading .muted { font-size: 13px; line-height: 1.9; }
.site-footer { padding: 26px max(28px, calc((100vw - 1200px) / 2)); color: #62715f; background: var(--paper); border-color: var(--line); font-size: 11px; }

/* A calm, editorial public face, built around the clinic's own photography. */
.genqi-hero { min-height: 680px; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 76px; padding: 68px max(28px, calc((100vw - 1200px) / 2)) 84px; background: #f4f6ef; align-items: center; }
.hero-copy { max-width: 640px; }
.hero h1 { font-size: clamp(42px, 4.55vw, 65px); line-height: 1.07; letter-spacing: -3px; font-weight: 650; margin-bottom: 25px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; }
.hero .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #78954d; }
.hero .lead { max-width: 500px; font-size: 15px; line-height: 1.9; color: #627362; }
.hero .actions { gap: 25px; margin: 32px 0; flex-wrap: wrap; }
.link-arrow { display: inline-flex; align-items: center; gap: 14px; font-size: 12px; font-weight: 700; }
.link-arrow span { font-size: 19px; transition: transform var(--transition); }
.link-arrow:hover span { transform: translateX(3px); }
.trust-row { gap: 19px; font-size: 11px; font-weight: 600; color: #536c4e; }
.genqi-hero-image { width: 100%; aspect-ratio: 4 / 4.55; min-height: 0; height: 520px; max-height: 560px; border-radius: 90px 24px 24px 24px; overflow: hidden; border: 7px solid #fff; box-shadow: 0 14px 48px rgba(42, 64, 45, .09); background: #e5ece4; }
.genqi-hero-image img { height: 100%; min-height: 0; object-fit: cover; object-position: 50% 62%; }
.genqi-hero-image figcaption { right: 14px; bottom: 14px; left: 14px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.6); border-radius: 11px; color: var(--forest); background: rgba(255,255,255,.94); font-size: 10px; line-height: 1.7; font-weight: 600; }
.home-booking-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 72px; background: #fff; }
.home-booking-heading { display: block; margin: 0; }
.home-booking-heading .muted { margin-top: 20px; font-size: 13px; line-height: 1.9; }
.home-booking-heading .booking-legend { margin-top: 25px; }
.home-booking-calendar { max-width: 660px; margin: 0; }
.genqi-intro { grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: 82px; background: var(--paper); }
.genqi-intro-image { padding: 12px; border-radius: 20px; transform: none; background: #ecf0e8; }
.genqi-intro-image img { border-radius: 12px; max-height: 610px; object-fit: contain; }
.genqi-intro-copy > p:not(.eyebrow) { font-size: 14px; line-height: 1.9; }
.benefit-columns { gap: 25px; margin-top: 28px; }
.benefit-columns h3 { font-size: 13px; line-height: 1.7; }
.benefit-columns li { padding: 10px 0 10px 22px; font-size: 12px; line-height: 1.8; border-color: var(--line); }
.medical-note { border-radius: 10px; border-left-width: 2px; font-size: 11px !important; padding: 13px 16px; background: #faf5e9; color: #6b654e !important; }
.genqi-services { background: #f0f3ec; }
.genqi-service-grid { gap: 18px; margin-top: 40px; }
.genqi-service-grid article { min-width: 0; padding: 27px 26px; border: 1px solid #e0e6d9; border-radius: 15px; background: var(--paper); transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition); }
.genqi-service-grid article:hover { transform: translateY(-3px); border-color: #b7cbb0; box-shadow: var(--shadow-card); }
.genqi-service-grid .service-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e8efdd; color: #587145; font-size: 10px; }
.genqi-service-grid h3 { font-size: 18px; line-height: 1.45; letter-spacing: -.5px; margin: 24px 0 10px; }
.genqi-service-grid p { font-size: 12px; }
.genqi-service-grid strong { color: var(--forest); font-size: 17px; font-weight: 750; margin-top: 24px; }
.genqi-pricing { gap: 100px; background: #fff; }
.tariff-list { border-color: var(--line); margin: 28px 0 32px; }
.tariff-list div { padding: 17px 0; font-size: 12px; border-color: var(--line); }
.tariff-list strong { font-size: 13px; }
.tariff-poster { max-width: 390px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card); }
.tariff-poster figcaption { background: rgba(23,61,49,.92); font-size: 10px; border-radius: 8px; }
.genqi-testimonials { background: #f2f5ef; }
.testimonial-slider { padding: 0 51px; }
.testimonial-track { gap: 18px; grid-auto-columns: calc((100% - 54px) / 4); padding: 2px; }
.testimonial-card { border: 1px solid #e0e7dd; border-radius: 17px; box-shadow: none; background: #fff; }
.testimonial-card img { width: 78px; height: 78px; border: 3px solid #edf2e8; margin-top: 28px; }
.testimonial-card figcaption { padding: 19px 20px 26px; }
.testimonial-card blockquote { font-size: 13px; line-height: 1.85; color: #637364; }
.testimonial-card blockquote::before { color: #69814f; margin-bottom: 10px; }
.testimonial-card .testimonial-name { color: var(--forest); font-size: 13px; padding-top: 25px; }
.testimonial-card .testimonial-role { color: var(--muted); font-size: 11px; font-weight: 500; }
.testimonial-control { width: 38px; height: 38px; border-color: #d1deca; background: #fff; color: var(--forest); }
.testimonial-note { font-size: 10px; color: #5c6d62; }
.genqi-location { gap: 70px; background: #fff; }
.genqi-location-copy > p:not(.eyebrow) { font-size: 14px; }
.genqi-map-frame { border-radius: 20px; border: 1px solid var(--line); box-shadow: none; background: #e8ede5; }
.genqi-contact { padding-top: 68px; padding-bottom: 68px; background: var(--forest); color: #fff; }
.genqi-contact h2 { color: #fff; }
.genqi-contact .eyebrow { color: #c9df9b; }
.genqi-contact p:not(.eyebrow) { color: #c1d1c4; }
.genqi-contact .button { background: var(--lime); color: var(--forest); border-color: var(--lime); flex: 0 0 auto; }

/* Authentication and the customer portal */
.auth-shell, .work-shell { min-height: calc(100dvh - 160px); grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); max-width: 1136px; margin: 0 auto; padding: 76px 38px 90px; gap: 100px; align-items: center; background: none; }
.auth-intro h1, .work-shell .auth-intro h1 { color: var(--forest); font-size: clamp(36px, 3.5vw, 50px); line-height: 1.13; letter-spacing: -2px; max-width: 520px; }
.work-shell .auth-intro .eyebrow { color: #536f4d; }
.auth-intro > p:not(.eyebrow), .work-shell .auth-intro > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.85; }
.info-card, .work-shell .info-card { border: 1px solid #e1e8da; border-left: 3px solid #bed38f; border-radius: 12px; background: #f1f5e9; padding: 18px 20px; color: var(--forest); font-size: 12px; line-height: 1.8; margin-top: 32px; gap: 4px; }
.info-card span, .work-shell .info-card span { color: var(--text-secondary); }
.auth-form { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 12px 48px rgba(30,60,40,.045); padding: 36px; align-self: center; }
.auth-form label { margin-bottom: 21px; }
.auth-form .field-note { margin: 0; font-size: 10px; font-weight: 500; }
.auth-form .button-full { margin-top: 3px; }
.auth-form .form-note { font-size: 11px; line-height: 1.8; margin: 20px 0 0; text-align: center; }
.text-link { color: var(--forest); font-weight: 750; text-underline-offset: 3px; }
.text-link:hover { text-decoration: underline; }
.portal-shell:not(.work-dashboard) { padding: 64px max(28px, calc((100vw - 1160px) / 2)) 90px; background: var(--mist); }
.portal-heading { max-width: 780px; }
.portal-heading h1 { font-size: 36px; letter-spacing: -1.4px; line-height: 1.2; margin: 0 0 12px; }
.portal-heading > .muted { font-size: 13px; max-width: 650px; line-height: 1.8; }
.portal-grid { gap: 20px; margin-top: 34px; }
.portal-card { min-height: 230px; padding: 27px; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-card); }
.portal-number { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: #eff4e8; color: #516f3c; font-family: inherit; font-size: 11px; line-height: 1; font-style: normal; font-weight: 750; }
.portal-card h2 { font-size: 18px; letter-spacing: -.45px; margin: 22px 0 11px; }
.portal-card p { font-size: 12px; line-height: 1.8; }
.portal-card .button { margin-top: 24px; }
.customer-bookings-card, .account-profile-card { border-color: var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow-card); margin-top: 26px; }
.customer-bookings-heading h2, .account-profile-card h2 { font-size: 23px; letter-spacing: -.6px; }
.customer-bookings-heading .muted, .account-profile-card .muted { font-size: 12px; line-height: 1.85; }
.customer-booking-item { border-color: var(--line); border-radius: 12px; padding: 22px; }
.customer-booking-main h3 { font-size: 16px; }
.customer-booking-main p { font-size: 12px; }
.customer-booking-main small, .cancellation-note { color: #65755f; }
.customer-booking-cancelled { opacity: 1; background: #faf7f3; }
.customer-booking-date { color: #58713f; font-size: 11px; }
.customer-bookings-empty { border-color: #d7e1ce; border-radius: 12px; padding: 28px; background: #fafcf8; }
.account-profile-card { gap: 55px; }
.account-profile-form { gap: 22px; }
.account-profile-actions .form-note { font-size: 11px; }

/* Availability is a shared component across the public and customer views. */
.booking-shell { padding: 70px max(28px, calc((100vw - 1160px) / 2)) 92px; background: #f5f7f2; gap: 80px; }
.booking-calendar-shell { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
.booking-intro h1 { font-size: 46px; font-weight: 650; line-height: 1.12; letter-spacing: -2px; margin-bottom: 24px; }
.booking-intro > p:not(.eyebrow) { font-size: 14px; line-height: 1.85; }
.booking-calendar-card { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 20px; padding: 27px; box-shadow: var(--shadow-card); }
.calendar-heading { margin-bottom: 26px; }
.calendar-heading h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.calendar-heading .button { width: 36px; min-height: 36px; padding: 0; border-radius: 9px; background: #fff; border-color: var(--line); color: var(--forest); box-shadow: none; }
.calendar-grid, .calendar-weekdays { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.calendar-weekdays { margin-bottom: 10px; }
.calendar-weekdays span { font-size: 9px; font-weight: 650; color: #62755d; }
.calendar-day { min-width: 0; min-height: 66px; padding: 10px 7px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; box-shadow: none; transition: background var(--transition), border-color var(--transition), box-shadow var(--transition); }
.calendar-day b { font-size: 14px; font-weight: 700; }
.calendar-day small { font-size: 9px; font-weight: 600; }
.calendar-available { background: #edf5e8; border-color: #d4e6c9; color: #3f643c; }
.calendar-partial { background: #fff2d9; border-color: #f1dfbb; color: #895c1a; }
.calendar-full { background: #fbece9; border-color: #efd4ce; color: #9a4944; }
.calendar-disabled { background: #f3f5f1; border-color: #e9ede6; color: #65775d; }
.calendar-blank { border-color: transparent; background: transparent; }
.calendar-day:not(.calendar-full):not(.calendar-disabled):hover { transform: none; border-color: #729565; box-shadow: inset 0 0 0 1px #729565; }
.booking-legend { gap: 14px; font-size: 10px; line-height: 1.7; font-weight: 550; }
.booking-legend i, .hour-legend i { width: 7px; height: 7px; }
.hour-legend { gap: 16px; font-size: 10px; font-weight: 600; }
.hour-grid, .customer-hour-grid { gap: 10px; }
.hour-grid > span, .customer-hour { border-radius: 11px; min-height: 75px; padding: 12px 8px; }
.customer-hour-available, .hour-grid > .hour-available, .hour-grid > span:not(.hour-booked):not(.hour-past):not(.hour-partial) { background: #edf5e8; border-color: #c8dfbd; color: #39613c; }
.customer-hour-booked, .hour-grid > .hour-booked { background: #fbece9; border-color: #efd0c9; color: #93443e; }
.customer-hour-past, .hour-grid > .hour-past { background: #f0f2ef; border-color: #e0e5dc; color: #62735b; }
.customer-hour-available:not(:disabled):hover { background: #dfedd6; transform: none; }
.customer-hour strong, .hour-grid strong { font-size: 15px; font-weight: 700; }
.customer-hour small, .hour-grid small { font-size: 10px; }
.booking-profile-summary { border-top-color: var(--line); padding-top: 20px; font-size: 12px; }
.booking-confirmation-details { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fafcf8; }
.booking-confirmation-details div { padding: 14px 17px; border-color: var(--line); }
.booking-confirmation-details dt { font-size: 11px; font-weight: 550; }
.booking-confirmation-details dt, .genqi-location-copy .location-note { color: #60725b; }
.booking-confirmation-details dd { font-size: 12px; font-weight: 700; }
.booking-therapist-preview { min-height: 210px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #f4f7ef; }
.booking-therapist-photo, .booking-therapist-photo-fallback { width: 160px; height: 160px; border: 5px solid #fff; box-shadow: var(--shadow-card); }
.booking-therapist-photo-fallback .ui-icon { width: 48px; height: 48px; color: #63804e; stroke-width: 1.4; }

/* Native dialogs retain their existing submit and focus behaviour. */
.accounting-dialog, .booking-dialog { width: min(650px, calc(100vw - 36px)); max-height: calc(100dvh - 36px); padding: 0; border: 1px solid rgba(255,255,255,.7); border-radius: 21px; background: #fff; color: var(--ink); box-shadow: var(--shadow-floating); white-space: normal; overflow: auto; }
dialog[open] { animation: dialog-enter 170ms ease-out; }
dialog::backdrop { background: rgba(15, 32, 24, .44); backdrop-filter: blur(3px); }
.accounting-dialog form, .booking-dialog .booking-form, .patient-history-dialog > div { --dialog-space: 31px; --dialog-pad-y: 31px; padding: 31px; background: #fff; border: 0; box-shadow: none; max-height: none; }
.booking-dialog .booking-form { overflow: visible; }
.accounting-dialog form { gap: 18px; }
.accounting-dialog h3 { font-size: 23px; line-height: 1.25; letter-spacing: -.75px; margin: 0 0 5px; }
.accounting-dialog p.muted, .booking-dialog p, .confirmation-copy { font-size: 12px; line-height: 1.8; }
.booking-form-calendar h2 { font-size: 23px; letter-spacing: -.7px; line-height: 1.25; }
.dialog-heading { gap: 20px; margin-bottom: 15px; }
.dialog-heading .eyebrow { font-size: 9px; margin-bottom: 9px; }
.dialog-close { width: 35px; height: 35px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; background: #f7f9f4; color: var(--forest); font-size: 24px; }
.dialog-close:hover { background: #eaf1e5; }
.dialog-date { font-size: 13px; }
.dialog-actions { gap: 10px; border-top: 1px solid var(--line); padding-top: 21px; margin-top: 5px; }
.dialog-actions .button { min-height: 43px; }
.accounting-dialog .dialog-actions, .booking-dialog .dialog-actions { position: sticky; bottom: -1px; z-index: 2; margin: 5px calc(-1 * var(--dialog-space)) calc(-1 * var(--dialog-pad-y)); padding: 18px var(--dialog-space) 22px; background: #fff; }
.accounting-dialog, .booking-dialog { scroll-padding-block: 20px 145px; }
.patient-contact-fields { gap: 19px; padding-top: 12px; border-top: 1px solid var(--line); }
.patient-contact-fields h4, .completion-clinical-note h4 { font-size: 14px; letter-spacing: -.2px; }
.completion-clinical-note { border-color: var(--line); padding: 20px 0; gap: 17px; }
.manual-patient-search { border-radius: 13px; border-color: #dee7d5; background: #f4f7ef; padding: 18px; }
.manual-patient-selected { gap: 12px; font-size: 12px; }
.patient-history-item { border-color: var(--line); border-radius: 12px; padding: 19px; }
.patient-history-item header { font-size: 13px; }
.patient-history-item header small { font-size: 10px; }
.patient-history-item p { font-size: 12px; line-height: 1.8; }
.patient-history-list { gap: 14px; }

/* Workspaces */
.app-work { background: var(--mist); }
.workspace-sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 27px 16px 18px; border-right: 1px solid var(--line); background: #fff; }
.sidebar-brand { min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.sidebar-brand .brand-logo { width: 120px; max-height: 47px; }
.sidebar-caption { padding: 17px 16px 15px; color: #66775e; font-size: 8px; font-weight: 750; letter-spacing: 1.5px; }
.sidebar-navigation { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar-group-label { color: #62765b; font-size: 10px; font-weight: 700; letter-spacing: .7px; margin: 21px 16px 9px; text-transform: uppercase; }
.sidebar-group-label:first-child { margin-top: 8px; }
.sidebar-navigation a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 11px 15px; margin: 3px 0; border: 1px solid transparent; border-radius: 9px; color: #576e5c; font-size: 13px; font-weight: 550; transition: background var(--transition), color var(--transition); }
.sidebar-navigation .ui-icon { width: 18px; height: 18px; color: #83967f; }
.sidebar-navigation a:hover { background: #f5f7f1; color: var(--forest); }
.sidebar-navigation a[aria-current="page"] { color: var(--forest); background: #edf3e4; border-color: #e6eddd; font-weight: 750; }
.sidebar-navigation a[aria-current="page"] .ui-icon { color: #42613c; }
.sidebar-footer { display: flex; align-items: center; gap: 11px; margin-top: 20px; padding: 19px 8px 0; border-top: 1px solid var(--line); }
.sidebar-clinic-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--forest); color: var(--lime); font-size: 18px; font-weight: 750; }
.sidebar-footer strong { display: block; color: #4c6554; font-size: 10px; font-weight: 700; }
.sidebar-footer div > span { display: block; color: #677a5f; font-size: 9px; margin-top: 2px; }
.app-work .site-header { margin-left: var(--sidebar-width); height: 76px; padding: 0 36px; background: rgba(255,255,255,.97); }
.workspace-header-start, .workspace-header-actions, .workspace-context, .workspace-user { display: flex; align-items: center; }
.workspace-header-start { gap: 15px; min-width: 0; }
.workspace-context { gap: 10px; min-width: 0; font-size: 12px; }
.workspace-context > span { color: #65765e; white-space: nowrap; }
.workspace-context .ui-icon { width: 12px; height: 12px; color: #a2aca0; }
.workspace-context strong { font-size: 12px; font-weight: 600; color: #556d59; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-header-actions { gap: 22px; flex: 0 0 auto; }
.workspace-website-link { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; color: #607357; }
.workspace-website-link .ui-icon { width: 13px; height: 13px; }
.workspace-user { gap: 10px; padding-left: 22px; border-left: 1px solid var(--line); }
.workspace-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #eef3e7; color: #668056; }
.workspace-avatar .ui-icon { width: 17px; height: 17px; }
.workspace-user strong { display: block; font-size: 12px; font-weight: 700; line-height: 1.5; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-user div > span { display: block; font-size: 10px; line-height: 1.5; color: #5f715a; }
.workspace-logout { border: 0; color: #83917d; width: 32px; height: 36px; }
.workspace-logout .ui-icon { width: 17px; height: 17px; }
.workspace-menu-toggle, .sidebar-close { display: none; }
.workspace-backdrop { display: none; }
.app-work > main { margin-left: var(--sidebar-width); min-height: calc(100dvh - 138px); padding: 37px 38px 55px; }
.app-work .portal-shell { padding: 0; background: transparent; min-height: 0; max-width: 1500px; margin: 0 auto; }
.app-work .work-tabs { display: none; }
.app-work .portal-heading { margin-bottom: 31px; }
.app-work .portal-heading .eyebrow { font-size: 9px; letter-spacing: 1.5px; margin-bottom: 9px; }
.app-work .portal-heading h1 { font-size: 29px; font-weight: 700; letter-spacing: -.9px; margin: 0 0 9px; }
.app-work .portal-heading > p:not(.eyebrow) { color: #5e7159; font-size: 12px; line-height: 1.8; }
.work-section-heading { margin: 27px 0 18px; }
.work-section-heading .eyebrow { display: none; }
.work-section-heading h2 { font-size: 19px; font-weight: 700; letter-spacing: -.5px; margin: 0 0 7px; }
.work-section-heading p { font-size: 12px; line-height: 1.8; }
.app-work:is([data-page="work_queue"], [data-page="work_patients"]) .portal-heading { margin-bottom: 14px; }
.app-work:is([data-page="work_queue"], [data-page="work_patients"]) .portal-heading > .muted,
.app-work:is([data-page="work_queue"], [data-page="work_patients"]) .work-section-heading h2 { display: none; }
.app-work:is([data-page="work_queue"], [data-page="work_patients"]) .work-section-heading { margin: 0 0 20px; }
.app-work .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 30px; }
.app-work .portal-card { min-height: 225px; }
.app-work .site-footer { margin-left: var(--sidebar-width); padding: 20px 38px; background: var(--mist); font-size: 9px; }
.accounting-tabs { width: fit-content; max-width: 100%; padding: 5px; margin: 0 0 28px; gap: 3px; border: 1px solid #dfe7d9; border-radius: 11px; background: #edf2e7; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.accounting-tabs a { padding: 9px 13px; border-radius: 7px; font-size: 12px; font-weight: 650; white-space: nowrap; color: #607357; }
.accounting-tabs a i { margin-right: 4px; }
.accounting-tabs a[aria-current="page"] { background: #fff; color: var(--forest); box-shadow: 0 1px 4px rgba(25,58,48,.06); }
.work-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.work-columns > div { min-width: 0; }
.work-dashboard:has([data-dialog-open="manual-queue-create"]) > .work-columns { gap: 24px; }
.work-metrics, .report-metrics { gap: 18px; margin: 26px 0; }
.work-metrics > *, .report-metrics > * { border: 1px solid var(--line); border-radius: 15px; padding: 23px; background: #fff; box-shadow: var(--shadow-card); }
.work-metrics strong, .report-metrics strong { font-family: inherit; font-size: 30px; letter-spacing: -1px; }
.work-metrics small, .report-metrics small { color: #607357; font-size: 11px; }
.report-filter { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 18px; }

/* Tables preserve native semantics, action forms, selection and paging. */
.data-table-shell { min-width: 0; margin: 18px 0 31px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-card); }
.data-table-toolbar { padding: 0 20px 0 0; background: #fff; border-color: var(--line); border-radius: 15px 15px 0 0; gap: 20px; }
.data-table-controls { padding: 20px; background: #fff; border-color: var(--line); border-radius: 15px 15px 0 0; gap: 18px; }
.data-table-controls label { gap: 6px; font-size: 11px; font-weight: 600; color: #63775a; }
.genqi-app .data-table-controls input, .genqi-app .data-table-controls select { min-height: 37px; padding: 8px 11px; font-size: 12px; border-color: #e1e8db; border-radius: 7px; background: #fcfdfb; }
.genqi-app .data-table-controls select { width: 80px; }
.data-table-search input { min-width: 240px; }
.data-table-toolbar > .button { margin: 0; }
.data-table-count { font-size: 11px; color: #627559; font-variant-numeric: tabular-nums; padding-bottom: 9px; }
.bulk-actions { padding: 12px 20px; gap: 10px; border-color: var(--line); background: #fbfcf9; align-items: center; }
.bulk-actions > label { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: #65795c; margin-right: 3px; }
.bulk-actions .button { min-height: 31px; padding: 6px 10px; font-size: 11px; border-radius: 6px; }
.bulk-actions .button i { font-size: 10px; }
.table-action-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 20px; }
.table-bulk-controls, .table-bulk-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.table-selection-controls > label { display: inline-flex; align-items: center; gap: 8px; color: #65795c; font-size: 11px; white-space: nowrap; }
.table-bulk-buttons:empty, .table-selection-controls:empty { display: none; }
.table-action-bar > .table-page-size { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; margin: 0 0 0 auto; color: #63775a; font-size: 11px; font-weight: 500; white-space: nowrap; }
.genqi-app .table-page-size select { width: 76px; min-height: 34px; padding: 6px 10px; border-color: #dfe7d9; border-radius: 7px; background: #fff; font-size: 12px; }
.work-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; border-color: var(--line); scrollbar-width: thin; scrollbar-color: #cdd9c4 transparent; }
.data-table-shell > .work-table-wrap { border-left: 0; border-right: 0; }
.work-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 13px; color: #4e6652; }
.app-work .work-table { min-width: 720px; }
.app-work [data-patient-grid] .work-table { min-width: 1050px; }
.table-scroll-hint { display: none; }
.work-table th { padding: 15px 20px; background: #f8faf5; color: #65765b; font-size: 11px; font-weight: 650; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
.work-table td { padding: 17px 20px; border-bottom: 1px solid #eef2e9; vertical-align: middle; }
.work-table th { border-bottom: 1px solid var(--line); }
.work-table tbody tr:last-child td { border-bottom: 0; }
.work-table tbody tr { transition: background var(--transition); }
.work-table tbody tr:hover { background: #fbfdf8; }
.work-table tbody tr:has([data-grid-select]:checked) { background: #f0f6e8; }
.work-table td strong { color: #2c503a; font-weight: 650; }
.work-table td small { color: #65765e; font-size: 11px; margin-top: 5px; line-height: 1.6; }
.work-table th:first-child:empty { width: 43px; }
.work-table th button::after { padding-left: 4px; font-size: 9px; color: #a0ae94; }
.action-icons { white-space: nowrap; }
.icon-action { width: 30px; height: 30px; border: 1px solid #e1e8dc; border-radius: 7px; background: #fff; color: #58734b; margin: 2px; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.icon-action i { font-size: 12px; }
.icon-action:hover { background: #eef5e7; border-color: #bdd1ae; color: #41673b; }
.icon-action.danger:hover { background: #fdf0ed; color: #a74948; border-color: #e4bdb3; }
.data-table-pagination { border-top-color: var(--line); padding: 16px 20px; gap: 6px; }
.data-table-pagination button { min-width: 31px; min-height: 31px; border-radius: 7px; border-color: #e0e8da; color: #627357; font-size: 10px; }
.data-table-pagination button[aria-current="page"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.data-table-shell > h3 { margin: 0; padding: 22px 20px 0; font-size: 17px; letter-spacing: -.4px; }
.data-empty td { padding: 40px 20px; color: #90a185; text-align: center; font-size: 12px; }
.therapist-avatar { border: 2px solid #eef3e8; width: 38px; height: 38px; }
.patient-address-cell { max-width: 280px; min-width: 180px; }

/* Receipt improvements are screen-only because this sheet is loaded with media=screen there. */
.receipt-page { min-height: 100dvh; padding: 50px 16px; background: #f1f4ed; }
.receipt-page .receipt { width: min(400px, calc(100vw - 32px)); margin: 0 auto; padding: 30px; border: 1px solid #dce6d4; border-radius: 18px; background: #fff; box-shadow: var(--shadow-card); }
.receipt-page .print-button { display: flex; margin: 22px auto 0; }

@keyframes dialog-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }


@media (min-width: 1600px) {
  .app-work > main { padding-right: 54px; padding-left: 54px; }
}
@media (max-width: 1190px) {
  .genqi-hero { gap: 40px; }
  .home-booking-section { gap: 38px; }
  .genqi-intro, .genqi-pricing, .genqi-location { gap: 50px; }
  .app-work .site-header { padding: 0 25px; }
  .app-work > main { padding: 30px 25px 45px; }
  .workspace-header-actions { gap: 15px; }
  .workspace-website-link { display: none; }
  .data-table-search input { min-width: 180px; }
}
@media (max-width: 1050px) {
  .workspace-sidebar { transform: translateX(-100%); transition: transform 200ms ease; z-index: 60; width: min(290px, calc(100vw - 56px)); padding-top: 23px; }
  .app-work .site-header, .app-work > main, .app-work .site-footer { margin-left: 0; }
  .workspace-menu-toggle, .sidebar-close { display: inline-grid; }
  .sidebar-close { width: 34px; height: 34px; border: 0; }
  .nav-open .workspace-sidebar { transform: none; }
  .workspace-backdrop:not([hidden]) { display: block; position: fixed; z-index: 55; inset: 0; border: 0; border-radius: 0; background: rgba(16,34,24,.42); }
  .nav-open { overflow: hidden; }
  .auth-shell, .work-shell { gap: 55px; }
  .booking-calendar-shell { gap: 45px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .booking-intro h1 { font-size: 38px; }
  .calendar-day { min-height: 58px; padding: 8px 5px; }
  .testimonial-track { grid-auto-columns: calc((100% - 18px) / 2); }
}
@media (max-width: 800px) {
  .table-scroll-hint:not([hidden]) { display: flex; justify-content: flex-end; margin: 0; padding: 10px 16px; background: #fbfcf8; border-bottom: 1px solid var(--line); color: #607459; font-size: 10px; }
  .section { padding: 70px 28px; }
  .site-header { height: 76px; padding: 0 26px; }
  .site-header nav { gap: 20px; }
  .genqi-hero { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 27px; min-height: 600px; padding: 55px 28px 65px; }
  .hero h1 { font-size: 44px; letter-spacing: -2px; }
  .hero .lead { font-size: 13px; }
  .genqi-hero-image { height: 430px; border-radius: 55px 20px 20px 20px; }
  .hero .actions { gap: 20px; }
  .trust-row { gap: 10px; font-size: 9px; }
  .home-booking-section { grid-template-columns: 1fr; align-items: start; gap: 32px; }
  .home-booking-heading h2 { max-width: 570px; }
  .home-booking-calendar { max-width: none; }
  .genqi-intro, .genqi-pricing, .genqi-location { grid-template-columns: 1fr; gap: 38px; }
  .genqi-intro-image { max-width: 440px; }
  .genqi-pricing .tariff-poster { justify-self: start; max-width: 380px; }
  .section-heading, .testimonial-heading { flex-direction: column; align-items: start; gap: 18px; }
  .section-heading .muted, .testimonial-heading .muted { max-width: 600px; }
  .auth-shell, .work-shell { gap: 35px; grid-template-columns: 1fr; padding: 50px 28px 70px; max-width: 640px; }
  .auth-intro h1, .work-shell .auth-intro h1 { font-size: 38px; }
  .auth-intro .info-card { margin-top: 22px; }
  .booking-calendar-shell { grid-template-columns: 1fr; padding: 50px 28px 70px; gap: 34px; }
  .booking-intro { max-width: 620px; }
  .booking-intro h1 { font-size: 39px; }
  .booking-intro .info-card { margin-top: 24px; }
  .account-profile-card { grid-template-columns: 1fr; gap: 27px; }
  .customer-bookings-heading { align-items: start; }
  .work-columns { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-header { height: 73px; padding: 0 21px; }
  .brand-logo { width: 110px; max-height: 44px; }
  .public-menu-toggle { display: inline-grid; }
  .app-public .site-header nav { display: none; position: absolute; left: 16px; right: 16px; top: 80px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-floating); flex-wrap: wrap; align-items: center; gap: 8px; }
  .app-public.public-nav-open .site-header nav { display: flex; }
  .app-public .site-header nav a:not(.button) { display: block; flex: 1 0 40%; padding: 12px; font-size: 12px; }
  .app-public .site-header nav .public-login-link { border-left: 0; }
  .app-public .site-header nav .button { flex: 1; }
  .app-public .site-header nav form { flex: 1; }
  .app-public .site-header nav form .button { width: 100%; }
  .section { padding: 58px 22px; }
  .section h2 { font-size: 32px; letter-spacing: -1.2px; }
  .genqi-hero { grid-template-columns: 1fr; min-height: 0; padding: 44px 22px 48px; gap: 35px; }
  .hero h1 { font-size: 44px; letter-spacing: -2px; margin-bottom: 22px; max-width: 460px; }
  .hero .eyebrow { margin-bottom: 20px; }
  .hero .lead { font-size: 13px; line-height: 1.9; }
  .hero .actions { margin: 25px 0; gap: 21px; }
  .hero .button { padding: 12px 16px; }
  .trust-row { gap: 14px; font-size: 10px; }
  .genqi-hero-image { height: 390px; max-width: none; border-radius: 55px 18px 18px 18px; border-width: 5px; }
  .genqi-hero-image img { object-position: 50% 67%; }
  .genqi-hero-image figcaption { bottom: 10px; left: 10px; right: 10px; padding: 10px 12px; font-size: 9px; }
  .home-booking-section { gap: 29px; }
  .home-booking-heading .booking-legend { gap: 12px; font-size: 9px; }
  .booking-calendar-card { padding: 20px 13px; border-radius: 16px; }
  .calendar-heading { margin-bottom: 21px; }
  .calendar-heading h2 { font-size: 17px; }
  .calendar-grid, .calendar-weekdays { gap: 4px; }
  .calendar-weekdays span { font-size: 8px; }
  .calendar-day { min-height: 51px; padding: 7px 3px; align-items: center; text-align: center; border-radius: 7px; }
  .calendar-day b { font-size: 12px; }
  .calendar-day small { font-size: 8px; line-height: 1.2; }
  .calendar-heading .button { width: 33px; min-height: 33px; }
  .benefit-columns { grid-template-columns: 1fr; gap: 24px; }
  .genqi-service-grid { grid-template-columns: 1fr; gap: 13px; margin-top: 28px; }
  .genqi-service-grid article { padding: 25px; }
  .genqi-service-grid h3 { margin-top: 18px; }
  .genqi-service-grid strong { margin-top: 20px; }
  .tariff-list div { flex-direction: row; align-items: center; gap: 18px; }
  .testimonial-heading { margin-bottom: 26px; }
  .testimonial-slider { padding: 0 38px; }
  .testimonial-track { grid-auto-columns: 100%; gap: 15px; }
  .testimonial-card blockquote { font-size: 12px; }
  .testimonial-card img { width: 84px; height: 84px; }
  .testimonial-control { width: 30px; height: 30px; }
  .testimonial-note { margin-top: 22px; font-size: 9px; }
  .genqi-map-frame, .genqi-map-frame iframe { min-height: 290px; border-radius: 15px; }
  .genqi-contact { gap: 27px; }
  .genqi-contact .button { align-self: start; }
  .site-footer { padding: 24px 22px; align-items: start; flex-direction: column; gap: 7px; font-size: 10px; }
  .auth-shell, .work-shell { padding: 42px 22px 60px; gap: 30px; }
  .auth-intro h1, .work-shell .auth-intro h1 { font-size: 35px; letter-spacing: -1.6px; }
  .auth-intro .info-card { padding: 15px 18px; font-size: 11px; }
  .auth-form { padding: 27px 24px; border-radius: 17px; }
  .portal-shell:not(.work-dashboard) { padding: 44px 22px 64px; }
  .portal-heading h1 { font-size: 30px; }
  .portal-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
  .portal-card { min-height: 210px; padding: 25px; }
  .customer-bookings-card, .account-profile-card { padding: 24px 20px; border-radius: 16px; }
  .customer-bookings-heading { gap: 14px; flex-direction: column; }
  .customer-booking-item { padding: 18px; flex-direction: column; align-items: start; gap: 18px; }
  .customer-booking-action { justify-items: start; text-align: left; }
  .account-profile-form { grid-template-columns: 1fr; gap: 20px; }
  .account-profile-actions { flex-direction: column; align-items: stretch; }
  .booking-calendar-shell { padding: 43px 22px 60px; gap: 30px; }
  .booking-intro h1 { font-size: 37px; letter-spacing: -1.7px; }
  .booking-intro .booking-legend { gap: 11px; font-size: 9px; }
  .booking-intro .info-card { font-size: 11px; }
  .accounting-dialog, .booking-dialog { width: calc(100vw - 28px); max-height: calc(100dvh - 28px); border-radius: 17px; }
  .accounting-dialog form, .booking-dialog .booking-form, .patient-history-dialog > div { --dialog-space: 21px; --dialog-pad-y: 25px; padding: 25px 21px; }
  .accounting-dialog h3, .booking-form-calendar h2 { font-size: 21px; }
  .dialog-actions { flex-direction: column-reverse; gap: 9px; padding-top: 18px; }
  .dialog-actions .button { width: 100%; }
  .dialog-heading { gap: 14px; }
  .dialog-heading h2 { font-size: 21px; }
  .dialog-heading .eyebrow { font-size: 8px; }
  .booking-confirmation-details div { grid-template-columns: 1fr; gap: 5px; padding: 13px 15px; }
  .customer-hour-grid, .hour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .booking-therapist-preview { min-height: 190px; padding: 20px; }
  .booking-therapist-photo, .booking-therapist-photo-fallback { width: 150px; height: 150px; }
  .patient-history-item { padding: 16px; }
  .patient-history-item header { flex-direction: column; align-items: start; gap: 5px; }
  .patient-history-item header small { text-align: left; }
  .app-work .site-header { height: 69px; padding: 0 18px; gap: 12px; }
  .workspace-header-start { gap: 10px; }
  .workspace-context { gap: 6px; }
  .workspace-context > span, .workspace-context > .ui-icon { display: none; }
  .workspace-context strong { max-width: 145px; font-size: 11px; }
  .workspace-header-actions { gap: 6px; }
  .workspace-user { padding-left: 0; border: 0; }
  .workspace-user > div { display: none; }
  .workspace-avatar { width: 31px; height: 31px; }
  .workspace-logout { width: 30px; }
  .workspace-menu-toggle { width: 35px; height: 35px; border-color: #e4eadf; }
  .workspace-menu-toggle .ui-icon { width: 18px; height: 18px; }
  .app-work > main { padding: 29px 18px 40px; }
  .app-work .portal-heading { margin-bottom: 26px; }
  .app-work .portal-heading h1 { font-size: 26px; }
  .app-work .portal-heading > p:not(.eyebrow) { font-size: 12px; }
  .app-work .portal-grid { grid-template-columns: 1fr; gap: 15px; }
  .app-work .site-footer { padding: 22px 18px; }
  .work-section-heading { margin-top: 24px; }
  .work-section-heading h2 { font-size: 18px; }
  .work-section-heading p { font-size: 12px; }
  .accounting-tabs { width: 100%; gap: 2px; margin-bottom: 25px; padding: 4px; }
  .accounting-tabs a { padding: 8px 11px; font-size: 11px; }
  .accounting-tabs a i { display: none; }
  .data-table-toolbar { display: flex; flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
  .data-table-toolbar > .button { width: auto; align-self: start; margin: 0 16px 16px; }
  .data-table-controls { padding: 17px 16px; gap: 14px; align-items: end; }
  .data-table-controls label { flex: 0 0 auto; }
  .data-table-controls label.data-table-search { flex: 1 1 100%; }
  .data-table-search input { min-width: 0; }
  .data-table-count { width: auto; margin-left: auto; padding-bottom: 5px; }
  .bulk-actions { padding: 12px 16px; gap: 8px; }
  .bulk-actions > label { font-size: 11px; margin-right: 6px; }
  .bulk-actions .button { flex: 0 1 auto; padding: 7px 9px; }
  .table-action-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; }
  .table-bulk-controls { display: contents; }
  .table-selection-controls { grid-column: 1; grid-row: 1; }
  .table-bulk-buttons { grid-column: 1 / -1; grid-row: 2; gap: 8px; }
  .table-action-bar > .table-page-size { grid-column: 2; grid-row: 1; gap: 5px; font-size: 10px; }
  .genqi-app .table-page-size select { width: 66px; min-height: 34px; padding: 6px 8px; font-size: 11px; }
  .work-table th { font-size: 10px; padding: 13px 15px; }
  .work-table td { font-size: 12px; padding: 15px; }
  .work-table td small { font-size: 10px; }
  .data-table-shell > h3 { padding: 18px 16px 0; font-size: 16px; }
  .data-table-pagination { padding: 14px 16px; }
  .work-metrics, .report-metrics { grid-template-columns: 1fr; gap: 12px; }
  .work-metrics > *, .report-metrics > * { padding: 20px; }
  .receipt-page { padding-top: 30px; }
}
@media (max-width: 359px) {
  .hero h1 { font-size: 39px; }
  .hero .actions { gap: 16px; }
  .hero .button { font-size: 11px; }
  .trust-row { gap: 11px; font-size: 8px; }
  .calendar-grid, .calendar-weekdays { gap: 3px; }
  .calendar-day small { font-size: 6px; }
  .workspace-context strong { max-width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Stock ledger: spreadsheet-style editing with calculated balances. */
.stock-ledger-help { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 20px; padding:12px 20px; color:var(--text-muted, #637568); font-size:12px; border-bottom:1px solid #e6ebe3; }
.stock-ledger [data-stock-status] { color:#246548; font-weight:600; }
.stock-ledger [data-stock-status].stock-save-error { color:#a03535; }
.stock-ledger .stock-cell-button { display:block; width:100%; min-height:40px; padding:8px 10px; margin:-6px 0; border:1px solid transparent; border-radius:6px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:text; white-space:nowrap; }
.stock-ledger .stock-cell-button:hover { background:#edf3e9; border-color:#d7e2d1; }
.stock-ledger .stock-cell-button:focus-visible { outline:2px solid #42694d; outline-offset:2px; }
.stock-ledger .stock-cell-input { width:100%; min-width:90px; min-height:40px; margin:-6px 0; padding:8px 10px; border:1px solid #527c58; border-radius:6px; background:#fff; font:inherit; color:inherit; }
.stock-ledger [data-stock-cell="name"] { min-width:200px; }
.stock-ledger [data-stock-cell="date"] { min-width:170px; }
.stock-ledger tr[aria-busy="true"] .stock-cell-input { background:#f1f5ee; }
.stock-ledger [data-stock-balance] { display:inline-block; min-width:32px; color:#234f3b; }
@media (max-width:620px) { .stock-ledger-help { padding:12px 14px; font-size:11px; } }

/* Queue history uses the shared grid controls and an explicit period selector. */
.queue-heading-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.queue-history-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.queue-history-filters { padding:22px; margin:0 0 22px; border:1px solid #e3e9e2; border-radius:14px; background:#fff; }
.history-periods { display:flex; flex-wrap:wrap; gap:5px; width:fit-content; padding:5px; margin-bottom:20px; border-radius:10px; background:#f0f4ec; }
.history-periods a { padding:10px 16px; border-radius:7px; color:#4f6254; font-size:12px; font-weight:600; text-decoration:none; }
.history-periods a[aria-current="page"] { color:#fff; background:#173d31; }
.history-periods a:hover { box-shadow:inset 0 0 0 1px #9eaf98; }
.history-date-form { display:flex; align-items:flex-end; flex-wrap:wrap; gap:14px; }
.history-date-form label { flex:0 1 220px; min-width:0; margin:0; }
.history-date-form button { margin-bottom:0; min-height:44px; }
.history-range { margin:16px 0 0; color:#5c6d62; font-size:12px; line-height:1.8; }
.queue-history-table table { min-width:1040px; }
@media(max-width:620px) {
 .queue-heading-actions { width:100%; }
 .queue-history-heading { flex-direction:column; align-items:flex-start; gap:12px; }
 .queue-history-filters { padding:16px; }
 .history-periods { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:100%; gap:2px; }
 .history-periods a { padding:10px 5px; text-align:center; font-size:11px; }
 .history-date-form { align-items:stretch; gap:12px; }
 .history-date-form label { flex:1 1 100%; }
 .history-date-form button { width:100%; }
}

/* Therapist capacity and selectable photo cards. */
.hour-legend { flex-wrap:wrap; gap:10px 16px; line-height:1.5; }
.hour-partial { background:#e7b342; }
.customer-hour-partial, .hour-grid > .hour-partial { background:#fff4d7; border-color:#e9cc79; color:#795a0b; }
.customer-hour-partial:not(:disabled):hover { background:#fbeab9; transform:none; }
.booking-therapist-cards { margin:20px 0; padding:0; min-width:0; border:0; }
.booking-therapist-cards legend { padding:0; margin-bottom:12px; font-size:15px; font-weight:700; color:#173d31; }
.booking-therapist-cards .field-note { margin:0 0 14px; }
.therapist-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.booking-form .therapist-option { display:block; position:relative; margin:0; min-width:0; cursor:pointer; }
.therapist-option > input { position:absolute; width:1px; height:1px; padding:0; margin:0; opacity:0; }
.therapist-option-face { display:flex; flex-direction:column; align-items:center; gap:12px; padding:20px 12px; height:100%; border:2px solid #e2e9dd; border-radius:14px; background:#fff; text-align:center; transition:border-color .15s,background .15s; }
.therapist-option-face > img, .therapist-option-fallback { width:112px; height:112px; flex-shrink:0; border-radius:50%; object-fit:cover; border:4px solid #f0f4ec; }
.therapist-option-fallback { display:grid; place-items:center; background:#e8f0e2; font-size:30px; font-weight:700; color:#5b7650; }
.therapist-option-face strong { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.therapist-option-status { display:inline-block; margin-top:auto; padding:5px 10px; border-radius:30px; font-size:11px; font-weight:600; color:#285a39; background:#eaf3e4; }
.therapist-option > input:checked + .therapist-option-face { border-color:#326645; background:#f0f7eb; box-shadow:0 0 0 1px #326645; }
.therapist-option > input:focus-visible + .therapist-option-face { outline:3px solid #829c60; outline-offset:3px; }
.therapist-option:not(.therapist-option-booked):hover .therapist-option-face { border-color:#719268; }
.therapist-option-booked { cursor:not-allowed !important; }
.therapist-option-booked .therapist-option-face { background:#f5f6f3; border-color:#e5e7e1; }
.therapist-option-booked img { filter:grayscale(1); opacity:.7; }
.therapist-option-booked .therapist-option-status { color:#6d4c41; background:#eee6df; }
.therapist-selection-note { min-height:20px; margin:14px 0 0; color:#5c6d62; font-size:12px; line-height:1.7; }
@media(max-width:620px) {
 .therapist-options { gap:10px; }
 .therapist-option-face { padding:16px 8px; gap:10px; }
 .therapist-option-face > img, .therapist-option-fallback { width:96px; height:96px; }
 .therapist-option-face strong { font-size:12px; }
 .therapist-option-status { font-size:10px; padding:5px 8px; }
}
@media(max-width:359px) { .therapist-options { grid-template-columns:1fr; } }

@media(max-width:620px) {
 .booking-confirm-dialog .dialog-heading h2 { font-size:19px; line-height:1.4; }
 .booking-confirm-dialog .booking-confirmation-details div { grid-template-columns:74px minmax(0,1fr); gap:10px; padding:12px; }
 .booking-confirm-dialog .booking-confirmation-details dd { overflow-wrap:anywhere; }
}

/* Patient histories fetch five records per page instead of embedding all notes. */
.patient-history-list { overscroll-behavior:contain; scrollbar-gutter:stable; scroll-padding:12px; }
.patient-history-list:focus-visible { outline:2px solid #668355; outline-offset:4px; border-radius:8px; }
.patient-history-records { display:grid; gap:14px; min-width:0; }
.patient-history-item { overflow-wrap:anywhere; }
.patient-history-progress { display:grid; justify-items:center; gap:10px; padding:12px 4px; text-align:center; }
.patient-history-progress p { margin:0; font-size:12px; line-height:1.6; }
.patient-history-loading { display:flex; align-items:center; justify-content:center; gap:10px; min-height:36px; font-size:12px; color:#42664b; }
.history-spinner { display:inline-block; width:22px; height:22px; flex:0 0 auto; border:2px solid #dce7d5; border-top-color:#326645; border-radius:50%; animation:history-loading .75s linear infinite; }
@keyframes history-loading { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .history-spinner { animation:none; } }
