/* Revisión del documento: jerarquía compacta, herramientas visibles y foco clínico. */
.word-pending-card{position:relative}
.word-pending-card-link:focus-visible{outline:3px solid #087f89;outline-offset:3px}
#pending-payments-panel{font-size:14px}
.pending-payment-tools{display:flex;align-items:end;gap:12px;margin:16px 0}
.pending-payment-tools label{display:grid;gap:5px;flex:1}
#pending-payment-summary{color:#125c73;font-weight:650;margin:12px 0}
.pending-patient{border:1px solid #d1dfe7;border-radius:12px;overflow:hidden;margin:14px 0;background:#fff}
.pending-patient>header{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#edf5f8}
.pending-patient h3{font-size:16px;margin:0 0 4px;color:#174d61}
.pending-patient>header strong,.pending-payment-amount{color:#a44c0a;white-space:nowrap}
.pending-payment-item{padding:14px 16px;border-top:1px solid #dce6ec}
.pending-payment-heading,.pending-payment-location{display:flex;justify-content:space-between;align-items:center;gap:12px}
.pending-payment-detail{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}
.pending-payment-numbers{display:flex;gap:22px;color:#526b7b}
.pending-payment-numbers b{color:#263e4b;margin-left:6px}
.pending-payment-location{margin-top:10px;padding:10px;border-radius:8px;background:#f5f8fb}
.pending-payment-location p{margin:0;line-height:1.5}.pending-payment-location small{font-size:11px;color:#607989;display:block}
#pending-payment-pages{justify-content:space-between;align-items:center;margin-top:14px}
.pending-payment-target{outline:2px solid #087f89;outline-offset:-2px}
@media(max-width:640px){.pending-patient>header,.pending-payment-heading,.pending-payment-location{align-items:flex-start;flex-direction:column}.pending-payment-location button{width:100%}.pending-payment-tools{align-items:stretch;flex-direction:column}.pending-patient>header strong{font-size:14px}}
.patient-workspace .topbar-title{font-size:19px;letter-spacing:-.025em;white-space:normal;line-height:1.15}
.patient-workspace .topbar-age{font-size:14px;color:#5c7484;white-space:nowrap}
.patient-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border:1px solid #c9dce6;border-radius:14px;background:linear-gradient(120deg,#f4f9fa,#e6eff6);box-shadow:0 4px 20px #23465c08;margin-bottom:10px}
.patient-toolbar .sx-treatment{gap:8px}.patient-toolbar .sx-treatment small{font-size:12px}
.patient-toolbar .patient-actions{display:flex;flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap;max-width:none;margin-left:0}
.patient-toolbar .avatar{width:42px;height:42px;font-size:15px;border-radius:11px}
.patient-toolbar .patient-code{font-size:13px;color:#446371}.patient-toolbar .sx-mini{border:1px solid #c3d4dd;background:white;color:#244653}
.patient-focus{padding-top:8px}.patient-focus-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.patient-focus-heading h2{font-size:19px;margin:0}.patient-focus-heading .focus-code{font-size:13px;color:#607183}
.patient-focus .ortho-module{padding:0;background:none;border:0}.patient-focus .module-heading{display:none}
.patient-focus .oq-table-wrap{max-height:calc(100vh - 290px);min-height:330px}
.patient-focus .compact-ledger-scroll{max-height:calc(100vh - 220px)}
.patient-workspace:has(.patient-focus)>.content{padding-top:12px}
.oq-table tr[data-oq-row]:hover>td,.oq-table tr[data-oq-row]:focus-within>td{background:linear-gradient(120deg,#c4e1ed,#e0e7ef)!important;box-shadow:inset 0 2px #48acbd,inset 0 -2px #48acbd}
.compact-payment:hover,.compact-payment:focus-within,[data-ledger-row]:hover>td,[data-ledger-row]:focus-within>td{background-color:#d2e7f0!important;box-shadow:inset 0 2px #479db8,inset 0 -2px #479db8}

.oq-col-clinical{width:170px}.oq-table .oq-clinical textarea{min-height:64px;font-size:13px;line-height:1.4}.oq-table .oq-clinical small{font-size:11px}
.oq-table{min-width:2050px}.word-print-tools{margin:0 0 12px;justify-content:flex-end}
.word-history-dialog{max-width:1000px}.word-history-page{width:100%;max-width:210mm;background:white;color:#20313e;padding:14mm;margin:20px auto;border:1px solid #d9e1e7;font-size:10pt;line-height:1.45}.word-history-page header{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid #247387;padding-bottom:10px;margin-bottom:20px}.word-history-page header p{margin:4px 0}.word-history-page h2{font-size:17pt}.word-history-page h3{font-size:13pt}.word-history-page td,.word-history-page th{padding:6px 8px;font-size:10pt;white-space:normal;overflow-wrap:anywhere;vertical-align:top}.word-history-page th{color:#244c61;background:#edf3f6}.word-print-pairs th{width:35%}.word-history-page footer{font-size:8pt;color:#596f7f;border-top:1px solid #ccd7df;margin-top:20px;padding-top:7px}.word-print-teeth{display:flex;justify-content:center;gap:3px}.word-print-teeth .tooth{width:35px;position:relative}.word-print-teeth .tooth svg{width:31px}.word-print-teeth .tooth small{font-size:7px}.word-print-warning{background:#fff0df;border:1px solid #dab785;padding:10px}
.cp-row:hover>td,.cp-row:focus-within>td{background:linear-gradient(110deg,#b8d7e6,#dce7f0)!important}.cp-row:hover .cp-attention,.cp-row:focus-within .cp-attention{background:transparent}
@media print{#print-area .word-history-page{page:word-history;max-width:none;width:auto;border:0;padding:0;margin:0;break-after:page;box-shadow:none}#print-area .word-history-page:last-child{break-after:auto}.word-history-page thead{display:table-header-group}.word-history-page tr,.word-history-page .word-print-teeth{break-inside:avoid}.word-history-page header{break-after:avoid}.word-history-page article{break-inside:auto}@page word-history{size:A4;margin:14mm 12mm;@bottom-center{content:counter(page) " / " counter(pages);font-size:8pt}}}
.word-home-heading h1{font-size:30px;margin:0 0 6px}.word-home-heading p{margin:0}.word-home-heading>.actions{display:flex;gap:10px;flex-wrap:wrap}
.word-home-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.word-home-card{--home-accent:#267c72;--home-tint:#edf7f4;min-width:0;min-height:270px;padding:20px;border:1px solid #aabcc5;border-top:3px solid var(--home-accent);border-radius:12px;background:linear-gradient(135deg,var(--home-tint),#fff 62%);box-shadow:0 3px 10px #18384608;display:flex;flex-direction:column;gap:10px;overflow-wrap:anywhere}
#word-home>.word-home-card:nth-child(2){--home-accent:#7954a0;--home-tint:#f3eef9}
#word-home>.word-home-card:nth-child(3){--home-accent:#3e70a6;--home-tint:#edf3fb}
#word-home>.word-home-card:nth-child(4){--home-accent:#a5742c;--home-tint:#fcf5e8}
#word-home>.word-home-card:nth-child(5){--home-accent:#337d90;--home-tint:#edf6f9}
#word-home>.word-home-card:nth-child(6){--home-accent:#a05e72;--home-tint:#faf0f4}
.word-home-card h3{margin:0 0 4px;padding-bottom:14px;border-bottom:1px solid #dce4e8;display:flex;gap:12px;align-items:center;font-size:18px;line-height:1.3;color:#253746}
.word-home-card h3 svg{width:38px;height:38px;padding:6px;flex-shrink:0;color:var(--home-accent);background:var(--home-tint);border:1px solid var(--home-accent);border-radius:9px}
.word-home-card .word-number{font-size:21px;line-height:1.35;font-weight:700;color:#263745}
.word-home-card p{color:#526775;font-size:14px;line-height:1.5;margin:0}
.word-home-card .word-micro{font-size:12px;color:#627681}
.word-home-card ul{margin:6px 0;padding-left:18px;font-size:13px}
.word-home-card>.actions{display:flex;align-items:center;border-top:1px solid #dce4e8;padding-top:10px;margin-top:auto;gap:10px;flex-wrap:wrap}
.word-home-card>.actions button{background:transparent;border:0;box-shadow:none;padding:6px 0;min-height:36px;font-size:14px;color:var(--home-accent);text-align:left;white-space:normal}
.word-home-card>.actions button.ghost{font-size:12px;margin-left:auto;color:#58717c}
.word-home-card>.actions button:hover{background:var(--home-tint);color:var(--home-accent)}
.word-home-card>.actions button svg{width:16px;height:16px;flex-shrink:0}
.word-home-card .notice{padding:8px 10px;border-radius:6px;font-size:12px;margin:0}
.word-home-more{font-size:12px;color:#5b727b}.word-home-more>summary{cursor:pointer;min-height:28px;padding:5px 0}
.word-home-more[open]{padding-bottom:8px}.word-home-more p{font-size:12px;margin:8px 0}.word-home-more .small{font-size:12px}
.word-home-more .word-home-detail{margin:8px 0}.word-home-more .word-home-detail summary{min-height:28px;padding:4px 0}
#word-home .word-home-birthday{margin:0;isolation:auto}
#word-home .word-home-birthday::before,#word-home .word-home-birthday::after{content:none}
@media(hover:hover) and (prefers-reduced-motion:no-preference){body.effects-on #word-home>.word-home-card{transition:transform .18s ease,box-shadow .18s ease}body.effects-on #word-home>.word-home-card h3 svg{transition:transform .18s ease}body.effects-on #word-home>.word-home-card:hover{transform:translateY(-3px);box-shadow:0 8px 20px #18384616}body.effects-on #word-home>.word-home-card:hover h3 svg{transform:scale(1.06)}}
#word-home-sync{margin:0;font-size:12px;color:#58717c}
.ortho-list-controls{padding:18px;border:1px solid #c9d8e0;border-radius:12px;background:#ffffffd9;margin-bottom:14px}
.ortho-list-filters{display:grid;grid-template-columns:minmax(220px,2fr) repeat(2,minmax(170px,1fr));gap:14px;align-items:start}
.ortho-list-filters .field{min-width:0;margin:0}.ortho-list-filters input,.ortho-list-filters select{width:100%;min-width:0;padding:10px;font-size:14px}
.ortho-list-secondary{grid-column:1/-1;border-top:1px solid #e0e6eb;padding-top:12px}.ortho-list-secondary>summary{cursor:pointer;color:#674c90;font-weight:650;padding:8px 0;min-height:36px}.ortho-list-secondary>summary span{margin-left:12px;font-weight:400;font-size:12px;color:#617482}
.ortho-list-secondary-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}.ortho-list-secondary p{font-size:12px;margin:10px 0 0}
.ortho-list-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:8px}.ortho-list-tools>small{color:#617482}.ortho-list-tools .actions{display:flex;gap:10px;flex-wrap:wrap}
.ortho-patients-table tr[hidden]{display:none!important}.word-list-counts{flex-wrap:wrap}
@media(max-width:1024px){.ortho-list-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.ortho-list-filters>.field:first-child{grid-column:1/-1}.ortho-list-secondary-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.ortho-list-filters input,.ortho-list-filters select{font-size:16px;min-height:44px}.ortho-list-secondary>summary{min-height:44px}.ortho-list-secondary>summary span{display:block;margin:4px 0 0 18px}.ortho-list-tools button{min-height:44px}}
@media(max-width:400px){.ortho-list-controls{padding:12px}.ortho-list-filters,.ortho-list-secondary-fields{grid-template-columns:1fr}.ortho-list-tools{align-items:stretch}.ortho-list-tools .actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.ortho-list-tools button{padding:8px;font-size:12px}.word-list-counts{gap:6px}}
@media(max-width:650px){.word-home-card{min-height:0;padding:18px}.word-home-heading h1{font-size:26px}.word-home-heading>.actions{width:100%}.word-home-card>.actions button,.word-home-more>summary{min-height:44px}.word-home-card>.actions{margin-top:10px}}
.word-list-counts{display:flex;gap:10px;margin:0 0 12px}.word-list-counts>span{padding:8px 12px;border:1px solid #c6d7e5;border-radius:8px;background:#f1f6fa;font-size:14px}.ortho-patients-table td{font-size:13px;padding:10px}.ortho-patients-table td small{display:block;font-size:11px}.ortho-patients-table{min-width:1160px}.word-palette .sx-figure{color:#197483}.word-palette [data-tool="caries"]{color:#bf355b}.word-palette [data-tool="fractura"]{color:#ca7134}
.word-palette{position:sticky;top:62px;z-index:8;display:flex;flex-wrap:wrap;align-items:center;gap:6px;background:#f7fafdee;border:1px solid #bdd0df;border-radius:12px;padding:10px;margin-bottom:14px;box-shadow:0 4px 15px #24475e16;backdrop-filter:blur(12px)}
.word-palette button{padding:6px 9px;font-size:13px;border-radius:9px;display:flex;gap:5px;align-items:center;background:#fff;border:1px solid #cedbe6}.word-palette button[aria-pressed=true]{background:#d7eaf8;border-color:#467ba3;box-shadow:0 0 0 2px #97c4e2}.word-palette svg{width:24px;height:24px}.word-palette .word-selection{width:100%;font-size:13px;color:#31596c}
.tooth.word-selected{outline:3px solid #188f9a;border-radius:9px;background:#e0f3f3}.word-palette details{position:relative}.word-palette details>div{position:absolute;left:0;top:100%;z-index:20;display:grid;min-width:200px;padding:8px;background:white;border:1px solid #c3d5e2;box-shadow:0 7px 22px #18364e22;border-radius:10px}
.word-palette summary{cursor:pointer;list-style:none;font-size:13px;padding:8px;border:1px solid #cedbe6;border-radius:8px;background:#fff}.word-palette .palette-danger{color:#a43348}
.qa-options-professional{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.qa-options-professional .qa-duration{align-self:end;font-size:13px;color:#627888}
.word-history-selector{display:flex;flex-wrap:wrap;gap:10px;padding:12px 0}.word-history-selector label{display:flex;gap:7px;align-items:center;font-size:14px}
@media(max-width:1000px){.word-home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.patient-workspace .topbar-age{display:none}}
@media(max-width:650px){.word-home-grid{grid-template-columns:1fr}.patient-workspace .topbar-title{font-size:16px}.patient-toolbar{padding:10px}.patient-focus-heading{flex-wrap:wrap}.word-palette{position:static}.qa-options-professional{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.oq-table tr[data-oq-row]{transition:none!important}}

@media(max-height:700px){.patient-focus .oq-table-wrap{min-height:200px;max-height:55vh}}
.oq-print-clinical{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px;font-size:9px}.oq-print-clinical>b{grid-column:1/-1}.oq-print-clinical span{overflow-wrap:anywhere}
