/* V2 AJUSTES 05 — menu discreto, cadastro domiciliar e documentos em estilo iOS */
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.header-actions{display:flex;align-items:center;gap:9px;min-width:0}
.data-menu{position:relative;border:0;padding:0;margin:0;background:transparent;overflow:visible}
.data-menu>summary{list-style:none;display:flex;align-items:center;justify-content:center;cursor:pointer}
.data-menu>summary::-webkit-details-marker{display:none}
.icon-action{height:38px;min-width:38px;border-radius:11px;background:rgba(255,255,255,.12);color:inherit;font-size:20px;border:1px solid rgba(255,255,255,.2);font-weight:500;transition:background .15s ease}
.icon-action:hover,.data-menu[open] .icon-action{background:rgba(255,255,255,.24)}
.menu-popover{position:absolute;right:0;top:calc(100% + 11px);width:min(310px,90vw);padding:15px;background:#fff;color:#1c2734;border:1px solid #e3e3e7;box-shadow:0 18px 55px rgba(29,29,37,.19);z-index:30;border-radius:18px;display:flex;flex-direction:column;gap:7px}
.menu-popover>strong{font-size:15px}.menu-popover>p{margin:0 0 5px}
.menu-popover .menu-action{font-weight:600;text-align:left;padding:12px;background:#f4f4f7;color:#1b2a34;box-shadow:none;border:1px solid #e4e4e8;min-height:43px}
.menu-popover .menu-action:hover{background:#e8eef8;box-shadow:none}
.menu-help{font-size:11px;color:#747987;line-height:1.4;margin-top:6px!important}
.home-heading{align-items:center;gap:14px;margin-bottom:16px}.home-heading h2{margin:0 0 3px}.home-heading .muted{margin:0}
.home-heading button{white-space:nowrap}
.eyebrow{font-weight:760;font-size:11px;color:#007aff;letter-spacing:.13em;margin:0 0 5px}
.form-group-title{font-size:16px;font-weight:760;margin:24px 0 10px;color:#1e2937;border-bottom:1px solid #e7e8ed;padding-bottom:9px}
#patientForm .grid,#docEditor .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
#patientForm .grid>* ,#docEditor .grid>*{min-width:0}
#patientForm .grid .wide{grid-column:1/-1}
#patientForm label,#docEditor label{font-size:13px;margin-bottom:6px}
#patientForm input,#patientForm select,#docEditor input,#docEditor select,#docEditor textarea{background:#fbfbfd;border-color:#d3d5dd}
.inline-edit-row{display:flex;gap:12px;border:1px solid #e5e6ed;border-radius:14px;background:#fafbff;padding:12px 14px;margin:8px 0;align-items:flex-start}
.inline-edit-row .grow{display:grid;grid-template-columns:1.4fr 1fr;gap:10px}.inline-edit-row .grow>*{min-width:0}
.inline-edit-row button{margin-top:25px}
.safe-confirm{margin-top:20px;background:#f0f7ff!important;border:1px solid #d2e6ff!important;max-width:100%}
.safe-confirm span{line-height:1.35}
.doc-list-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid #e8e9ee}
.doc-list-row:last-child{border:0}.doc-list-row strong{font-size:14px}.doc-list-row .muted{margin:5px 0 0}
.doc-list-row .nav{margin:0;gap:5px}
.doc-list-row button{white-space:nowrap}
.template-edit{padding:12px 14px;background:#fafbfe;border:1px solid #e6e8ed;border-radius:14px;margin:10px 0}
.doc-test-alert{margin-top:13px}
#docMedRows .med-item{padding:15px;border-radius:15px;box-shadow:none}
.paper-a4{max-width:210mm;min-height:250mm;margin:14px auto;background:#fff;color:#182633;padding:18mm 19mm;border:1px solid #d7d8dd;border-radius:7px;box-shadow:0 11px 34px rgba(24,38,51,.10);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
.paper-top{display:flex;justify-content:space-between;gap:10px;border-bottom:2px solid #1c3346;padding-bottom:14px;align-items:flex-start}
.paper-top strong{font-size:17px;letter-spacing:.025em;display:block}
.paper-top span{display:block;font-size:10px;margin-top:5px;color:#52616c;letter-spacing:.08em}
.paper-test{border:1px solid #dfb5b5;color:#aa3434;padding:5px 9px;font-size:10px;letter-spacing:.08em;font-weight:800;border-radius:5px}
.paper-title{text-align:center;margin:29px 0 22px;font-size:21px;text-transform:uppercase;letter-spacing:.02em}
.paper-patient{background:#f8fafb;border:1px solid #e4e9ed;padding:11px 14px;font-size:12px;line-height:1.5;border-radius:5px}
.paper-patient p{margin:4px 0}.paper-section{margin:25px 0;font-size:13px;line-height:1.7}.paper-section h4{margin-bottom:10px;font-size:13px;text-transform:uppercase;letter-spacing:.05em}
.paper-med{padding:9px 0;border-bottom:1px solid #e7e8eb;break-inside:avoid}.paper-med p{margin:5px 0 0}.paper-body{white-space:normal;min-height:80px}
.paper-sign{text-align:center;margin:75px auto 22px;max-width:280px;font-size:12px;break-inside:avoid}.paper-sign .sign-line{border-top:1px solid #2c3942;margin-bottom:8px}.paper-sign p{margin:2px 0}.paper-sign small{display:block;margin-top:6px;color:#52606c}
.paper-foot{border-top:1px solid #eccaca;font-size:9px;letter-spacing:.02em;color:#a54444;padding-top:8px;text-align:center;line-height:1.45}
#docPreview>.panel{background:#f6f6f8}
@media(max-width:790px){.doc-list-row{align-items:flex-start;flex-direction:column;gap:8px}.inline-edit-row .grow{grid-template-columns:1fr}.inline-edit-row button{margin-top:25px}}
@media(max-width:600px){.header-actions{gap:5px}.header-actions .tag{font-size:10px;padding:5px 7px}.home-heading{align-items:flex-start;flex-direction:column}.home-heading button{width:100%}#patientForm .grid,#docEditor .grid{grid-template-columns:1fr}.inline-edit-row{flex-direction:column;gap:0}.inline-edit-row .grow{width:100%}.inline-edit-row button{margin:0}.paper-a4{padding:12mm 10mm;min-height:auto}.paper-title{font-size:18px}.paper-test{font-size:9px}}
@media print{
 body.printing-doc{background:#fff!important;color:#111!important}
 body.printing-doc header,body.printing-doc .alert,body.printing-doc .nav,body.printing-doc #home,body.printing-doc #detail,body.printing-doc #visit,body.printing-doc #report,body.printing-doc #documents,body.printing-doc #patientForm,body.printing-doc #docEditor,body.printing-doc #toast{display:none!important}
 body.printing-doc #docPreview{display:block!important;background:#fff!important}
 body.printing-doc #docPreview>.panel{display:block!important;padding:0!important;border:0!important;background:white!important;box-shadow:none!important;margin:0!important}
 body.printing-doc #docPreview>.panel>p{display:none!important}
 body.printing-doc .wrap{max-width:none!important;width:100%!important;margin:0!important;padding:0!important}
 body.printing-doc #docPrintArea{background:#fff!important;print-color-adjust:exact;-webkit-print-color-adjust:exact;width:100%!important;max-width:none!important;min-height:0!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;border-radius:0!important}
 @page{size:A4;margin:15mm 16mm}
}
@media print{html:has(body.printing-doc),html:has(body.printing-doc) body,body.printing-doc main.wrap{background:#fff!important}}

/* V2 AJUSTES 06 — página inicial, central de documentos e engrenagem iOS */
.icon-action{width:42px;height:42px;border-radius:13px;display:flex;align-items:center;justify-content:center;min-width:42px}
.icon-action .settings-glyph{display:block;opacity:.96}
#home{max-width:1250px;margin:auto}
.home-welcome{border:1px solid rgba(255,255,255,.7);border-radius:24px;padding:26px 30px;background:linear-gradient(125deg,#f7faff,#eaf3ff);display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:15px;box-shadow:0 8px 30px rgba(62,102,151,.08)}
.home-welcome h2{font-size:clamp(25px,3vw,36px);letter-spacing:-.035em;margin:3px 0 7px;color:#182b46}
.home-welcome p:not(.eyebrow){margin:0;color:#67758b;font-size:14px}
.home-welcome-mark{font-size:50px;font-weight:300;color:#4c92ff;background:#fff8;border-radius:24px;width:77px;height:77px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.home-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.home-shortcut{appearance:none;display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:14px;padding:18px;border-radius:20px;min-height:106px;background:#fff;color:#233247;border:1px solid #e1e6ef;box-shadow:0 6px 22px rgba(35,64,106,.06)}
.home-shortcut:hover{background:#fff;border-color:#a9c9f5;box-shadow:0 12px 28px rgba(35,86,151,.11)}
.shortcut-icon{width:46px;height:46px;display:flex;align-items:center;justify-content:center;border-radius:15px;background:linear-gradient(155deg,#edf5ff,#dceafe);color:#1972e8;font-size:27px;line-height:1;flex-shrink:0;font-weight:500}
.shortcut-copy{display:flex;flex-direction:column;gap:5px;min-width:0}.shortcut-copy strong{font-size:15px;line-height:1.2}.shortcut-copy small{font-size:12px;color:#687a91;font-weight:500;line-height:1.35}.shortcut-next{font-size:25px;font-weight:300;color:#95a6be;margin-left:auto}
.home-patients-panel{scroll-margin-top:100px;padding:23px 26px}
.section-symbol{font-size:28px;color:#5883bc;background:#eef5ff;width:42px;height:42px;border-radius:13px;display:flex;align-items:center;justify-content:center}
.search-wrap{display:flex;gap:7px;align-items:center;background:#f5f7fb;border:1px solid #dce2eb;border-radius:14px;padding:0 12px;transition:border-color .15s ease}
.search-wrap:focus-within{border-color:#589cf3;box-shadow:0 0 0 4px rgba(28,118,235,.08)}
.search-wrap>span{color:#6f8cb3;font-size:24px;line-height:1}
.search-wrap input{border:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;min-height:48px;padding:8px 0}
.hub-header{padding:24px}
.doc-guide{display:flex;flex-wrap:wrap;align-items:center;gap:9px;font-size:13px;color:#596a82;border-radius:13px;background:#f5f8fc;padding:13px 15px;margin:20px 0 18px}
.guide-number{color:#fff;background:#2682ed;width:23px;height:23px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-weight:800;font-size:12px}.guide-divider{font-size:20px;color:#a3b5c7}
.hub-group{margin-top:17px}.hub-group h3{font-size:14px;margin-bottom:10px;color:#536781}
.hub-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.hub-type{background:#fbfcff;border:1px solid #e1e8f0;border-radius:15px;color:#26384d;padding:12px 14px;display:flex;align-items:center;gap:10px;text-align:left;min-height:75px;box-shadow:none}
.hub-type:hover{background:#f4f9ff;border-color:#b7d7ff}.hub-type.active{border-color:#2682ed;background:#edf5ff}
.hub-type-icon{display:flex;align-items:center;justify-content:center;min-width:38px;height:38px;border-radius:10px;background:#e7f1ff;color:#1972e8;font-size:22px;font-weight:500}
.hub-type span:nth-child(2){min-width:0;display:flex;flex-direction:column;gap:3px}.hub-type strong{font-size:13px;line-height:1.3}.hub-type small{font-size:11px;font-weight:450;color:#66778d;line-height:1.4}.hub-arrow{margin-left:auto;color:#97a8bc;font-size:24px}
.hub-pending{display:flex;align-items:flex-start;gap:12px;background:#f8f8fb;border:1px dashed #cbd1de;border-radius:15px;padding:14px 17px;margin-top:20px;color:#43536b}.hub-pending>span{font-size:24px;color:#7698c4}.hub-pending strong{font-size:14px}.hub-pending p{margin:5px 0 0;color:#728093;font-size:12px;line-height:1.5}
#hubPatientPanel{scroll-margin-top:94px}.hub-results{margin-top:13px;max-height:460px;overflow:auto}.hub-patient{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid #ebeff4}.hub-patient:last-child{border:0}.hub-patient strong{font-size:14px}.hub-patient small{display:block;margin-top:4px;color:#6b7b90;font-size:12px}.hub-patient button{flex-shrink:0}
.doc-structured-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.doc-structured-grid .doc-wide{grid-column:1/-1}
.paper-structured .paper-field{padding:8px 0;border-bottom:1px solid #eef1f4;break-inside:avoid}.paper-structured .paper-field>div{white-space:pre-wrap;margin-top:4px}
@media(max-width:900px){.home-shortcuts{grid-template-columns:1fr 1fr}.hub-types{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.home-welcome{padding:22px 17px;border-radius:19px}.home-welcome-mark{display:none}.home-shortcuts{grid-template-columns:1fr;gap:8px}.home-shortcut{min-height:79px;padding:13px 15px;gap:12px}.shortcut-icon{width:42px;height:42px}.home-patients-panel{padding:18px 14px}.hub-header{padding:16px}.hub-types{grid-template-columns:1fr}.hub-patient{align-items:flex-start;flex-direction:column}.hub-patient button{width:100%}.doc-guide{font-size:12px}.doc-structured-grid{grid-template-columns:1fr}}
@media print{body.printing-doc .hub-header,body.printing-doc #docsHub{display:none!important}}

@media(max-width:600px){#home .section-symbol{display:none}.home-patients-panel .home-heading{margin-bottom:12px}}
