/* HORIZON SGE 30.7 — sistema leve e coerente com os dois azuis institucionais */
#horizon-sge-app .h307-shell{--h307-border:#DAE5F0;--h307-surface:#fff;--h307-soft:#F2F7FC;--h307-ink:#16334F;--h307-muted:#637B95;color:var(--h307-ink);max-width:1300px;margin:0 auto;padding:20px 10px 35px}
#horizon-sge-app .h307-header{background:linear-gradient(117deg,#004A99 0%,#1A75D3 100%);color:#fff;padding:25px 30px;border-radius:20px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}
#horizon-sge-app .h307-header h2{color:#fff;font-weight:750;font-size:clamp(20px,2.5vw,29px);margin:5px 0}
#horizon-sge-app .h307-header p{color:#EBF4FF;margin:0;font-size:13px}
#horizon-sge-app .h307-header span{color:#CEE6FF;text-transform:uppercase;font-size:10px;font-weight:800;letter-spacing:.12em}
#horizon-sge-app .h307-refresh{background:#fff;color:#004A99;border:1px solid #CFE2F8;padding:10px 15px;border-radius:10px;cursor:pointer;font-weight:750;white-space:nowrap}
#horizon-sge-app .h307-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 20px}
#horizon-sge-app .h307-tabs{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
#horizon-sge-app .h307-tabs button{border:1px solid var(--h307-border);color:var(--h307-ink);border-radius:10px;padding:10px 12px;background:var(--h307-surface);font-size:12px;cursor:pointer}
#horizon-sge-app .h307-tabs button.active{border-color:#1A75D3;color:#fff;background:#004A99;box-shadow:0 4px 12px rgba(0,74,153,.18)}
#horizon-sge-app .h307-tabs button i{margin-right:6px}
#horizon-sge-app .h307-school{display:flex;gap:8px;align-items:center;font-weight:700;font-size:12px}
#horizon-sge-app .h307-school select{min-width:min(240px,75vw);width:100%;background:var(--h307-surface);border-radius:9px;color:var(--h307-ink);border:1px solid var(--h307-border);padding:9px}
#horizon-sge-app .h307-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(188px,1fr));gap:12px;margin-bottom:22px}
#horizon-sge-app .h307-stat{border:1px solid var(--h307-border);border-left:4px solid #1A75D3;padding:18px 17px;border-radius:14px;background:var(--h307-surface);box-shadow:0 4px 16px rgba(3,45,88,.04);display:flex;flex-direction:column;gap:6px}
#horizon-sge-app .h307-stat>span{font-size:12px;font-weight:650;color:var(--h307-muted)}
#horizon-sge-app .h307-stat strong{font-size:28px;line-height:1.2;color:#004A99}
#horizon-sge-app .h307-stat small{color:var(--h307-muted);font-size:11px}
#horizon-sge-app .h307-shell h3{font-size:16px;margin:25px 0 12px;color:var(--h307-ink)}
#horizon-sge-app .h307-empty,#horizon-sge-app .h307-loading{padding:20px;background:var(--h307-soft);border-radius:12px;color:var(--h307-muted);margin:10px 0}
#horizon-sge-app .h307-new{border:1px solid var(--h307-border);border-radius:13px;background:var(--h307-surface);margin-bottom:14px;overflow:hidden}
#horizon-sge-app .h307-new summary{padding:16px 18px;font-size:14px;font-weight:750;color:#004A99;cursor:pointer}
#horizon-sge-app .h307-new summary i{margin-right:8px}
#horizon-sge-app .h307-form{padding:3px 18px 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#horizon-sge-app .h307-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:var(--h307-ink)}
#horizon-sge-app .h307-form .h307-wide{grid-column:1/-1}
#horizon-sge-app .h307-form :is(input,select,textarea){width:100%;box-sizing:border-box;background:var(--h307-soft);color:var(--h307-ink);border:1px solid var(--h307-border);border-radius:9px;font:inherit;padding:11px;min-height:40px}
#horizon-sge-app .h307-form :is(input,select,textarea):focus-visible{outline:2px solid #1A75D3;outline-offset:2px}
#horizon-sge-app .h307-form .h307-primary{grid-column:1/-1;justify-self:start;padding:10px 17px;border:0;background:#004A99;color:white;font-weight:750;border-radius:9px;cursor:pointer}
#horizon-sge-app .h307-case,#horizon-sge-app .h307-task{padding:16px 18px;margin:10px 0;border:1px solid var(--h307-border);background:var(--h307-surface);border-radius:13px;box-shadow:0 2px 12px rgba(10,51,80,.035)}
#horizon-sge-app .h307-case-head{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:8px}
#horizon-sge-app .h307-case-head strong{font-size:14px;color:var(--h307-ink)}
#horizon-sge-app .h307-case p{font-size:12px;color:var(--h307-muted);margin:8px 0}
#horizon-sge-app .h307-pill{background:var(--h307-soft);color:#004A99;border:1px solid var(--h307-border);padding:5px 9px;font-size:11px;border-radius:30px;font-weight:750}
#horizon-sge-app .h307-meta,#horizon-sge-app .h307-hint{font-size:11px;color:var(--h307-muted)}
#horizon-sge-app .h307-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}
#horizon-sge-app .h307-actions button{padding:8px 10px;background:var(--h307-soft);border:1px solid var(--h307-border);border-radius:8px;color:#004A99;cursor:pointer;font-size:11px;font-weight:700}
#horizon-sge-app .h307-actions button:hover{background:#E3F0FF}
#horizon-sge-app .h307-task{display:flex;gap:10px;align-items:center;font-size:13px}
#horizon-sge-app .h307-task i{color:#1A75D3}
#horizon-sge-app .h307-task small{margin-left:auto;color:var(--h307-muted)}
#horizon-sge-app .h307-message,#horizon-sge-app .h307-inspector{padding:18px;border:1px solid var(--h307-border);background:var(--h307-surface);border-radius:13px;color:var(--h307-ink)}
#horizon-sge-app .h307-error{border-color:#D9534F}
#horizon-sge-app .h307-error button{margin-left:10px;color:#004A99;border:0;background:transparent;cursor:pointer}
#horizon-sge-app .h307-alert{padding:9px;border-radius:8px;border-left:3px solid #B56B18;background:var(--h307-soft);color:var(--h307-ink);margin:8px 0}
#horizon-sge-app .h307-ok{padding:9px;border-radius:8px;background:var(--h307-soft);color:var(--h307-ink)}
#horizon-sge-app .h307-check{font-size:11px;background:var(--h307-soft);border-radius:7px;padding:7px 9px;margin:9px 0;color:var(--h307-muted)}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h307-shell{--h307-border:#304A65;--h307-surface:#172B41;--h307-soft:#1B334E;--h307-ink:#ECF4FF;--h307-muted:#B2C6D9}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h307-stat strong{color:#8EC6FF}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h307-new summary,:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h307-pill,:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .h307-actions button{color:#ADD6FF}
@media(max-width:700px){#horizon-sge-app .h307-shell{padding:8px 2px 25px}#horizon-sge-app .h307-header{padding:18px;flex-direction:column;align-items:flex-start}#horizon-sge-app .h307-bar{align-items:stretch}#horizon-sge-app .h307-school{width:100%}#horizon-sge-app .h307-form{grid-template-columns:1fr}#horizon-sge-app .h307-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#horizon-sge-app .h307-tabs{overflow-x:auto;flex-wrap:nowrap;width:100%;padding-bottom:4px}#horizon-sge-app .h307-tabs button{white-space:nowrap}#horizon-sge-app .h307-stat{padding:13px}}
