:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; color: #18352f; background: #f4f7f5; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 0%, #e4f4ed 0, transparent 30rem), #f4f7f5; }
a { color: inherit; }
button, input, select { font: inherit; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 3.5rem 0 5rem; }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); border-bottom: 1px solid #dce7e2; backdrop-filter: blur(16px); }
.topbar__inner { width: min(1440px, calc(100% - 2rem)); height: 72px; margin: auto; display: flex; align-items: center; gap: 1rem; overflow: visible; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand__name { display: inline-flex; align-items: baseline; gap: .35rem; white-space: nowrap; }
.brand__name b { font: inherit; }
.brand > span:last-child > span { color: #2f806b; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: #27725f; border-radius: 10px; }
.brand__mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: .4rem; margin-right: auto; }
.nav a { padding: .55rem .8rem; border-radius: .6rem; color: #59706a; text-decoration: none; font-size: .92rem; font-weight: 650; }
.nav a:hover, .nav a.is-active { color: #1e5f50; background: #eaf4f0; }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 9px; border: 1px solid #d7e3df; border-radius: .7rem; background: #fff; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: #315f54; }
.person-switcher { flex: 0 1 220px; min-width: 185px; }
.person-switcher label { display: grid; gap: .15rem; }
.person-switcher label > span { color: #71837e; font-size: .63rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.person-switcher select { width: 100%; padding: .45rem .6rem; border: 1px solid #cddcd7; border-radius: .65rem; color: #245448; background: #f8fbfa; font-size: .84rem; font-weight: 750; }
.topbar__inner > form:last-child { flex: 0 0 auto; }
.logout { padding: .5rem .8rem; border: 1px solid #d7e3df; border-radius: .6rem; color: #526b65; background: #fff; cursor: pointer; }
.guest-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, #d9f1e8, transparent 32rem); }
.auth-card { width: min(460px, 100%); padding: 2.5rem; border: 1px solid #dce9e4; border-radius: 1.5rem; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(31,74,63,.13); }
.auth-card h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.eyebrow { margin: 0 0 .55rem; color: #277461; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .85rem; font-size: clamp(2.35rem, 5vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; }
h2 { margin-bottom: .45rem; letter-spacing: -.025em; }
.muted { color: #6d807b; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .75rem 1.1rem; border: 0; border-radius: .75rem; text-decoration: none; font-weight: 750; cursor: pointer; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button--compact { min-height: 40px; padding: .55rem .85rem; font-size: .9rem; }
.button--primary { color: #fff; background: #27725f; box-shadow: 0 8px 20px rgba(39,114,95,.2); }
.button--secondary { color: #245f51; background: #edf5f2; border: 1px solid #d5e6e0; }
.button--google { width: 100%; margin-top: 1rem; color: white; background: #1a73e8; }
.alert { margin-bottom: 1rem; padding: .85rem 1rem; border-radius: .75rem; }
.alert--error { color: #8b1e1e; background: #fdeaea; }
.alert--success { color: #155f49; background: #e2f4ec; }
.hero { display: grid; grid-template-columns: 1fr 260px; align-items: center; gap: 3rem; min-height: 340px; padding: 2rem 0 3.5rem; }
.hero h1 span { color: #2f806b; }
.hero p:not(.eyebrow) { max-width: 620px; color: #657b75; font-size: 1.08rem; line-height: 1.7; }
.hero-mark { justify-self: end; display: grid; place-items: center; width: 220px; aspect-ratio: 1; border-radius: 38% 62% 55% 45% / 46% 42% 58% 54%; color: #fff; background: linear-gradient(145deg, #397e6c, #8bc4ae); box-shadow: inset 0 0 0 22px rgba(255,255,255,.13), 0 30px 55px rgba(51,126,106,.24); transform: rotate(7deg); }
.hero-mark span { font-size: 7rem; font-weight: 200; transform: rotate(-7deg); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.1rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.module-card { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 130px; padding: 1.25rem; overflow: hidden; border: 1px solid #dde7e3; border-radius: 1.1rem; background: #fff; box-shadow: 0 12px 30px rgba(25,62,52,.06); }
.module-card { text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.module-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(25,62,52,.1); }
.module-card h3 { margin-bottom: .25rem; }
.module-card p { margin: 0; color: #72827e; font-size: .9rem; }
.module-icon { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 15px; font-weight: 850; }
.module-card--green .module-icon { color: #22604f; background: #dff1ea; }
.module-card--blue .module-icon { color: #315f7b; background: #e1eef5; }
.module-card--amber .module-icon { color: #785b27; background: #f6ecd5; }
.arrow { margin-left: auto; color: #8a9b96; font-size: 1.3rem; }
.empty-panel { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1.25rem; border: 1px dashed #cddbd6; border-radius: 1rem; background: rgba(255,255,255,.55); }
.empty-panel h2 { margin-bottom: .2rem; font-size: 1rem; }
.empty-panel p { margin: 0; color: #71817d; font-size: .9rem; }
.empty-panel .button { margin-left: auto; }
.empty-panel__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #347462; background: #e0f1eb; }
.setup-shell { display: grid; grid-template-columns: 1.1fr .9fr; gap: 5rem; align-items: center; min-height: calc(100vh - 160px); }
.setup-copy h1 { max-width: 620px; }
.setup-copy > p { max-width: 560px; color: #657b75; font-size: 1.08rem; line-height: 1.7; }
.pill { display: inline-flex; margin-bottom: 1.2rem; padding: .35rem .65rem; color: #246450; background: #dcf0e8; border-radius: 2rem; font-size: .8rem; font-weight: 750; }
.feature-list { display: grid; gap: .7rem; padding: 0; list-style: none; color: #425f57; }
.feature-list li::before { content: '✓'; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: .55rem; color: #fff; background: #39816e; border-radius: 50%; font-size: .75rem; }
.form-card, .panel { padding: 1.5rem; border: 1px solid #dce7e3; border-radius: 1.15rem; background: #fff; box-shadow: 0 16px 45px rgba(30,70,60,.08); }
.form-card { display: grid; gap: 1.25rem; padding: 2rem; }
.form-stack { display: grid; gap: 1rem; align-content: start; }
.field { display: grid; gap: .45rem; color: #38544d; font-size: .9rem; font-weight: 700; }
.field input, .field select { width: 100%; padding: .8rem .9rem; border: 1px solid #cddcd7; border-radius: .7rem; color: #193a32; background: #fbfdfc; outline: none; }
.field input:focus, .field select:focus { border-color: #4a927e; box-shadow: 0 0 0 3px rgba(74,146,126,.14); }
.field-error { color: #a12b2b; font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.5rem; }
.page-heading h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
.list-stack { display: grid; gap: .75rem; }
.list-stack--inside { margin-top: 1rem; }
.list-card, .member-row { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #dce7e3; border-radius: .9rem; background: #fff; }
.list-card__content { flex: 1; }
.list-card h2 { margin: 0; font-size: 1.05rem; }
.list-card p, .member-row span { margin: .15rem 0 0; color: #70817c; font-size: .85rem; }
.family-card.is-current { border-color: #78a99b; background: #f5fbf8; box-shadow: 0 0 0 2px rgba(67,134,116,.09); }
.family-card__title { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.family-card__actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.family-card--archived { border-style: dashed; background: #f7f9f8; }
.family-card--archived .avatar { color: #63756f; background: #dfe7e4; }
.button--archive { color: #8a5d2e; background: #fff8eb; border: 1px solid #ead8b8; }
.members-layout--single { grid-template-columns: 1fr; }
.invitation-create { align-content: center; background: linear-gradient(145deg,#fff,#edf7f3); }
.invitation-rules { display: grid; gap: .5rem; margin: 0; padding: 0; color: #526b65; list-style: none; font-size: .85rem; }
.invitation-rules li::before { content: '✓'; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: .45rem; border-radius: 50%; color: #fff; background: #3d826f; font-size: .7rem; }
.generated-invitation { margin-top: 1rem; padding: 1.35rem; border: 1px solid #a9cfbf; border-radius: 1.1rem; background: #edfaf4; box-shadow: 0 14px 36px rgba(39,114,95,.09); }
.generated-invitation h2 { margin-bottom: .3rem; }
.generated-invitation > div:first-child > p:last-child { color: #657b75; }
.copy-invitation { display: grid; grid-template-columns: 1fr auto; gap: .6rem; margin-top: 1rem; }
.copy-invitation input { min-width: 0; padding: .8rem .9rem; border: 1px solid #abd0c1; border-radius: .7rem; color: #245448; background: #fff; }
.copy-feedback { min-height: 1.2rem; margin: .6rem 0 0; color: #286a58; font-size: .82rem; font-weight: 750; }
.invitation-list { display: grid; gap: .65rem; }
.invitation-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid #dce7e3; border-radius: .9rem; background: #fff; }
.invitation-row__mark { width: 12px; height: 42px; border-radius: 8px; background: var(--invite-color); }
.invitation-row__top { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.invitation-row__top span { padding: .25rem .5rem; border-radius: 2rem; color: var(--invite-color); background: color-mix(in srgb,var(--invite-color) 11%,white); font-size: .72rem; font-weight: 850; }
.invitation-row p { margin: .25rem 0; color: #657b75; font-size: .82rem; }
.invitation-row small { color: #85938f; }
.invitation-entry { text-align: center; }
.invitation-entry h1 { margin: .7rem 0 1rem; font-size: clamp(2rem,8vw,2.7rem); }
.invitation-entry > p:not(.eyebrow):not(.invitation-entry__note) { color: #60766f; line-height: 1.6; }
.invitation-entry__mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 1rem; border-radius: 18px; color: #fff; background: linear-gradient(145deg,#347b68,#74ad9b); font-size: 1.5rem; font-weight: 900; }
.invitation-entry__mark--invalid { background: linear-gradient(145deg,#a54d4d,#d18484); }
.invitation-entry__note { margin: 1rem 0 0; color: #7a8a85; font-size: .8rem; }
.invitation-account { display: grid; gap: .25rem; margin: 1.2rem 0; padding: 1rem; border: 1px solid #d2e4de; border-radius: .9rem; background: #f3f8f6; }
.invitation-account span { color: #748781; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.invitation-account small { color: #6b7f79; }
.invitation-accept { width: 100%; }
.avatar { display: grid; place-items: center; flex: 0 0 42px; height: 42px; color: #fff; background: #4a8877; border-radius: 50%; font-weight: 800; }
.avatar--family { border-radius: 12px; }
.member-row > div:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.member-role-form { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .55rem; margin-left: auto; }
.member-role-form select { min-width: 150px; padding: .52rem .65rem; border: 1px solid #cddcd7; border-radius: .65rem; color: #193a32; background: #fbfdfc; }
.badge { padding: .3rem .55rem; border-radius: 2rem; color: #2c6757 !important; background: #e6f3ee; font-size: .75rem !important; font-weight: 750; }
.two-column { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1rem; }
.empty-state { display: grid; justify-items: center; max-width: 620px; margin: 4rem auto; padding: 3rem; text-align: center; border: 1px dashed #c9dbd4; border-radius: 1.25rem; background: rgba(255,255,255,.62); }
.empty-state__mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1rem; border-radius: 20px; color: #fff; background: linear-gradient(145deg,#367d69,#78b6a1); font-size: 2rem; }
.empty-state p { max-width: 460px; color: #6f817c; }
.people-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.person-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; min-height: 150px; padding: 1.25rem; border: 1px solid #dce7e3; border-radius: 1.1rem; background: #fff; box-shadow: 0 12px 30px rgba(25,62,52,.055); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.person-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(25,62,52,.1); }
.person-card.is-active { border-color: #438674; box-shadow: 0 0 0 2px rgba(67,134,116,.12), 0 16px 36px rgba(25,62,52,.1); }
.active-person-badge { display: inline-flex; margin-top: .35rem; padding: .25rem .5rem; border-radius: 2rem; color: #23634f; background: #e0f2eb; font-size: .7rem; font-weight: 800; }
.person-card__main h2 { margin: 0 0 .2rem; font-size: 1.15rem; }
.person-card__main p { margin: 0; color: #74847f; }
.avatar--large { width: 56px; height: 56px; border-radius: 17px; font-size: 1.2rem; }
.person-stats { grid-column: 2 / 4; display: flex; gap: 1rem; color: #71827d; font-size: .82rem; }
.person-stats strong { color: #2d5f52; }
.page-heading--form { align-items: start; }
.back-link { display: inline-block; margin-bottom: 1.5rem; color: #56736b; text-decoration: none; font-size: .9rem; }
.record-form { display: grid; gap: 1rem; }
.form-section { padding: 1.5rem; border: 1px solid #dce7e3; border-radius: 1.1rem; background: #fff; }
.form-section__heading { display: flex; gap: .85rem; margin-bottom: 1.25rem; }
.form-section__heading > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; color: #fff; background: #3f806e; font-weight: 800; }
.form-section__heading h2 { margin: 0 0 .15rem; font-size: 1.05rem; }
.form-section__heading p { margin: 0; color: #758680; font-size: .88rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.field--wide { grid-column: 1 / -1; }
.field textarea { width: 100%; resize: vertical; padding: .8rem .9rem; border: 1px solid #cddcd7; border-radius: .7rem; color: #193a32; background: #fbfdfc; outline: none; font: inherit; font-weight: 400; }
.field textarea:focus { border-color: #4a927e; box-shadow: 0 0 0 3px rgba(74,146,126,.14); }
.form-actions { display: flex; justify-content: flex-end; gap: .7rem; padding-top: .5rem; }
.profile-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; padding: 1.5rem; border: 1px solid #dce7e3; border-radius: 1.2rem; background: linear-gradient(120deg,#fff,#edf7f3); }
.avatar--profile { width: 76px; height: 76px; border-radius: 22px; font-size: 1.65rem; }
.profile-header__main { flex: 1; }
.profile-header h1 { margin: 0 0 .35rem; font-size: clamp(2rem,4vw,3.2rem); }
.profile-header__main > p:last-child { margin: 0; color: #687d77; }
.profile-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; }
.detail-list { display: grid; gap: .9rem; margin-top: 1rem; }
.detail-list div { display: grid; gap: .2rem; padding-bottom: .8rem; border-bottom: 1px solid #e7eeeb; }
.detail-list div:last-child { border-bottom: 0; }
.detail-list span { color: #73847f; font-size: .8rem; }
.detail-list strong { font-size: .95rem; white-space: pre-line; }
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 1rem 0; }
.stats-row div { display: grid; justify-items: center; padding: 1rem; border: 1px solid #dce7e3; border-radius: .9rem; background: #fff; }
.stats-row strong { color: #2f7562; font-size: 1.6rem; }
.stats-row span { color: #778782; font-size: .8rem; }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; gap: .75rem; margin-bottom: 1.5rem; padding: 1rem; border: 1px solid #dce7e3; border-radius: 1rem; background: #fff; }
.filter-bar label { display: grid; gap: .4rem; color: #506a63; font-size: .78rem; font-weight: 750; }
.filter-bar input, .filter-bar select { width: 100%; min-height: 40px; padding: .55rem .65rem; border: 1px solid #cddcd7; border-radius: .65rem; color: #193a32; background: #fbfdfc; }
.timeline { position: relative; display: grid; gap: .85rem; }
.timeline::before { content: ''; position: absolute; top: 1.7rem; bottom: 1.7rem; left: 104px; width: 2px; background: #d5e6e0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 80px 20px 1fr auto; align-items: center; gap: 1rem; min-height: 126px; padding: 1.15rem 1.2rem; border: 1px solid #dce7e3; border-radius: 1rem; background: #fff; box-shadow: 0 10px 28px rgba(25,62,52,.05); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.timeline-item:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(25,62,52,.1); }
.timeline-item__date { display: grid; gap: .2rem; color: #2e6255; text-align: right; }
.timeline-item__date strong { font-size: 1rem; }
.timeline-item__date span { color: #7b8c87; font-size: .78rem; }
.timeline-item__dot { z-index: 1; width: 14px; height: 14px; margin: auto; border: 3px solid #fff; border-radius: 50%; background: #4c8d7b; box-shadow: 0 0 0 2px #91b9ad; }
.timeline-item__dot--terapia { background: #7667a8; box-shadow: 0 0 0 2px #b8add9; }
.timeline-item__dot--examen { background: #c48738; box-shadow: 0 0 0 2px #e3c18f; }
.timeline-item__body h2 { margin: .55rem 0 .2rem; font-size: 1.12rem; }
.timeline-item__body p { margin: 0; color: #73847f; font-size: .9rem; }
.timeline-item__top { display: flex; align-items: center; gap: .55rem; }
.status { display: inline-flex; padding: .3rem .55rem; border-radius: 2rem; color: #516963; background: #edf2f0; font-size: .75rem; font-weight: 750; }
.status--realizada { color: #17604c; background: #dff2ea; }
.status--programada { color: #315f7b; background: #e1eef5; }
.status--cancelada { color: #8b3838; background: #fae7e7; }
.attention-header { background: linear-gradient(120deg,#fff,#eaf5f1); }
.attention-type-icon { display: grid; place-items: center; flex: 0 0 76px; height: 76px; border-radius: 22px; color: #fff; background: linear-gradient(145deg,#397e6c,#75ad9b); font-size: 1.65rem; font-weight: 850; }
.clinical-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1rem; }
.clinical-card { min-height: 170px; padding: 1.35rem; border: 1px solid #dce7e3; border-radius: 1rem; background: #fff; }
.clinical-card > span { color: #277461; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.clinical-card p { margin: .9rem 0 0; color: #405d55; line-height: 1.65; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.filter-bar--compact { grid-template-columns: repeat(2,minmax(180px,280px)) auto; justify-content: start; }
.medication-mark { background: linear-gradient(145deg,#a7732e,#d2a45e); font-size: 1.25rem; font-weight: 850; }
.medication-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.medication-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; min-height: 168px; padding: 1.3rem; border: 1px solid #e5dfd1; border-radius: 1.1rem; background: #fff; box-shadow: 0 12px 30px rgba(74,55,24,.055); transition: transform .18s ease, box-shadow .18s ease; }
.medication-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(74,55,24,.1); }
.medication-card__icon, .medication-detail-icon { display: grid; place-items: center; color: #765728; background: #f6ecd5; font-weight: 850; }
.medication-card__icon { width: 52px; height: 52px; border-radius: 15px; }
.medication-card__top { display: flex; align-items: center; gap: .55rem; color: #778782; font-size: .78rem; }
.medication-card__top .status { position: relative; z-index: 2; cursor: default; }
.medication-card__person { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .3rem; color: #61756f; text-decoration: none; }
.medication-card__person:hover, .medication-card__person:focus-visible { color: #245f51; text-decoration: underline; outline: none; }
.medication-card__person svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.origin-appointment-icon { position: relative; z-index: 2; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: -.15rem; border-radius: 7px; color: #315f7b; background: #e1eef5; text-decoration: none; }
.origin-appointment-icon:hover, .origin-appointment-icon:focus-visible { color: #fff; background: #426f8a; outline: none; }
.origin-appointment-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.medication-card__primary { color: inherit; text-decoration: none; }
.medication-card__primary::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.medication-card__primary:focus-visible { outline: none; }
.medication-card:has(.medication-card__primary:focus-visible) { box-shadow: 0 0 0 3px rgba(74,136,119,.22), 0 18px 38px rgba(74,55,24,.1); }
.medication-card__body h2 { margin: .7rem 0 .25rem; font-size: 1.15rem; }
.medication-card__body p { margin: 0; color: #516963; }
.schedule-line { margin-top: .65rem; color: #8a744c; font-size: .82rem; }
.status--activo { color: #17604c; background: #dff2ea; }
.status--suspendido { color: #8b5a25; background: #f7ead5; }
.status--finalizado { color: #596965; background: #e9efed; }
.hours-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.field small:not(.field-error) { color: #7b8c87; font-size: .76rem; font-weight: 500; }
.context-person { align-content: center; min-height: 78px; padding: .75rem .9rem; border: 1px solid #cfe0da; border-radius: .75rem; background: #eef7f3; }
.context-person strong { color: #225e4e; font-size: 1rem; }
.medication-header { background: linear-gradient(120deg,#fff,#fbf3e5); }
.medication-detail-icon { flex: 0 0 76px; height: 76px; border-radius: 22px; font-size: 1.25rem; }
.schedule-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1.35rem; border: 1px solid #e5dfd1; border-radius: 1rem; background: #fffaf1; }
.schedule-panel h2 { margin: 0; font-size: 1.05rem; }
.hour-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.hour-pills span { padding: .6rem .8rem; border: 1px solid #ead8b8; border-radius: .7rem; color: #745623; background: #fff; font-weight: 800; }
.record-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.record-links > a:not(.button) { padding: .7rem 1rem; border: 1px solid #d5e6e0; border-radius: .7rem; color: #245f51; background: #edf5f2; text-decoration: none; font-weight: 700; }
.treatments-heading { margin-top: 2.4rem; }
.treatments-heading > a { color: #2e6d5c; font-size: .88rem; font-weight: 750; text-decoration: none; }
.active-treatments { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; }
.active-treatments a { display: grid; grid-template-columns: minmax(95px,auto) 1fr; gap: .2rem 1rem; padding: 1rem; border: 1px solid #e5dfd1; border-radius: .9rem; background: #fff; text-decoration: none; }
.active-treatments__time { grid-row: 1 / 3; align-self: center; color: #7a5b29; font-size: .78rem; font-weight: 800; }
.active-treatments strong { font-size: .95rem; }
.active-treatments small { color: #788782; }
.document-mark { background: linear-gradient(145deg,#426f8a,#76a6bd); font-size: 1.25rem; font-weight: 850; }
.document-list { display: grid; gap: .75rem; }
.document-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #dbe5e9; border-radius: 1rem; background: #fff; }
.document-row__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: #35657c; background: #e3f0f5; font-size: .72rem; font-weight: 850; }
.document-row__preview { overflow: hidden; border: 1px solid #d2e4eb; text-decoration: none; }
.document-row__preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.document-row__preview:hover img, .document-row__preview:focus-visible img { transform: scale(1.08); }
.document-row__preview:focus-visible { outline: 3px solid rgba(66,111,138,.25); outline-offset: 2px; }
.document-preview-modal { width: min(900px,calc(100% - 2rem)); }
.document-preview-modal__body { display: grid; place-items: center; max-height: 68vh; padding: 1rem; background: #172522; }
.document-preview-modal__body img { display: block; max-width: 100%; max-height: calc(68vh - 2rem); border-radius: .6rem; object-fit: contain; }
.document-row__body > div { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; color: #74857f; font-size: .78rem; }
.document-row__body .medication-card__person, .document-row__body .origin-appointment-icon { flex: 0 0 auto; }
.document-row__body h2 { margin: .5rem 0 .2rem; font-size: 1.02rem; }
.document-row__body p { margin: 0; color: #758680; font-size: .84rem; }
.document-row__actions { display: flex; align-items: center; gap: .45rem; }
.button--danger { color: #8a3030; background: #fbeaea; border: 1px solid #f1d0d0; }
.upload-zone { display: grid; justify-items: center; gap: .5rem; padding: 2.4rem 1rem; border: 2px dashed #bfd4dc; border-radius: 1rem; color: #365f70; background: #f4fafc; text-align: center; cursor: pointer; }
.upload-zone input { width: min(420px,100%); color: #607b86; }
.upload-zone strong { font-size: 1.08rem; }
.upload-zone span { color: #7b8d94; font-size: .82rem; }
.recent-documents { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; }
.recent-documents a { display: grid; gap: .2rem; padding: 1rem; border: 1px solid #dbe5e9; border-radius: .9rem; background: #fff; text-decoration: none; }
.recent-documents span { color: #397087; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.recent-documents small { color: #778984; }
.dashboard-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; padding: 1rem; border: 1px solid #dce7e3; border-radius: 1rem; background: rgba(255,255,255,.82); }
.dashboard-toolbar label { display: grid; gap: .4rem; color: #4f6b63; font-size: .78rem; font-weight: 800; }
.dashboard-toolbar select { min-width: 240px; padding: .65rem .8rem; border: 1px solid #cddcd7; border-radius: .65rem; color: #244a40; background: #fff; }
.quick-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.quick-actions a { padding: .65rem .8rem; border-radius: .65rem; color: #276654; background: #e8f3ef; font-size: .82rem; font-weight: 800; text-decoration: none; }
.upcoming-list { display: grid; gap: .65rem; }
.upcoming-list a { display: grid; grid-template-columns: 145px 1fr auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #dbe6e2; border-radius: .9rem; background: #fff; text-decoration: none; }
.upcoming-list time { color: #306d5d; font-size: .82rem; font-weight: 800; }
.upcoming-list div { display: grid; gap: .2rem; }
.upcoming-list small { color: #758680; }
.process-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; margin-bottom: 2rem; }
.process-tab { display: grid; gap: .25rem; padding: 1rem; border: 1px solid #dce7e3; border-radius: .9rem; color: #627771; background: #fff; text-decoration: none; }
.process-tab > span { color: #71847e; font-size: .68rem; font-weight: 800; letter-spacing: .05em; }
.process-tab strong { color: #2c5148; }
.process-tab small { font-size: .76rem; }
.process-tab.is-active { border-color: #448775; background: #eaf5f1; box-shadow: 0 8px 20px rgba(39,114,95,.1); }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 1rem; }
.catalog-heading h2 { margin: 0; font-size: 1.7rem; }
.catalog-heading > div > p:last-child { margin: .25rem 0 0; color: #778984; font-size: .8rem; }
.catalog-panel { margin-bottom: 1rem; padding: 1.2rem; border: 1px solid #dce7e3; border-radius: 1rem; background: #fff; }
.catalog-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.catalog-panel__heading h2 { margin: 0 0 .2rem; }
.catalog-panel__heading p { margin: 0; color: #778984; font-size: .85rem; }
.catalog-empty { padding: 1.5rem; border: 1px dashed #d1ded9; border-radius: .75rem; color: #778984; text-align: center; }
.catalog-table { display: grid; }
.catalog-table__head, .catalog-table__row { display: grid; grid-template-columns: 70px minmax(180px,1fr) 100px minmax(260px,auto); align-items: center; gap: 1rem; padding: .75rem; }
.catalog-table__head { color: #72837e; border-bottom: 1px solid #dfe9e5; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.catalog-table__row { border-bottom: 1px solid #edf2f0; }
.catalog-table__row:last-child { border-bottom: 0; }
.catalog-table__row > div:nth-child(2) { display: grid; gap: .2rem; }
.catalog-table__row small { color: #7c8d88; font-size: .72rem; }
.order-chip { display: grid; place-items: center; width: 36px; height: 30px; border-radius: .55rem; color: #41665c; background: #edf5f2; font-size: .78rem; font-weight: 800; }
.order-chip[style] { box-shadow: inset 5px 0 var(--catalog-color); }
.color-input { display: flex; align-items: center; gap: .75rem; min-height: 46px; padding: .35rem .65rem; border: 1px solid #cddcd7; border-radius: .7rem; background: #fbfdfc; }
.color-input input { width: 52px; height: 34px; padding: 0; border: 0; border-radius: .4rem; background: transparent; cursor: pointer; }
.color-input strong { color: #526b65; font-size: .84rem; letter-spacing: .04em; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.dashboard-heading h1 { margin-bottom: .4rem; font-size: clamp(2.2rem,4vw,3.7rem); }
.dashboard-heading p:last-child { margin-bottom: 0; color: #687d77; }
.health-calendar { overflow: hidden; border: 1px solid #dce7e3; border-radius: 1.2rem; background: #fff; box-shadow: 0 16px 45px rgba(30,70,60,.08); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.35rem .85rem; }
.calendar-toolbar h2 { margin: 0; font-size: 1.65rem; text-transform: capitalize; }
.calendar-toolbar__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.calendar-navigation { display: flex; align-items: center; gap: .4rem; }
.calendar-navigation a { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: .5rem .7rem; border: 1px solid #d7e3df; border-radius: .65rem; color: #315f54; background: #fff; text-decoration: none; font-weight: 800; }
.calendar-navigation a:hover { background: #edf5f2; }
.calendar-view-toggle { display: flex; padding: .2rem; border: 1px solid #d7e3df; border-radius: .75rem; background: #f4f8f6; }
.calendar-view-toggle button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 34px; padding: .4rem .6rem; border: 0; border-radius: .55rem; color: #647873; background: transparent; cursor: pointer; font-size: .76rem; font-weight: 800; }
.calendar-view-toggle button:hover { color: #275e51; }
.calendar-view-toggle button.is-active { color: #fff; background: #347b68; box-shadow: 0 4px 12px rgba(39,114,95,.18); }
.calendar-view-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: .65rem 1rem; padding: 0 1.35rem 1rem; color: #667b75; font-size: .78rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--event-color); }
.calendar-grid-scroll { max-width: 100%; overflow-x: auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-top: 1px solid #e1eae7; border-left: 1px solid #e1eae7; }
.calendar-weekday { padding: .65rem .5rem; border-right: 1px solid #e1eae7; border-bottom: 1px solid #e1eae7; color: #71837e; background: #f5f8f7; text-align: center; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.calendar-day { min-width: 0; min-height: 132px; padding: .45rem; border-right: 1px solid #e1eae7; border-bottom: 1px solid #e1eae7; background: #fff; }
.calendar-day.is-outside { background: #fafcfb; }
.calendar-day.is-outside .calendar-day__number { color: #a5b2ae; }
.calendar-day.is-today { background: #f0f8f5; box-shadow: inset 0 0 0 2px #73a998; }
.calendar-day__number { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; width: 30px; height: 30px; border-radius: 50%; color: #46645c; text-decoration: none; font-size: .82rem; font-weight: 800; }
.calendar-day__number span { display: none; }
.calendar-day__number:hover { color: #fff; background: #347b68; }
.calendar-day__number:hover span { display: inline; }
.calendar-events { display: grid; gap: .3rem; margin-top: .25rem; }
.calendar-event { display: grid; grid-template-columns: auto 1fr; gap: 0 .35rem; min-width: 0; padding: .38rem .42rem; overflow: hidden; border-left: 4px solid var(--event-color); border-radius: .4rem; color: #294d44; background: color-mix(in srgb,var(--event-color) 11%,white); text-decoration: none; font-size: .7rem; }
.calendar-event time { color: var(--event-color); font-weight: 850; }
.calendar-event strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { grid-column: 1 / -1; margin-top: .15rem; overflow: hidden; color: #71817d; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda { display: block; padding: .2rem 1rem 1rem; }
.health-calendar [hidden] { display: none !important; }
.agenda-date { margin: 1rem 0 .5rem; color: #3b6258; font-size: .78rem; letter-spacing: .04em; }
.agenda-event { display: grid; grid-template-columns: 105px 1fr auto; align-items: center; gap: .75rem; margin-bottom: .55rem; padding: .85rem; border: 1px solid #dce7e3; border-left: 5px solid var(--event-color); border-radius: .75rem; color: #294d44; background: #fff; text-decoration: none; }
.agenda-event time { color: var(--event-color); font-size: .75rem; font-weight: 850; }
.agenda-event span { display: grid; gap: .18rem; }
.agenda-event small { color: #71817d; }
.agenda-event b { color: #83938f; }
.calendar-empty { padding: 1.5rem; border: 1px dashed #cddbd6; border-radius: .8rem; color: #71817d; text-align: center; }
.appointment-modal { width: min(640px,calc(100% - 2rem)); max-height: min(86vh,760px); margin: auto; padding: 0; overflow: hidden; border: 0; border-top: 6px solid var(--event-color); border-radius: 1.15rem; color: #18352f; background: #fff; box-shadow: 0 28px 80px rgba(13,42,34,.28); }
.appointment-modal::backdrop { background: rgba(15,34,29,.58); backdrop-filter: blur(4px); }
.appointment-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.4rem 1rem; border-bottom: 1px solid #e3ebe8; }
.appointment-modal__header h2 { margin: .4rem 0 0; font-size: 1.55rem; }
.appointment-modal__header form { flex: 0 0 auto; }
.appointment-modal__header button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #d7e3df; border-radius: 50%; color: #526b65; background: #fff; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.appointment-modal__status { display: inline-flex; align-items: center; gap: .4rem; color: var(--event-color); font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.appointment-modal__status i { width: 9px; height: 9px; border-radius: 50%; background: var(--event-color); }
.appointment-modal__body { max-height: 54vh; padding: 1.2rem 1.4rem; overflow-y: auto; }
.appointment-modal__facts { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; margin: 0; }
.appointment-modal__facts div { padding: .8rem; border-radius: .75rem; background: #f3f7f5; }
.appointment-modal__facts dt { color: #71837e; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.appointment-modal__facts dd { margin: .28rem 0 0; color: #294d44; font-size: .9rem; font-weight: 750; }
.appointment-modal__section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e4ece9; }
.appointment-modal__section h3 { margin: 0 0 .4rem; color: #315f54; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.appointment-modal__section p { margin: 0; color: #506a63; line-height: 1.55; }
.appointment-modal__footer { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.4rem 1.25rem; border-top: 1px solid #e3ebe8; background: #fafcfb; }
.medication-added-modal { --event-color: #2f806b; }
.document-added-modal { --event-color: #426f8a; }
.document-added-modal .medication-added-summary { background: #edf5f8; }
.document-added-modal .medication-added-summary__icon { background: #426f8a; }
.ai-prompt-modal { --event-color: #6b7454; width: min(860px,calc(100% - 2rem)); }
.pdf-note-modal { --event-color: #2d7f6f; width: min(760px,calc(100% - 2rem)); }
.ai-prompt-label { display: block; margin-bottom: .5rem; color: #315f54; font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.ai-prompt-text { width: 100%; min-height: 46vh; resize: vertical; padding: 1rem; border: 1px solid #d7e3df; border-radius: .8rem; color: #23463e; background: #f8fbfa; font: 500 .92rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; }
.medication-added-summary { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: .9rem; background: #edf7f3; }
.medication-added-summary__icon { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 50%; color: #fff; background: #2f806b; font-size: 1.4rem; font-weight: 900; }
.medication-added-summary > div { display: grid; gap: .2rem; }
.medication-added-summary > div > span { color: #6d807b; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.medication-added-summary strong { color: #214f43; font-size: 1.2rem; }
.medication-added-summary p { margin: 0; color: #506a63; }
.catalog-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
.catalog-actions a, .catalog-actions button { padding: 0; border: 0; color: #2d6c5b; background: none; font: inherit; font-size: .78rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.catalog-actions .danger-link { color: #9a4444; }
.catalog-form { max-width: 820px; }
.check-field { display: flex; align-items: center; gap: .65rem; color: #37564e; font-weight: 700; }
.check-field input { width: 18px; height: 18px; accent-color: #347b68; }
@media (min-width: 821px) and (max-width: 1500px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav { position: absolute; top: 64px; right: 1rem; display: none; grid-template-columns: repeat(2,minmax(150px,1fr)); gap: .25rem; width: min(520px,calc(100% - 2rem)); padding: .65rem; border: 1px solid #dce7e3; border-radius: .9rem; background: #fff; box-shadow: 0 18px 45px rgba(25,62,52,.15); }
  .nav.is-open { display: grid; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav { position: absolute; top: 64px; right: 1rem; left: 1rem; display: none; grid-template-columns: repeat(2,1fr); gap: .25rem; padding: .65rem; border: 1px solid #dce7e3; border-radius: .9rem; background: #fff; box-shadow: 0 18px 45px rgba(25,62,52,.15); }
  .nav.is-open { display: grid; }
  .nav a { padding: .75rem; }
  .topbar__inner { gap: 1rem; }
  .topbar__inner > form { margin-left: 0; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-mark { display: none; }
  .dashboard-grid, .setup-shell, .two-column, .people-grid, .profile-grid, .clinical-grid, .medication-grid, .active-treatments, .recent-documents { grid-template-columns: 1fr; }
  .setup-shell { gap: 2rem; }
  .empty-panel { align-items: flex-start; flex-wrap: wrap; }
  .empty-panel .button { width: 100%; margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .profile-header { align-items: flex-start; flex-wrap: wrap; }
  .profile-header .button { width: 100%; }
  .header-actions { width: 100%; }
  .filter-bar { grid-template-columns: repeat(2,1fr); }
  .filter-bar .button { grid-column: 1 / -1; }
  .timeline::before { left: 15px; }
  .timeline-item { grid-template-columns: 18px 1fr auto; gap: .75rem; padding: 1rem; }
  .timeline-item__date { grid-column: 2; grid-row: 1; display: flex; gap: .35rem; text-align: left; }
  .timeline-item__dot { grid-column: 1; grid-row: 1 / 3; }
  .timeline-item__body { grid-column: 2; grid-row: 2; }
  .timeline-item > .arrow { grid-column: 3; grid-row: 1 / 3; }
  .hours-grid { grid-template-columns: 1fr; }
  .schedule-panel { align-items: flex-start; flex-direction: column; }
  .hour-pills { justify-content: flex-start; }
  .document-row { grid-template-columns: auto 1fr; }
  .document-row__actions { grid-column: 1 / -1; }
  .dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .dashboard-toolbar select { width: 100%; min-width: 0; }
  .quick-actions { display: grid; grid-template-columns: repeat(3,1fr); }
  .quick-actions a { text-align: center; }
  .process-tabs { grid-template-columns: repeat(2,1fr); }
  .catalog-table__head { display: none; }
  .catalog-table__row { grid-template-columns: auto 1fr auto; gap: .7rem; }
  .catalog-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: .5rem; }
  .dashboard-heading { align-items: flex-start; }
  .family-card { align-items: flex-start; flex-wrap: wrap; }
  .family-card__actions { width: 100%; justify-content: flex-start; padding-left: 58px; }
}
@media (max-width: 700px) {
  .calendar-toolbar { align-items: flex-start; }
  .calendar-toolbar h2 { font-size: 1.35rem; }
  .calendar-legend { padding-bottom: .8rem; }
  .calendar-grid-scroll { overflow-x: hidden; }
  .calendar-grid { min-width: 0; }
  .calendar-weekday { min-width: 0; padding: .5rem .05rem; font-size: .58rem; }
  .calendar-day { min-width: 0; min-height: 76px; padding: .2rem; }
  .calendar-day__number { width: 25px; height: 25px; font-size: .72rem; }
  .calendar-day__number span { display: none !important; }
  .calendar-events { gap: .18rem; margin-top: .15rem; }
  .calendar-event { display: block; width: 100%; height: 7px; min-height: 7px; padding: 0; border: 0; border-radius: 4px; background: var(--event-color); }
  .calendar-event time, .calendar-event strong, .calendar-event small { display: none; }
}
@media (max-width: 520px) {
  .topbar__inner { height: auto; min-height: 72px; flex-wrap: wrap; padding: .55rem 0; }
  .brand { order: 1; }
  .nav-toggle { order: 2; }
  .topbar__inner > form:last-child { order: 3; }
  .person-switcher { order: 4; flex: 0 0 100%; width: 100%; }
  .nav { top: 116px; }
  .container { width: min(100% - 1rem,1120px); padding-top: 2rem; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .button { grid-column: auto; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .page-heading .button { width: 100%; }
  .process-tabs { grid-template-columns: 1fr; }
  .catalog-panel__heading { align-items: flex-start; flex-direction: column; }
  .catalog-panel__heading .button { width: 100%; }
  .brand > span:last-child { display: none; }
  .quick-actions { grid-template-columns: 1fr; }
  .upcoming-list a { grid-template-columns: 1fr auto; }
  .upcoming-list time { grid-column: 1; }
  .upcoming-list div { grid-column: 1; }
  .upcoming-list > a > span { grid-column: 2; grid-row: 1 / 3; }
  .dashboard-heading { flex-direction: column; }
  .dashboard-heading .button { width: 100%; }
  .calendar-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-toolbar__actions { display: grid; justify-content: stretch; }
  .calendar-navigation { display: grid; grid-template-columns: 40px 1fr 40px; }
  .calendar-view-toggle { display: grid; grid-template-columns: repeat(2,1fr); }
  .agenda-event { grid-template-columns: 1fr auto; }
  .agenda-event time { grid-column: 1; }
  .agenda-event span { grid-column: 1; }
  .agenda-event b { grid-column: 2; grid-row: 1 / 3; }
  .family-card__actions { display: grid; grid-template-columns: 1fr; padding-left: 0; }
  .family-card__actions form, .family-card__actions button { width: 100%; }
  .copy-invitation { grid-template-columns: 1fr; }
  .copy-invitation .button { width: 100%; }
  .invitation-row { grid-template-columns: auto 1fr; }
  .invitation-row form { grid-column: 1 / -1; }
  .invitation-row form .button { width: 100%; }
  .appointment-modal { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); border-radius: 1rem; }
  .appointment-modal__header { padding: 1rem; }
  .appointment-modal__header h2 { font-size: 1.3rem; }
  .appointment-modal__body { max-height: calc(100dvh - 235px); padding: 1rem; }
  .appointment-modal__facts { grid-template-columns: 1fr; gap: .5rem; }
  .appointment-modal__footer { display: grid; grid-template-columns: 1fr; padding: .85rem 1rem 1rem; }
  .appointment-modal__footer form, .appointment-modal__footer .button { width: 100%; }
}
