:root{--mint:#7bcfba;--yellow:#f8ca46;--ink:#02423d;--action:#107471;--surface:#f5faf8;--card-gap:20px;--action-gap:20px;--button-gap:16px;--text-body:16px;--text-label:14px;--text-help:14px;--title-card:24px;--title-navigation:20px;--title-subsection:18px;--text-color:#124a43;--text-secondary:#536b63}*{box-sizing:border-box}body{margin:0}.shell{display:flex;min-height:100vh}aside{width:260px;background:var(--mint);padding:26px;flex-shrink:0}.brand{display:flex;align-items:center;gap:10px;font-size:28px;text-decoration:none;color:var(--ink)}.brand img{width:60px;height:auto}.brand small{display:block;font-size:12px;letter-spacing:2px}nav{display:grid;gap:10px;margin-top:40px}nav a{padding:14px;border-radius:10px;text-decoration:none;color:var(--ink)}nav a.active,nav a:hover{background:#ffffff80}.note{font-size:13px;line-height:1.6;margin-top:40px}main{flex:1;min-width:0}header{background:white;padding:24px 36px;border-bottom:1px solid #dbe8e2;display:flex;justify-content:space-between}header span{font-size:13px}section{padding:36px}p{line-height:1.6}.card{display:block;border:1px solid #dbe8e2;background:white;text-decoration:none;color:var(--ink)}.card h2{font-size:20px}.notice{margin-top:28px;padding:18px;border-left:5px solid var(--yellow);background:#fff9e5;line-height:1.6}table{width:100%;background:white;border-collapse:collapse}th,td{text-align:left;padding:18px;border-bottom:1px solid #dbe8e2}.badge{display:inline-block;border-radius:20px;padding:7px 12px;background:#e3f5ed}a:focus-visible{outline:3px solid var(--ink);outline-offset:3px}/* Agrupamentos de cards: o espaço pertence ao pai, nunca às margens dos filhos. */
.card-group { display: grid; gap: var(--card-gap); min-width: 0; }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card-stack { grid-template-columns: minmax(0, 1fr); }
.card-group > :where(.card, .panel, .notice, .card-group, .form-actions, .record-actions, .validation-errors) { margin: 0; }
@media(max-width:720px){.shell{display:block}aside{width:100%;padding:18px}nav{margin-top:16px;grid-template-columns:1fr 1fr}.note{margin-top:15px}section{padding:20px}header{padding:18px}table{font-size:13px}th,td{padding:10px}}
/* Identidade e layout do primeiro incremento. Fontes proprietárias não fornecidas. */
body{font-family:'Brandon Grotesque','Segoe UI',sans-serif;background:#f6f9f7;color:#124a43;line-height:1.6}h1,h2,.brand{font-family:'Futura LT Book','Century Gothic','Segoe UI',sans-serif;font-weight:500;line-height:1.2}aside{background:linear-gradient(155deg,#dcf5ec,#b0dfd0);display:flex;flex-direction:column;border-right:1px solid #badbce}.brand small{font-size:10px;letter-spacing:1px}.note{margin-top:auto;padding-top:60px;color:#42685d}header{font-size:13px;align-items:center}header span{border-radius:20px;background:#eef7f1;padding:5px 12px;font-size:11px}main>section{max-width:1400px;margin:auto;padding:36px 40px 50px}h1{font-size:36px;letter-spacing:-1px;margin:15px 0}h2{font-size:24px}p{color:#536b63}.hero{display:grid;grid-template-columns:1.6fr 1fr;gap:35px;align-items:center;background:#e2f3ea;padding:40px;border:1px solid #cde5d9;border-radius:18px}.hero h1{font-size:44px;margin:20px 0}.hero p{max-width:480px}.hero img{width:min(100%,245px);height:auto;justify-self:center;border-radius:8px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700}.button,button{display:inline-flex;align-items:center;justify-content:center;background:#07594f;color:white;padding:12px 20px;border:0;border-radius:7px;font:600 14px 'Segoe UI',sans-serif;text-decoration:none}.button:hover{background:#06453e}button:disabled{opacity:.55;cursor:not-allowed}.section-title{margin:34px 0 18px}.card{padding:26px;border-radius:12px}.card h2{margin:5px 0 15px}.card:hover{border-color:#5cab92}.notice{border:1px solid #d3e6dc;border-left:4px solid #7bcfba;border-radius:8px;background:#edf6f1;padding:20px 24px;font-size:14px}.notice p{margin:8px 0 0}.muted{font-size:12px;color:#536b63}.panel{background:white;border:1px solid #dbe8e2;border-radius:12px;padding:24px}.filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px}label{font-size:12px;font-weight:600}input,select{font:14px 'Segoe UI',sans-serif;display:block;width:100%;padding:11px 12px;margin-top:8px;border:1px solid #bdcec6;border-radius:6px;background:white;color:#124a43}.table-scroll{overflow:auto}table{white-space:nowrap;font-size:14px}th{font-weight:500;background:#f6f9f7;font-size:12px;color:#536b63}td strong{font-weight:500}.pending{background:#fff0bd;color:#695119}.text-link{font-size:13px;color:#086054;font-weight:600;text-decoration:none}.empty{text-align:center;padding:35px}.badge{font-size:12px;padding:4px 12px}footer{padding:20px 40px;border-top:1px solid #dbe8e2;color:#536b63;font-size:11px}.skip-link{position:absolute;top:-60px;background:white;padding:10px;z-index:10}.skip-link:focus{top:10px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}:focus-visible{outline:3px solid #785900;outline-offset:4px}details p{overflow-wrap:anywhere;white-space:normal;font-size:12px}
@media(max-width:1100px){aside{width:215px;padding:24px 16px}main>section{padding:28px 24px}.hero{padding:28px}.hero h1{font-size:36px}.brand{font-size:24px}.brand img{width:50px}}
@media(max-width:760px){.shell{display:block}aside{width:100%;padding:16px}.brand{font-size:26px}.brand img{width:45px}nav{display:flex;flex-wrap:wrap;margin-top:16px;gap:6px}nav a{padding:9px;font-size:12px}.note{display:none}header{padding:14px 18px;gap:15px;flex-wrap:wrap}main>section{padding:25px 18px}.hero{grid-template-columns:1fr;padding:25px}.hero h1{font-size:35px}.hero img{display:none}.card-grid{grid-template-columns:1fr}.filters{grid-template-columns:1fr}.panel{padding:16px}h1{font-size:30px}footer{padding:20px 18px}th,td{padding:14px}}
.account-shell{max-width:640px;margin:40px auto;padding:24px}.account-panel{margin-top:30px;padding:32px!important}.login-form{display:grid;gap:12px}.login-form input{margin-top:0}.login-form button{margin-top:15px}.validation{color:#8a3027}.validation ul{padding-left:20px}.account-shell .brand{display:flex;width:max-content}.account-shell .brand img{width:60px}.account-shell .brand{font-size:30px;color:var(--ink)}.account-shell .brand small{display:block;font-size:11px;letter-spacing:1px}.account-shell .muted{font-size:12px}
/* Conta e logout: controles separados, com submissão HTTP protegida. */
.account-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:0;flex-wrap:wrap}
.account-identification{overflow-wrap:anywhere;max-width:100%}
.logout-form{display:flex;align-items:center;margin:0;flex-shrink:0}
.logout-button{min-height:44px;gap:8px;padding:8px 12px;border:1px solid #d3e6dc;background:transparent;color:#124a43;font-size:13px;font-weight:500;cursor:pointer}
.logout-button:hover{background:#edf6f1;border-color:#7bcfba}
.logout-button:focus-visible{outline:3px solid #785900;outline-offset:3px}
@media(max-width:760px){.account-actions{justify-content:flex-start;max-width:100%}}

/* Cadastro T03: seções legíveis e campos acessíveis em telas pequenas. */
.registration-section { min-width: 0; }
.registration-section legend { font-size: 1.25rem; font-weight: 600; padding: 0 .5rem; }
.registration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.registration-section label { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.registration-section input, .registration-section select, .registration-section textarea { width: 100%; min-height: 44px; box-sizing: border-box; }
.registration-section textarea { resize: vertical; }
.form-actions, .record-actions { display: flex; flex-wrap: wrap; gap: var(--button-gap); }
.form-actions { align-items: center; margin-top:var(--action-gap); }
.validation-message, .validation-errors { color: #923a2c; }
.registration-section :focus-visible { outline: 3px solid #387c69; outline-offset: 3px; }
.registration-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.registration-details dt { font-weight: 600; }
.registration-details dd { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .registration-grid, .registration-details { grid-template-columns: 1fr; } }

/* Ações, notificações do circuito e rodapés da etapa 2. */
.form-actions button { min-height: 44px; border: 1px solid transparent; cursor: pointer; }
.form-actions .button-secondary { border-color: #7ba99b; }
.shell main > footer, .account-footer { text-align: center; }
.toast { position: fixed; right: 1.25rem; top: 1.25rem; z-index: 100; display: flex; align-items: center; gap: 1rem; max-width: min(440px, calc(100vw - 2.5rem)); padding: 1rem; border: 1px solid #7ba99b; border-left: 5px solid #387c69; border-radius: 10px; background: #edf6f1; color: #124a43; box-shadow: 0 4px 20px #124a4320; overflow-wrap: anywhere; }
.toast-error { background: #fff2ee; border-color: #bc7769; color: #7f3024; }
@media (max-width: 640px) { .toast { right: 1rem; top: 1rem; max-width: calc(100vw - 2rem); } }

/* FocusOnNavigate mantém o foco sem desenhar contorno nos títulos estáticos. */
h1:focus, h1:focus-visible, h2:focus, h2:focus-visible, h3:focus, h3:focus-visible { outline: none; }

/* Shared secondary actions, also used by invitation HTTP forms. */
.button-secondary { background: transparent; color: #124a43; border: 1px solid #7ba99b; min-height: 44px; box-sizing: border-box; }
.button-secondary:hover, .form-actions .button-secondary:hover { background: #e2f3ea; }

/* T07: internal controls do not add margins to card-group children. */
.check-in-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.registration-section .check-in-option { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
.check-in-option input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.check-in-records h3 { margin: 0; } .check-in-pagination { padding-top: 20px; }
@media(max-width:640px) { .check-in-options { grid-template-columns: 1fr; } }

/* T07 principal card: compact sections, preserving shared gap between cards. */
.check-in-context { padding: 0; background: transparent; border: 0; font-size: inherit; }
.check-in-fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.check-in-section { padding: 20px 0 0; margin-top: 20px; border-top: 1px solid #cfe1d8; }
.check-in-section h2 { font-size: 20px; margin: 0 0 12px; }
.check-in-scale-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check-in-scale output { font-size: 12px; font-weight: 600; color: #07594f; }
.check-in-scale input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; padding: 0; margin: 6px 0 0; border: 0; background: transparent; cursor: pointer; box-sizing: border-box; }
.check-in-scale input[type=range]::-webkit-slider-runnable-track { height: 6px; background: #94c9b7; border-radius: 4px; }
.check-in-scale input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; margin-top: -7px; border-radius: 50%; background: #07594f; border: 2px solid white; box-shadow: 0 0 0 1px #07594f; }
.check-in-scale input[type=range]::-moz-range-track { height: 6px; background: #94c9b7; border-radius: 4px; }
.check-in-scale input[type=range]::-moz-range-thumb { height: 18px; width: 18px; border-radius: 50%; background: #07594f; border: 2px solid white; }
.check-in-scale input.scale-unanswered::-webkit-slider-thumb { background: #e3ede7; box-shadow: 0 0 0 1px #7a978a; }
.check-in-scale input.scale-unanswered::-moz-range-thumb { background: #e3ede7; }
.check-in-scale-ticks { display: flex; justify-content: space-between; padding: 0 9px; font-size: 11px; color: #466356; }
.check-in-scale-ticks span { position: relative; text-align: center; min-width: 12px; }
.check-in-scale-ticks span::before { content: ''; position: absolute; width: 1px; height: 4px; background: #7a978a; left: 50%; top: -6px; }
.check-in-scale-extremes { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: #466356; }
.check-in-scale-extremes span { display: flex; align-items: center; gap: 4px; }
.check-in-scale-extremes svg { width: 22px; height: 22px; fill: none; stroke: #07594f; stroke-width: 1.6; flex-shrink: 0; }
.check-in-restorative { margin-top: 16px; font-size: 12px; font-weight: 600; }
.check-in-radios { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.check-in-option input[type=radio] { width: 20px; min-height: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: #07594f; }
.check-in-option input[type=checkbox] { accent-color: #07594f; }
.check-in-sharing, .check-in-actions { margin-top: 20px; }
.check-in-main .registration-details { margin-bottom: 0; }
@media(max-width:640px) { .check-in-radios { gap: 8px 16px; } }
/* Fidelidade ao PDF: pp. 21–22. Escopo e permissões seguem decisões posteriores. */
.revoar-icon { width: 21px; height: 21px; flex: 0 0 auto; }
.shell > aside { width: 220px; padding: 24px 16px; background: linear-gradient(145deg,#d5f5ed,#b9eadc); border-right: 1px solid #dcebe5; }
.shell .brand { font-size: 26px; padding: 0 6px; gap: 8px; }
.shell .brand img { width: 52px; }
.shell nav { gap: 8px; margin-top: 28px; }
.shell nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: 14px; border-radius: 7px; }
.shell nav a.active { background: #8edbca; font-weight: 600; }
.shell .note { font-size: 11px; padding: 24px 8px 0; }
.shell-header { padding: 12px 30px; }

.shell-header .account-identification { display: inline-flex; align-items: center; gap: 8px; background: none; padding: 0; font-size: 13px; }
.shell main > section { max-width: 1160px; padding: 24px 30px 32px; }
.shell main > footer { margin-top: 0; padding: 18px; font-size: 11px; }



.patient-overview { max-width: 960px; }
.responsible-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; padding: 16px 20px; }
.responsible-card > div { flex: 1; min-width: 0; }
.responsible-card > div > span { display: block; font-size: 14px; color: #536b63; }
.overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.overview-card { display: flex; align-items: flex-start; gap: 16px; padding: 22px; min-height: 148px; }
.overview-card > div { flex: 1; min-width: 0; }
.overview-card h2 { font-size: 20px; margin: 0 0 8px; }
.overview-card p { font-size: 14px; line-height: 1.5; margin: 0; }
.overview-card small { font-size: 11px; display: block; margin-top: 8px; color: #64766f; }
.overview-icon { display: inline-flex; align-items: center; justify-content: center; height: 48px; width: 48px; border-radius: 50%; background: #c9efe5; flex: 0 0 auto; }
.overview-icon .revoar-icon { width: 27px; height: 27px; }
.overview-card.mint { background: #edf9f5; border-color: #d8eee7; }
.overview-card.sand { background: #fff8ed; border-color: #f3e9d6; }
.overview-card.sand .overview-icon { background: #ffe7b9; }
.overview-card.sky { background: #edf7fd; border-color: #dceef7; }
.overview-card.sky .overview-icon { background: #c8ecf3; }
.overview-card.rose { background: #fff1f0; border-color: #f7e4e1; }
.overview-card.rose .overview-icon { background: #f9d1c8; }
.card-chevron { font-size: 26px; color: #467c70; line-height: 1; }
.care-notice { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #edf7fd; border: 1px solid #dceef7; border-radius: 10px; font-size: 14px; }
.care-notice .overview-icon { background: #c8ecf3; }
.care-notice p { margin: 3px 0 0; font-size: 13px; }
.check-in-main { background: white; max-width: 960px; padding: 24px; }
.check-in-context { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.check-in-context p { margin: 0; font-size: 14px; }
.check-in-context h2 { width: 100%; }
.check-in-perception { display: grid; grid-template-columns: 1fr; gap: 20px; }
.check-in-perception > div + div { border-top: 1px solid #e0ebe6; padding-top: 20px; }
.check-in-scale { display: grid; grid-template-columns: 76px minmax(0,1fr) 76px; column-gap: 16px; }
.check-in-scale-heading { grid-column: 1 / -1; margin-bottom: 6px; }
.check-in-scale input[type=range] { grid-column: 2; grid-row: 2; margin: 0; }
.check-in-scale-ticks { grid-column: 2; grid-row: 3; }
.check-in-scale-extremes { display: contents; }
.check-in-scale-extremes > span { grid-column: 1; grid-row: 2 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; text-align: center; }
.check-in-scale-extremes > span:last-child { grid-column: 3; flex-direction: column-reverse; }
.check-in-scale-extremes svg { width: 27px; height: 27px; }
.check-in-sleep-line { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 24px; }
.check-in-restorative { margin-top: 0; }
.check-in-radios { min-height: 44px; gap: 8px 18px; margin-top: 6px; }
.check-in-options { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px 20px; }
.check-in-sharing { padding: 12px 16px; font-size: 13px; }
.check-in-actions { justify-content: flex-end; }
.check-in-actions .button-secondary { order: -1; }
@media(max-width:760px) {
    .shell > aside { width: 100%; padding: 16px; }
    .shell nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
    .shell nav a { padding: 9px 10px; font-size: 13px; }
    .shell .note { display: none; }
    .shell-header { padding: 12px 18px; flex-wrap: wrap; gap: 10px; }
    .shell-caption { display: none; }
    .account-actions { width: 100%; justify-content: space-between; }
    .shell main > section { padding: 20px 18px 24px; }


    .overview-grid { grid-template-columns: 1fr; }
    .overview-card { min-height: 124px; padding: 20px; }
    .responsible-card { flex-wrap: wrap; padding: 16px; gap: 12px; }
    .responsible-card .badge { font-size: 11px; }
    .check-in-main { padding: 18px; }
    .check-in-scale { grid-template-columns: 42px minmax(0,1fr) 42px; column-gap: 6px; }
    .check-in-scale-extremes > span { font-size: 10px; }
    .check-in-scale-ticks { padding: 0 6px; font-size: 10px; }
    .check-in-scale-ticks span { min-width: 6px; }
    .check-in-sleep-line { grid-template-columns: 1fr; gap: 16px; }
    .check-in-sleep-hours { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .check-in-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 12px; }
    .check-in-context { align-items: flex-start; flex-direction: column; }
    .care-notice { align-items: flex-start; padding: 16px; }
}
.check-in-scale input[type=range]:focus-visible { outline: 3px solid #387c69; outline-offset: 3px; border-radius: 4px; }
/* Cabeçalho compartilhado: acabamento das referências anexadas e PDF p. 21. */
.revoar-page-header { position: relative; isolation: isolate; overflow: hidden; min-height: 152px; margin: -24px -30px 20px; background: #f3faf8; }
.page-header-decoration { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.page-header-content { position: relative; padding: 18px 30px 24px; }
.page-header-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.revoar-page-header h1 { margin: 10px 0 6px; font-size: 32px; line-height: 1.2; letter-spacing: -.6px; }
.revoar-page-header p { margin: 0; color: #526d79; font-size: 14px; line-height: 1.5; }
.page-header-actions { flex-shrink: 0; }
.shell nav.page-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 12px; color: #526d79; }
.shell nav.page-breadcrumb a { display: inline; padding: 0; border-radius: 0; font-size: inherit; color: inherit; text-decoration: none; }
.shell nav.page-breadcrumb a:hover { background: none; text-decoration: underline; }
.patient-context-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; min-height: 80px; font-size: 14px; }
.patient-context-card > div { flex: 1; min-width: 0; }
.patient-context-card .context-professional { border-left: 1px solid #e0eae5; padding-left: 20px; }
.patient-avatar { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: #d0f3ea; flex-shrink: 0; font-size: 17px; }
.shell > aside { width: clamp(220px,19vw,260px); }
.shell-header { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
@media(max-width:760px) {
    .shell > aside { width: 100%; }
    .revoar-page-header { margin: -20px -18px 20px; min-height: 152px; }
    .page-header-content { padding: 16px 18px 20px; }
    .page-header-title-row { align-items: flex-start; flex-direction: column; gap: 12px; }
    .revoar-page-header h1 { font-size: 28px; max-width: 92%; }
    .revoar-page-header p { max-width: 92%; }
    .patient-context-card { flex-wrap: wrap; padding: 16px; gap: 12px; }
    .patient-context-card > div { flex: 1 1 190px; }
    .patient-context-card .context-professional { border-left: 0; padding-left: 60px; }
}
/* Proporções do cabeçalho normalizadas pela área principal da referência. */
@media(min-width:761px) {
    .shell main { container-type: inline-size; }
    .shell-header { min-height: clamp(60px,7.6cqw,80px); }
    .revoar-page-header { min-height: clamp(146px,17.5cqw,180px); }
    .revoar-page-header h1 { font-size: clamp(32px,4.2cqw,44px); }
    .revoar-page-header p { font-size: clamp(14px,1.8cqw,18px); }
    .shell nav.page-breadcrumb { font-size: clamp(12px,1.6cqw,16px); }
    .patient-context-card { min-height: clamp(80px,10.8cqw,112px); font-size: clamp(14px,1.6cqw,16px); }
}
@media(min-width:761px) {
    .patient-context-card { font-size: clamp(14px,2cqw,20px); }
    .patient-context-card .patient-avatar { width: clamp(48px,7.8cqw,80px); height: clamp(48px,7.8cqw,80px); font-size: clamp(17px,2.7cqw,27px); }
    .shell-header .account-identification { font-size: clamp(13px,1.8cqw,18px); }
}

/* Menu recolhível do layout compartilhado. */
.shell > aside { display: none; }
.shell.menu-open > aside { display: block; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 8px; margin: 0; border: 1px solid #c9dfd7; border-radius: 7px; background: #fff; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.menu-toggle:hover { background: #e5f7f1; }
.menu-toggle:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.shell-header { align-items: center; }
.shell-header .account-actions { align-items: center; }
.shell-header .account-identification, .shell-header .logout-button { line-height: 1.2; }
.shell-header .account-identification svg, .shell-header .logout-button svg { display: block; }
.shell-header .account-actions { margin-left: auto; }
.menu-backdrop { display: none; }
@media (max-width: 760px) {
    .shell.menu-open > aside { position: fixed; z-index: 1001; top: 0; bottom: 0; left: 0; width: min(300px, calc(100vw - 64px)); overflow-y: auto; padding-top: 16px; box-shadow: 8px 0 24px #02423d30; }
    .shell.menu-open .menu-backdrop { display: block; position: fixed; inset: 0 0 0 min(300px, calc(100vw - 64px)); z-index: 1000; background: #02423d55; }
    .shell-header { flex-wrap: nowrap; }
    .shell-header .menu-toggle { position: relative; z-index: 1002; }

    .shell-header .account-actions { margin-left: auto; min-width: 0; }
    .shell > aside nav { display: grid; grid-template-columns: 1fr; }
}


/* Controle integrado ao topo: o botão visível acompanha o estado do menu. */
.menu-top { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 0 -4px; }
.menu-top > .menu-toggle { width: 44px; height: 44px; }
.menu-top > .brand { flex: 1 1 auto; min-width: 0; padding: 0; }
.shell.menu-open .shell-header > .menu-toggle { display: none; }
.shell:not(.menu-open) .shell-header > .menu-toggle { display: inline-flex; }
@media (max-width: 760px) {
    .shell .menu-top { flex-wrap: nowrap; gap: 10px; }
    .shell .menu-top > .brand { min-width: 0; padding: 0; font-size: 24px; }
    .shell .menu-top .brand img { width: 42px; }
    .shell .menu-top .brand small { font-size: 10px; letter-spacing: 1px; }
}

.menu-toggle { background: transparent; border: 0; border-radius: 6px; width: 44px; height: 44px; padding: 12px; }
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle:hover { background: #02423d0c; }


/* Formulário e histórico empilhados: largura comum e alturas naturais. */
.check-in-layout { grid-template-columns: minmax(0,1fr); align-items: start; }
.check-in-layout > .notice { grid-column: 1 / -1; }
.check-in-form { display: block; min-width: 0; }
.check-in-form > .check-in-main { min-width: 0; max-width: none; width: 100%; }
.check-in-layout > .panel { padding: 24px; }
@media(max-width:760px) {
    .check-in-layout { grid-template-columns: minmax(0,1fr); }
    .check-in-form { display: block; }
    .check-in-layout > .panel, .check-in-form > .check-in-main { padding: 18px; }
}

/* T08, PDF pp. 11/21: stacked date/title/text, visibility strip and right-aligned actions. */
.journal-editor { display: grid; gap: var(--card-gap); }
.journal-editor label { display: block; margin-bottom: 6px; font-weight: 600; }
.journal-editor input, .journal-editor textarea { width: 100%; }
.journal-date { max-width: 190px; }
.journal-editor textarea { min-height: 150px; resize: vertical; font:14px "Segoe UI",sans-serif; line-height:1.6; padding:11px 12px; border:1px solid #bdcec6; border-radius:6px; background:white; color:#124a43; box-sizing:border-box; }
.journal-editor .form-actions { justify-content:flex-end; }
.journal-visibility { display:flex; align-items:center; gap:10px; background:#fcf2dd; color:#765321; padding:12px 16px; border-radius:8px; }
.journal-confirm { padding:16px; border:1px solid var(--mint, #7bcfba); border-radius:8px; background:#effaf6; }
.journal-history-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:var(--card-gap); }
.journal-history-heading h2 { margin:0; }
.journal-history-item { display:flex; align-items:flex-start; gap:20px; padding:16px; margin-bottom:0; border:1px solid #e0e9ea; border-radius:8px; color:inherit; text-decoration:none; }
.journal-history-item > div { flex:1; min-width:0; overflow-wrap:anywhere; }
.journal-history-item small { display:block; margin-top:6px; color:#607681; }
.journal-history-item p { margin:6px 0 0; }
.journal-content { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:760px) { .journal-history-heading { flex-wrap:wrap; } .journal-history-item { gap:12px; flex-wrap:wrap; } .journal-history-item > div { flex-basis:65%; } .journal-editor .form-actions { flex-wrap:wrap; } }

/* Professional check-in: the same T07 composition, with non-interactive representations. */
.check-in-history-link { display:block; color:inherit; text-decoration:none; }
.check-in-history-link h3 { font:600 14px 'Segoe UI',sans-serif; color:#086054; }
.check-in-history-link:hover { border-color:#5cab92; }
.check-in-read-track { height:6px; border-radius:5px; background:#94caba; position:relative; margin:24px 0 16px; }
.check-in-read-track > span { position:absolute; top:50%; transform:translate(-50%,-50%); width:20px; height:20px; border-radius:50%; background:#155c52; border:2px solid white; outline:1px solid #155c52; }
.check-in-read-label { display:block; font-size:12px; font-weight:600; }
.check-in-read-time { display:block; padding:11px 12px; margin-top:8px; border:1px solid #bdcec6; border-radius:6px; font-size:14px; }
.check-in-read-choice { display:flex; align-items:center; gap:10px; min-height:44px; font-size:14px; }
.check-in-read-radio,.check-in-read-checkbox { width:20px; height:20px; flex-shrink:0; border:1px solid #71847d; display:inline-flex; align-items:center; justify-content:center; }
.check-in-read-radio { border-radius:50%; }
.check-in-read-radio.selected { background:#155c52; box-shadow:inset 0 0 0 3px white; border-color:#155c52; }
.check-in-read-checkbox.selected { background:#155c52; color:white; border-color:#155c52; }
.check-in-read-updated { margin-bottom:0; }

/* T09/T10: shared card gap, natural content heights and compact clinical sections. */
.clinical-form { display: grid; gap: var(--card-gap); }
.clinical-form h2 { margin: 0; padding-top: var(--card-gap); border-top: 1px solid var(--border, #d4e5df); }
.clinical-form textarea { min-height: 90px; width: 100%; resize: vertical; font:14px "Segoe UI",sans-serif; line-height:1.6; padding:11px 12px; margin-top:8px; border:1px solid #bdcec6; border-radius:6px; background:white; color:#124a43; box-sizing:border-box; }
.clinical-form .field { margin: 0; }
.clinical-form .form-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.clinical-form .form-actions { justify-content:flex-end; }
.clinical-form > h2:first-child { padding-top:0; margin-top:0; border-top:0; }
.clinical-history a.history-card { color:inherit; text-decoration:none; display:block; }
.clinical-history { margin-top: var(--card-gap); }
.clinical-version { padding: 14px 0; border-bottom: 1px solid #d4e5df; }
.clinical-version summary { cursor: pointer; padding: 8px; }
.clinical-version summary:focus-visible { outline: 2px solid #19594f; outline-offset: 3px; }
.clinical-text { margin-top: 16px; overflow-wrap: anywhere; }
.clinical-text p { margin: 8px 0 0; }
.strategy-experience-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
.strategy-experience-grid > form { min-width: 0; }
@media (max-width: 720px) { .strategy-experience-grid, .clinical-form .form-grid { grid-template-columns: 1fr; } }
.experience-used { border:0; padding:0; margin:0; min-width:0; }
.experience-used legend { margin-bottom:8px; }
.strategy-heading, .clinical-label { display:flex; align-items:center; gap:12px; }
.strategy-heading h2 { margin:0; }
.clinical-label .revoar-icon { width:20px; height:20px; }

/* Ajuste visual aprovado: orientação e experiência em coluna, ações separadas do texto. */
.experience-used .check-in-option { display:flex; flex-direction:row; align-items:center; gap:10px; min-height:44px; }
/* Data e utilização compartilham a linha de identificação da experiência. */
.experience-context-fields { align-items:start; }
.experience-context-fields label[for=experience-date], .experience-context-fields legend { display:block; line-height:1.5; }
.experience-context-fields .field { min-width:0; }
.experience-context-fields .check-in-radios { margin-top:0; }

/* T11: pauta e preparação usam cards compartilhados e alturas naturais. */
.agenda-item { min-width:0; padding-bottom:16px; border-bottom:1px solid #d4e5df; }
.preparation-notes { white-space:pre-wrap; overflow-wrap:anywhere; }

/* Escala compartilhada por função: páginas internas, sem alterar logo/menu/toast. */
#conteudo label, #conteudo .experience-used legend, #conteudo .check-in-read-label,
#conteudo .check-in-restorative { font-size:var(--text-label); font-weight:600; line-height:1.5; color:var(--text-color); }
#conteudo :is(.panel, .card) > h2, #conteudo .clinical-form h2,
#conteudo .journal-history-heading h2, #conteudo .strategy-heading h2 { font-size:var(--title-card); font-weight:500; color:var(--text-color); line-height:1.2; }
#conteudo .overview-card h2 { font-size:var(--title-navigation); }
#conteudo :is(.panel, .card) h3 { font-size:var(--title-subsection); font-weight:500; color:var(--text-color); line-height:1.3; }
#conteudo .panel p, #conteudo .muted, #conteudo .clinical-version summary { font-size:var(--text-help); line-height:1.6; color:var(--text-secondary); }
#conteudo .clinical-text > strong, #conteudo .registration-details dt { font-size:var(--text-label); font-weight:600; color:var(--text-color); }
#conteudo .registration-details dd, #conteudo .journal-content, #conteudo .preparation-notes { font-size:var(--text-body); line-height:1.6; }
#conteudo .panel .validation-message { color:#923a2c; }

/* Ações: 20 px após o conteúdo; grades possuem esse espaço no gap, não na margem. */
.panel :is(p, dl, ol, .clinical-text):has(+ :is(.form-actions, .button, button)) { margin-bottom:0; }
.panel :is(p, dl, ol, .clinical-text) + :is(.button, button) { margin-top:var(--action-gap); }
.clinical-form > p, .journal-editor > p { margin:0; }
.clinical-form > .form-actions, .journal-editor > .form-actions,
.card-group > .form-actions { margin:0; }
.journal-history-item + .journal-history-item { margin-top:var(--card-gap); }

/* Perfis cumulativos: controle e rótulo na mesma linha. */
.clinical-form label.collaborator-access-option { display:flex; flex-direction:row; align-items:center; gap:10px; min-height:44px; cursor:pointer; }
.collaborator-access-option input[type=checkbox] { width:20px; height:20px; min-height:20px; margin:0; flex-shrink:0; accent-color:#07594f; }

/* Navegação desktop recolhida: a mesma definição de itens da lateral. */
.shell-header .top-navigation { display:none; }
@media(min-width:761px){
    .shell:not(.menu-open) .shell-header .top-navigation { display:block;flex:1 1 0;min-width:64px;margin:0; }
    .shell-header { gap:16px; }
    .shell-header .account-actions { flex-wrap:nowrap;flex-shrink:0; }
    .top-navigation-items { display:flex;align-items:center;gap:12px;min-height:44px; }
    .shell .top-navigation a, .navigation-measure > span { display:inline-flex;align-items:center;gap:8px;padding:10px 8px;white-space:nowrap;font-size:14px;font-weight:500;line-height:1.2; }
    .shell .top-navigation a.active { background:#8edbca;font-weight:600; }
    .navigation-more { position:relative;flex-shrink:0; }
    .navigation-more summary { display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 8px;cursor:pointer;font-size:14px;font-weight:600;list-style:none; }
    .navigation-more summary::-webkit-details-marker { display:none; }
    .navigation-more-items { position:absolute;right:0;top:calc(100% + 8px);z-index:1010;display:grid;gap:8px;padding:12px;background:white;border:1px solid #dbe8e2;border-radius:8px;box-shadow:0 8px 20px #02423d20;max-height:70vh;overflow-y:auto; }
    .shell .navigation-more-items a { display:flex; }
}
.navigation-measure { position:fixed;left:-10000px;top:0;display:flex;visibility:hidden;pointer-events:none; }

/* Superfície compartilhada da navegação: preserva o degradê Revoar. */
:root { --navigation-background: linear-gradient(145deg,#d5f5ed,#b9eadc); }
.shell > aside, .shell-header { background:var(--navigation-background); }
.shell-header, .shell-header .account-identification, .shell-header .logout-button { color:var(--ink); }
.shell .top-navigation a:hover, .navigation-more summary:hover, .shell-header .logout-button:hover { background:color-mix(in srgb,var(--mint) 45%,white); }
.shell .top-navigation a.active { background:var(--mint);color:var(--ink); }
.shell-header .logout-button { border-color:#639e91; }
.shell-header :is(a,button,summary):focus-visible { outline:3px solid var(--ink);outline-offset:3px; }
@media(min-width:761px){
    .top-navigation-items { justify-content:center; }
    .shell .top-navigation a { align-items:center; }
}
