/* HT Sistemas V3: progressive presentation layer; tenant colours come from the shell. */
:root{--ht-accent:var(--hany-primary,#249f5d);--ht-accent-strong:var(--hany-primary-dark,#197d47);--ht-bg:var(--hany-page-bg,#f5f7f6);--ht-surface:var(--hany-card-bg,#fff);--ht-text:var(--hany-text,#13251b);--ht-muted:var(--hany-muted,#52655b);--ht-border:var(--hany-border,#dce5df);--ht-radius:16px;--ht-shadow:0 6px 24px #142b1810;--ht-nav-height:64px;--ht-space:12px}
html.dark{--ht-bg:#0e1512;--ht-surface:#18231d;--ht-text:#edf5ef;--ht-muted:#b2c3b8;--ht-border:#33473a}
[hidden]{display:none!important}
.ht-v3{font-family:Inter,system-ui,-apple-system,sans-serif;color:var(--ht-text)}
.ht-v3 .app-main,.ht-v3 .content-wrapper,.ht-v3 .content-scroll{min-width:0}
.ht-v3 .content-wrapper{max-width:1680px;width:100%;margin-inline:auto}
.ht-v3 :is(input,select,textarea){max-width:100%;scroll-margin-top:100px}
.ht-v3 :is(button,a,input,select,textarea):focus-visible{outline:3px solid var(--ht-accent);outline-offset:3px}
.ht-v3 :is(button,a){touch-action:manipulation}
.ht-v3 :is(button,a):active{filter:brightness(.94)}
.ht-v3 :is(img,video,canvas){max-width:100%}
.ht-v3 .ht-filter-toggle{list-style:none;cursor:pointer;font-weight:700;display:flex;justify-content:space-between;align-items:center;min-height:44px;gap:8px}
.ht-filter-toggle::after{content:'+';font-size:24px}.ht-filters[open]>.ht-filter-toggle::after{content:'−'}
.ht-filters>.ht-filter-fields{margin-top:12px}
.ht-table-region{max-width:100%;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.ht-table-region:focus-visible{outline:3px solid var(--ht-accent)}
.ht-table-region thead th{position:sticky;top:0;z-index:1;background:var(--ht-surface)}
.ht-row-details{display:none}
.ht-bottom-nav{display:none}
.ht-network-state{position:fixed;top:calc(8px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);z-index:100;background:#713f12;color:#fff;border-radius:12px;padding:10px 16px;font-size:13px;max-width:92vw;box-shadow:var(--ht-shadow)}
.ht-v3 .ht-product-actions summary{cursor:pointer;list-style:none;font-weight:700;color:var(--ht-accent);min-height:44px;display:flex;align-items:center;gap:8px}
.ht-product-actions summary::after{content:'⋯';font-size:24px}
.ht-v3 .ht-product-actions[open]>div{display:flex;flex-wrap:wrap;gap:8px;padding-top:8px}
.ht-v3 .ht-product-actions :is(a,button){min-width:44px;min-height:44px}
.ht-v3 .product-card-transition .ht-product-image{height:128px}
@media(min-width:768px){.ht-filter-toggle{display:none!important}.ht-filters>.ht-filter-fields{margin-top:0}.ht-v3 .ht-product-actions summary{display:none}.ht-v3 .ht-product-actions>div{display:flex;gap:8px}.ht-v3 .ht-product-actions:not([open])>div{display:flex}.ht-v3 .ht-filters:not([open])>.ht-filter-fields{display:grid}}
@media(max-width:767px){
 .ht-v3{--topbar-height:56px;--ht-space:10px}
 .ht-v3 .topbar{min-height:56px;gap:8px;padding-inline:12px}
 .ht-v3 .icon-btn{min-width:44px;min-height:44px}
 .ht-v3 .content-wrapper{padding:12px max(12px,env(safe-area-inset-right,0px)) calc(24px + var(--ht-nav-height) + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))}
 .ht-v3 .content-scroll{height:auto;overflow:visible}
 .ht-v3 .app-main>footer{padding-bottom:calc(var(--ht-nav-height) + env(safe-area-inset-bottom,0px));font-size:12px}
 .ht-v3 .ht-bottom-nav{position:fixed;inset:auto 0 0;z-index:45;display:flex;justify-content:space-around;gap:2px;padding:6px max(6px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));min-height:var(--ht-nav-height);background:var(--ht-surface);border-top:1px solid var(--ht-border);box-shadow:0 -4px 20px #142b180a}
 .ht-bottom-nav :is(a,button){flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:48px;padding:4px;border:0;border-radius:12px;background:transparent;color:var(--ht-muted);font:600 11px/1.2 Inter,system-ui,sans-serif;text-decoration:none}
 .ht-bottom-nav svg{width:21px;height:21px}.ht-bottom-nav [aria-current=page]{background:color-mix(in srgb,var(--ht-accent) 12%,var(--ht-surface));color:var(--ht-accent)}
 .ht-v3.ht-keyboard-open .ht-bottom-nav{display:none}
 .ht-v3 #pwaInstallFab{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
 .ht-v3 [role=dialog]{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
 .ht-v3 .ht-card-table{display:block;min-width:0!important;width:100%}
 .ht-card-table>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .ht-card-table>tbody{display:grid;gap:10px;padding:10px}
 .ht-card-table>tbody>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border:1px solid var(--ht-border);border-radius:var(--ht-radius);padding:12px;background:var(--ht-surface);color:var(--ht-text);box-shadow:var(--ht-shadow)}
 .ht-card-table>tbody>tr>td{display:flex;flex-direction:column;align-items:flex-start;min-width:0;white-space:normal!important;overflow-wrap:anywhere;padding:4px!important;text-align:left!important;border:0}
 .ht-card-table>tbody>tr>td::before{content:attr(data-ht-label);color:var(--ht-muted);font-size:11px;font-weight:600;line-height:1.4;margin-bottom:4px;text-transform:none;letter-spacing:0}
 .ht-card-table>tbody>tr>td:first-child{grid-column:1/-1;font-size:15px}
 .ht-card-table>tbody>tr>td[colspan]{grid-column:1/-1}
 .ht-card-table>tbody>tr>td.ht-cell-extra{display:none}
 .ht-card-table>tbody>tr.ht-row-expanded>td.ht-cell-extra{display:flex}
 .ht-v3 .ht-row-details{display:inline-flex;align-items:center;min-height:44px;background:var(--ht-surface);border:1px solid var(--ht-border);border-radius:10px;color:var(--ht-accent);font:600 12px Inter,system-ui;margin-top:8px;padding:8px 12px}
 .ht-v3 .product-card-transition{border-radius:16px}
 .ht-v3 .product-card-transition .ht-product-image{height:80px}
 .ht-v3 .product-card-transition>.space-y-4{padding:12px}.ht-v3 .product-card-transition>.space-y-4>*+*{margin-top:10px}
 .ht-v3 form.ht-form-grid,.ht-v3 form .ht-form-grid{grid-template-columns:minmax(0,1fr)!important}
 .ht-v3 :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){font-size:16px;min-height:44px}
 .ht-v3 form :is(button[type=submit],input[type=submit]){min-height:44px;white-space:normal}
 .ht-v3 .ht-period-chips{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;gap:6px;padding-bottom:6px;scrollbar-width:thin}.ht-period-chips>*{flex:0 0 auto;min-height:44px}
 .ht-v3.ht-launcher main{padding:90px 12px 24px}.ht-v3.ht-launcher .module-item{border-radius:18px;padding:16px}
 .ht-v3.ht-launcher h1{font-size:24px}.ht-v3.ht-launcher nav>div{padding-inline:12px}
}
@media(prefers-reduced-motion:reduce){.ht-v3 *{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media print{.ht-bottom-nav,.ht-network-state,.ht-row-details,.ht-filter-toggle{display:none!important}.ht-card-table{display:table!important}.ht-card-table>thead{position:static;width:auto;height:auto;clip-path:none}.ht-card-table>tbody{display:table-row-group}.ht-card-table>tbody>tr{display:table-row}.ht-card-table>tbody>tr>td,.ht-card-table>tbody>tr>td.ht-cell-extra{display:table-cell}.ht-card-table td::before{display:none}.ht-filters>.ht-filter-fields{display:grid!important}}
.ht-dense-hint{display:none}
@media(max-width:767px){.ht-v3 .ht-card-table td :is(a,button){min-height:44px;min-width:44px}.ht-v3 .ht-dense-hint{display:block;font-size:12px;color:var(--ht-muted);padding:8px 12px}.ht-v3.ht-auth{overflow:auto!important;padding:max(16px,env(safe-area-inset-top,0px)) 16px max(16px,env(safe-area-inset-bottom,0px));}.ht-v3.ht-auth form{max-width:100%}}
@media print{.ht-dense-hint{display:none!important}}
/* Legacy report templates have explicit light utility colours and hover states. */
html.dark .ht-v3{background:var(--ht-bg)!important;color:var(--ht-text)}
html.dark .ht-v3 :is(.bg-white,.bg-slate-50,.bg-gray-50,.ht-card-region){background-color:var(--ht-surface)!important}
html.dark .ht-v3 .topbar{background:var(--ht-surface)!important;border-color:var(--ht-border)}
html.dark .ht-v3 :is(.text-slate-950,.text-slate-900,.text-slate-800,.text-gray-900,.text-gray-800){color:var(--ht-text)!important}
html.dark .ht-v3 :is(.text-slate-400,.text-slate-500,.text-slate-600,.text-gray-400,.text-gray-500,.text-gray-600){color:var(--ht-muted)!important}
html.dark .ht-v3 .ht-card-table>tbody>tr{background:var(--ht-surface)!important}
html.dark .ht-v3 .ht-card-table>tbody>tr>td{color:var(--ht-text)!important}
@media print{html.dark .ht-v3,html.dark .ht-v3 .ht-card-table>tbody>tr{background:#fff!important;color:#000!important}html.dark .ht-v3 .ht-card-table td{color:#000!important}}
