/* Rotinas acompanha o mesmo espaço de conteúdo e os temas do portal. */
#horizon-sge-app .h320-shell {
 --h320-surface:var(--hx-card,#fff);
 --h320-text:var(--hx-text,#16324a);
 --h320-muted:var(--hx-muted,#617284);
 --h320-border:var(--hx-border,#dce7f2);
 --h320-brand:var(--hx-primary,#004a99);
 width:100%;max-width:100%;min-width:0;margin:0;color:var(--h320-text);font:inherit;
}
#horizon-sge-app .h320-shell *{box-sizing:border-box}
#horizon-sge-app .h320-shell .h320-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:0 0 20px;padding:22px 24px;border:1px solid var(--h320-border);border-radius:16px;background:var(--h320-surface)}
#horizon-sge-app .h320-header>div{min-width:0;flex:1}
#horizon-sge-app .h320-header small{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--h320-muted)}
#horizon-sge-app .h320-shell h2{margin:6px 0 8px;font-size:clamp(20px,2.4vw,26px);line-height:1.25;color:var(--h320-text)}
#horizon-sge-app .h320-shell h3{margin:0 0 12px;font-size:18px;line-height:1.4;color:var(--h320-text)}
#horizon-sge-app .h320-shell h4{margin:0 0 10px;font-size:15px;line-height:1.4;color:var(--h320-text)}
#horizon-sge-app .h320-shell p{margin:8px 0 14px;line-height:1.65;color:var(--h320-muted);overflow-wrap:anywhere}
#horizon-sge-app .h320-header p{margin:0;font-size:13px}
#horizon-sge-app .h320-header>label{flex:0 0 150px}
#horizon-sge-app .h320-tabs{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;min-width:0;margin:0 0 24px;padding:10px;border:1px solid var(--h320-border);border-radius:14px;background:var(--h320-surface)}
#horizon-sge-app .h320-shell button{max-width:100%;min-height:42px;border:1px solid var(--h320-brand);border-radius:9px;padding:10px 14px;background:var(--h320-brand);color:#fff;cursor:pointer;font:inherit;font-size:13px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
#horizon-sge-app .h320-shell button:disabled{opacity:.5;cursor:default}
#horizon-sge-app .h320-shell button:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}
#horizon-sge-app .h320-shell .h320-tabs button{margin:0;background:transparent;border-color:transparent;color:var(--h320-text);text-align:left}
#horizon-sge-app .h320-shell .h320-tabs button:hover{border-color:var(--h320-border)}
#horizon-sge-app .h320-shell .h320-tabs button[aria-pressed=true]{background:var(--h320-brand);border-color:var(--h320-brand);color:#fff}
#horizon-sge-app .h320-content{min-width:0;padding-bottom:24px}
#horizon-sge-app .h320-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0}
#horizon-sge-app .h320-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:18px;min-width:0}
#horizon-sge-app .h320-grid>*{min-width:0}
#horizon-sge-app .h320-wide{grid-column:1/-1}
#horizon-sge-app .h320-shell :is(.h320-form,.h320-card){min-width:0;padding:24px;margin:18px 0;border:1px solid var(--h320-border);border-radius:14px;background:var(--h320-surface);color:var(--h320-text);box-shadow:0 3px 12px #16324a05}
#horizon-sge-app .h320-grid>.h320-card{margin:0}
#horizon-sge-app .h320-shell label{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;font-size:13px;font-weight:600;line-height:1.5;color:var(--h320-text)}
#horizon-sge-app .h320-shell :is(input:not([type=checkbox]),select,textarea){width:100%;min-width:0;max-width:100%;min-height:44px;box-sizing:border-box;padding:10px 12px;border:1px solid var(--h320-border);border-radius:9px;background:var(--h320-surface);color:var(--h320-text);font:inherit}
#horizon-sge-app .h320-shell input[type=checkbox]{width:18px;height:18px;align-self:flex-start;accent-color:var(--h320-brand)}
#horizon-sge-app .h320-shell textarea{min-height:108px;resize:vertical}
#horizon-sge-app .h320-form>button{margin:18px 8px 0 0}
#horizon-sge-app .h320-content>label{max-width:440px;margin-bottom:16px}
#horizon-sge-app .h320-shell .h320-story{white-space:pre-wrap;overflow-wrap:anywhere}
#horizon-sge-app .h320-shell li{overflow-wrap:anywhere}
#horizon-sge-app .h320-shell details{margin:14px 0;padding:0 0 10px;border-bottom:1px solid var(--h320-border)}
#horizon-sge-app .h320-shell summary{cursor:pointer;padding:10px 0;font-weight:600;line-height:1.5}
#horizon-sge-app .h320-shell [data-message]{color:#a31621}
#horizon-sge-app #menu-area [data-h320-menu] span{min-width:0;white-space:normal;line-height:1.4}
@media(min-width:901px){#horizon-sge-app #system-container.sidebar-collapsed [data-h320-menu] span{display:none}}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"],body.hsg-dark #horizon-sge-app) .h320-shell{--h320-surface:var(--d-surface,#0f1e30);--h320-text:var(--d-text,#edf5fd);--h320-muted:var(--d-muted,#b6c8d9);--h320-border:var(--d-border,#2a425b);--h320-brand:#1a75d3}
@media(max-width:720px){
 #horizon-sge-app .h320-shell .h320-header{flex-direction:column;gap:16px;padding:18px}
 #horizon-sge-app .h320-header>label{flex:auto;width:100%;max-width:200px}
 #horizon-sge-app .h320-tabs{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;margin-bottom:18px}
 #horizon-sge-app .h320-shell .h320-tabs button{flex:0 0 auto;white-space:nowrap}
 #horizon-sge-app .h320-shell :is(.h320-card,.h320-form){padding:18px}
 #horizon-sge-app .h320-grid{grid-template-columns:1fr}
 #horizon-sge-app .h320-actions{align-items:stretch}
 #horizon-sge-app .h320-actions button{flex:1 1 160px}
}
.h320-camera{width:min(94vw,520px);border:0;border-radius:14px;padding:24px}
.h320-camera video{width:100%;max-height:55vh;background:#101c2b;border-radius:8px}
.h320-camera button{padding:10px 16px;margin:12px 8px 0 0}
.h320-camera::backdrop{background:#061e3dcc}
