/* HORIZON SGE 30.8 — gestão integrada, blues oficiais, contraste consistente */
#horizon-sge-app .h308-shell{--h308-bg:#fff;--h308-fg:#20354e;--h308-sub:#5d7086;--h308-edge:#d7e5f2;--h308-input:#f3f8fd;max-width:1320px;margin:auto;padding:15px 8px 70px;color:var(--h308-fg);font:inherit}
#horizon-sge-app .h308-header{background:linear-gradient(115deg,#004A99,#1A75D3);border-radius:20px;padding:25px 28px;color:#fff;margin-bottom:20px}
#horizon-sge-app .h308-header span{font-size:11px;color:#dceeff;letter-spacing:.12em;font-weight:700}
#horizon-sge-app .h308-header h2{font-weight:800;font-size:clamp(20px,2.6vw,28px);color:#fff;margin:7px 0}
#horizon-sge-app .h308-header p{color:#ecf5ff;font-size:13px;margin:0;max-width:880px}
#horizon-sge-app .h308-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;background:var(--h308-bg);border:1px solid var(--h308-edge);border-radius:14px;padding:15px 17px}
#horizon-sge-app .h308-toolbar label{display:flex;flex-direction:column;gap:6px;flex:1 1 220px;font-size:12px;color:var(--h308-fg);font-weight:700}
#horizon-sge-app .h308-shell :is(input,select,textarea){box-sizing:border-box;display:block;width:100%;background:var(--h308-input);border:1px solid var(--h308-edge);border-radius:9px;padding:11px;color:var(--h308-fg);font:inherit;font-size:13px}
#horizon-sge-app .h308-shell :is(input,select,textarea):focus-visible{outline:2px solid #1A75D3;outline-offset:2px}
#horizon-sge-app .h308-shell button{cursor:pointer;border-radius:9px;border:1px solid var(--h308-edge);background:var(--h308-input);color:#004A99;padding:9px 13px;font:inherit;font-size:12px;font-weight:700}
#horizon-sge-app .h308-shell .h308-submit{background:#004A99;border:1px solid #004A99;color:#fff;padding:12px 17px}
#horizon-sge-app .h308-quick{margin:12px 0 20px;border:1px dashed var(--h308-edge);border-radius:13px;background:var(--h308-bg);padding:12px 15px;font-size:12px}
#horizon-sge-app .h308-quick strong{display:block;margin-bottom:8px}#horizon-sge-app .h308-quick>div{display:flex;gap:7px;flex-wrap:wrap}
#horizon-sge-app .h308-quick small,#horizon-sge-app .h308-muted{color:var(--h308-sub);font-size:11px}
#horizon-sge-app .h308-content{margin-top:15px}
#horizon-sge-app .h308-create{background:var(--h308-bg);border:1px solid var(--h308-edge);border-radius:15px;margin-bottom:17px}
#horizon-sge-app .h308-create summary{padding:15px 18px;font-weight:800;color:var(--h308-fg);cursor:pointer}
#horizon-sge-app .h308-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;padding:15px 18px 20px}
#horizon-sge-app .h308-form label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:750;color:var(--h308-fg)}
#horizon-sge-app .h308-form label.h308-wide{grid-column:1/-1}#horizon-sge-app .h308-form .h308-submit{justify-self:start;grid-column:1/-1}
#horizon-sge-app .h308-list-head{display:flex;justify-content:space-between;gap:9px;align-items:center;color:var(--h308-fg);margin:20px 0 8px}
#horizon-sge-app .h308-list-head small{color:var(--h308-sub)}
#horizon-sge-app .h308-item{border:1px solid var(--h308-edge);background:var(--h308-bg);padding:16px;margin:10px 0;border-radius:14px;box-shadow:0 4px 18px rgba(0,74,153,.035)}
#horizon-sge-app .h308-item-head{display:flex;gap:10px;justify-content:space-between;align-items:center}
#horizon-sge-app .h308-item-head strong{font-size:15px;color:var(--h308-fg)}
#horizon-sge-app .h308-pill{font-size:11px;font-weight:750;padding:6px 10px;background:var(--h308-input);color:#004A99;border-radius:20px}
#horizon-sge-app .h308-sub{font-size:11px;color:var(--h308-sub);margin:7px 0}
#horizon-sge-app .h308-item summary{font-size:12px;font-weight:700;color:#1A75D3;cursor:pointer;margin-top:9px}
#horizon-sge-app .h308-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:9px;margin-top:10px}
#horizon-sge-app .h308-fields>div{background:var(--h308-input);padding:10px;border-radius:8px;min-width:0;overflow-wrap:anywhere}
#horizon-sge-app .h308-fields span{font-size:10px;color:var(--h308-sub);display:block;margin-bottom:4px}
#horizon-sge-app .h308-fields strong{font-size:12px;white-space:pre-wrap}
#horizon-sge-app .h308-history{font-size:11px;color:var(--h308-sub);margin:15px 0}
#horizon-sge-app .h308-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
#horizon-sge-app .h308-empty,#horizon-sge-app .h308-error{border-radius:12px;background:var(--h308-input);padding:18px;color:var(--h308-sub)}
#horizon-sge-app .h308-error{color:#bb4747;border:1px solid #bb4747}
#horizon-sge-app .h308-insights{background:var(--h308-bg);border:1px solid var(--h308-edge);border-radius:14px;padding:16px;color:var(--h308-fg)}
#horizon-sge-app .h308-insights h3{color:var(--h308-fg);margin:0}
#horizon-sge-app .h308-insights p{color:var(--h308-sub);font-size:12px}
#horizon-sge-app .h308-scroll{width:100%;overflow:auto}
#horizon-sge-app .h308-scroll table{border-collapse:collapse;width:100%;min-width:600px;font-size:12px}
#horizon-sge-app .h308-scroll th{background:var(--h308-input);color:var(--h308-fg);text-align:left}
#horizon-sge-app .h308-scroll :is(td,th){padding:10px;border-bottom:1px solid var(--h308-edge)}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h308-shell{--h308-bg:#172b40;--h308-fg:#eff6ff;--h308-sub:#b5c9db;--h308-edge:#31506e;--h308-input:#203b57}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h308-shell :is(.h308-pill,.h308-item summary){color:#b6dcff}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h308-shell button:not(.h308-submit){color:#b6dcff}
@media(max-width:680px){#horizon-sge-app .h308-header{padding:18px}#horizon-sge-app .h308-form{grid-template-columns:1fr}#horizon-sge-app .h308-toolbar{align-items:stretch}#horizon-sge-app .h308-shell{padding:6px 2px 90px}#horizon-sge-app .h308-item-head{align-items:flex-start;flex-direction:column}}
@media print{#horizon-sge-app .h308-shell{display:none!important}}
