/* HORIZON SGE 30.4 — Acesso & Serviços */
#horizon-sge-app .hsg304-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 28px;border-radius:20px;background:linear-gradient(135deg,#004A99,#1A75D3);color:#fff;margin-bottom:18px;overflow:hidden;position:relative}
#horizon-sge-app .hsg304-hero small{font-size:10px;font-weight:800;letter-spacing:.12em;opacity:.8}
#horizon-sge-app .hsg304-hero h2{margin:5px 0 6px;color:#fff;font-size:25px}
#horizon-sge-app .hsg304-hero p{margin:0;max-width:760px;color:rgba(255,255,255,.88);font-size:13px}
#horizon-sge-app .hsg304-hero-icon{width:76px;height:76px;border-radius:22px;background:rgba(255,255,255,.14);display:grid;place-items:center;font-size:31px;flex:0 0 76px}
#horizon-sge-app .hsg304-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}
#horizon-sge-app .hsg304-stats article{min-width:0;background:var(--ws-surface,#fff);border:1px solid var(--ws-border,#dce6f0);border-radius:16px;padding:15px;display:grid;grid-template-columns:38px 1fr;grid-template-areas:"i s" "i v";column-gap:10px;align-items:center}
#horizon-sge-app .hsg304-stats i{grid-area:i;width:38px;height:38px;border-radius:11px;background:#e9f3fd;color:#004A99;display:grid;place-items:center}
#horizon-sge-app .hsg304-stats span{grid-area:s;font-size:10px;color:var(--ws-muted,#64748b);font-weight:700;text-transform:uppercase}
#horizon-sge-app .hsg304-stats strong{grid-area:v;color:var(--ws-text,#172b46);font-size:22px;line-height:1.1}
#horizon-sge-app .hsg304-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.7fr);gap:16px;align-items:start}
#horizon-sge-app .hsg304-reader,#horizon-sge-app .hsg304-side section,#horizon-sge-app .hsg304-history,#horizon-sge-app .hsg304-config{background:var(--ws-surface,#fff);border:1px solid var(--ws-border,#dce6f0);border-radius:18px;padding:18px;box-shadow:0 10px 28px rgba(0,74,153,.05)}
#horizon-sge-app .hsg304-reader>header,#horizon-sge-app .hsg304-history>header,#horizon-sge-app .hsg304-config>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
#horizon-sge-app .hsg304-reader header small,#horizon-sge-app .hsg304-history header small,#horizon-sge-app .hsg304-config header small{font-size:9px;letter-spacing:.12em;color:#1A75D3;font-weight:800}
#horizon-sge-app .hsg304-reader h3,#horizon-sge-app .hsg304-history h3,#horizon-sge-app .hsg304-config h3,#horizon-sge-app .hsg304-side h3{margin:2px 0;color:var(--ws-text,#172b46)}
#horizon-sge-app .hsg304-live{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:800;color:#18794e;background:#e9f9f1;border-radius:999px;padding:7px 10px}
#horizon-sge-app .hsg304-live i{width:7px;height:7px;border-radius:50%;background:#22a06b;box-shadow:0 0 0 4px rgba(34,160,107,.12)}
#horizon-sge-app .hsg304-areas{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:14px}
#horizon-sge-app .hsg304-areas button{border:1px solid var(--ws-border,#dce6f0);background:var(--ws-surface-2,#f7fafd);border-radius:14px;min-height:72px;color:var(--ws-text,#172b46);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer;font-weight:700;font-size:11px}
#horizon-sge-app .hsg304-areas button i{font-size:18px;color:#1A75D3}
#horizon-sge-app .hsg304-areas button.is-active{background:#eaf4fe;border-color:#1A75D3;color:#004A99;box-shadow:inset 0 0 0 1px #1A75D3}
#horizon-sge-app .hsg304-areas button[disabled]{opacity:.35;cursor:not-allowed}
#horizon-sge-app .hsg304-event-fields{display:flex;gap:10px;margin-bottom:12px}
#horizon-sge-app .hsg304-event-fields label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700;color:var(--ws-muted,#64748b);min-width:190px}
#horizon-sge-app .hsg304-event-fields select{min-height:44px;border:1px solid var(--ws-border,#dce6f0);border-radius:11px;background:var(--ws-surface,#fff);color:var(--ws-text,#172b46);padding:0 12px}
#horizon-sge-app .hsg304-scan-input{display:block;font-size:11px;font-weight:700;color:var(--ws-muted,#64748b)}
#horizon-sge-app .hsg304-scan-input>div{display:grid;grid-template-columns:44px 1fr auto;align-items:center;margin-top:7px;border:2px solid #bfd7ef;border-radius:14px;background:var(--ws-surface,#fff);overflow:hidden;transition:.2s}
#horizon-sge-app .hsg304-scan-input>div:focus-within{border-color:#1A75D3;box-shadow:0 0 0 4px rgba(26,117,211,.1)}
#horizon-sge-app .hsg304-scan-input i{color:#1A75D3;text-align:center;font-size:17px}
#horizon-sge-app .hsg304-scan-input input{border:0!important;box-shadow:none!important;outline:0!important;min-height:50px;background:transparent!important;color:var(--ws-text,#172b46)!important;font-size:15px!important;padding:0 8px!important}
#horizon-sge-app .hsg304-scan-input button{align-self:stretch;border:0;background:#004A99;color:#fff;padding:0 18px;font-weight:800;cursor:pointer}
#horizon-sge-app .hsg304-reader-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
#horizon-sge-app .hsg304-camera{margin-top:14px;background:#071421;border-radius:16px;overflow:hidden;position:relative;min-height:260px}
#horizon-sge-app .hsg304-camera video{width:100%;height:320px;object-fit:cover;display:block}
#horizon-sge-app .hsg304-camera-frame{position:absolute;inset:50% auto auto 50%;width:min(62%,250px);aspect-ratio:1;transform:translate(-50%,-50%);border:3px solid #fff;border-radius:18px;box-shadow:0 0 0 999px rgba(0,0,0,.26)}
#horizon-sge-app .hsg304-camera>button{position:absolute;right:12px;bottom:12px;border:0;border-radius:10px;background:#fff;color:#172b46;padding:10px 13px;font-weight:800;cursor:pointer;z-index:3}
#horizon-sge-app .hsg304-result{margin-top:14px;border-radius:15px;padding:15px;min-height:76px;display:flex;gap:13px;align-items:center;background:var(--ws-surface-2,#f7fafd);border:1px dashed var(--ws-border,#dce6f0);color:var(--ws-text,#172b46)}
#horizon-sge-app .hsg304-result:empty:before{content:"A leitura validada aparecerá aqui.";color:var(--ws-muted,#64748b);font-size:12px}
#horizon-sge-app .hsg304-result.is-success{background:#eefbf5;border:1px solid #a9dec5}.hsg304-result.is-success .hsg304-result-icon{color:#158a5b}
#horizon-sge-app .hsg304-result.is-error{background:#fff3f2;border:1px solid #f0b8b3}.hsg304-result.is-error .hsg304-result-icon{color:#c53b31}
#horizon-sge-app .hsg304-result-icon{font-size:28px}.hsg304-result small{font-size:9px;font-weight:800;letter-spacing:.12em}.hsg304-result h3{margin:2px 0 3px;font-size:17px}.hsg304-result p{margin:0;font-size:11px;color:#64748b}.hsg304-result strong{display:block;margin-top:5px;font-size:11px}
#horizon-sge-app .hsg304-side{display:grid;gap:16px}
#horizon-sge-app .hsg304-side section header{margin-bottom:12px}.hsg304-side ol{padding-left:20px;margin:0;color:var(--ws-muted,#64748b);font-size:12px;line-height:1.8}
#horizon-sge-app .hsg304-meals{display:grid;grid-template-columns:1fr 1fr;gap:8px}.hsg304-meals span{background:var(--ws-surface-2,#f7fafd);border:1px solid var(--ws-border,#dce6f0);border-radius:12px;padding:11px;display:flex;justify-content:space-between;align-items:center}.hsg304-meals b{font-size:10px;color:var(--ws-muted,#64748b)}.hsg304-meals strong{font-size:18px;color:#004A99}
#horizon-sge-app .hsg304-history,#horizon-sge-app .hsg304-config{margin-top:16px}
#horizon-sge-app .hsg304-table{overflow:auto;border:1px solid var(--ws-border,#dce6f0);border-radius:14px}.hsg304-table table{width:100%;border-collapse:collapse;min-width:720px}.hsg304-table th,.hsg304-table td{padding:11px 12px;border-bottom:1px solid var(--ws-border,#dce6f0);text-align:left;font-size:11px;color:var(--ws-text,#172b46)}.hsg304-table th{background:var(--ws-surface-2,#f7fafd);color:var(--ws-muted,#64748b);font-size:9px;text-transform:uppercase;letter-spacing:.05em}.hsg304-table tr:last-child td{border-bottom:0}
#horizon-sge-app .hsg304-switches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:16px}.hsg304-switches label{display:flex;align-items:center;gap:9px;background:var(--ws-surface-2,#f7fafd);border:1px solid var(--ws-border,#dce6f0);border-radius:12px;padding:11px;color:var(--ws-text,#172b46);font-size:11px;font-weight:700}.hsg304-switches input{width:18px;height:18px}
#horizon-sge-app .hsg304-gate{display:grid;grid-template-columns:1.2fr .6fr auto;gap:10px;align-items:end;margin:12px 0 14px}.hsg304-gate>div{background:var(--ws-surface-2,#f7fafd);border:1px solid var(--ws-border,#dce6f0);border-radius:12px;padding:10px}.hsg304-gate span{display:block;font-size:9px;color:var(--ws-muted,#64748b);text-transform:uppercase}.hsg304-gate code{display:block;overflow:auto;font-size:10px;margin-top:5px;color:var(--ws-text,#172b46)}
#horizon-sge-app .hsg304-key-alert{background:#fff8e6;border:1px solid #ead49b;border-radius:12px;padding:12px;margin:10px 0 14px}.hsg304-key-alert strong{display:block;font-size:11px;color:#805a00}.hsg304-key-alert code{display:block;margin-top:8px;font-size:12px;overflow-wrap:anywhere}
#horizon-sge-app .hsg304-card-page{display:grid;grid-template-columns:minmax(0,580px) minmax(240px,1fr);gap:20px;align-items:start}.hsg304-idcard{background:#fff;border:1px solid #dce6f0;border-radius:22px;overflow:hidden;box-shadow:0 18px 50px rgba(0,74,153,.11)}.hsg304-idcard header{background:linear-gradient(135deg,#004A99,#1A75D3);color:#fff;padding:20px;display:flex;justify-content:space-between;align-items:center}.hsg304-idcard header small{display:block;font-size:10px;opacity:.8}.hsg304-idcard header strong{font-size:17px}.hsg304-idcard header i{font-size:25px}.hsg304-idbody{display:grid;grid-template-columns:105px 1fr 122px;gap:18px;align-items:center;padding:22px}.hsg304-idphoto{width:105px;height:135px;border-radius:16px;background:#edf4fb;border:1px solid #dce6f0;overflow:hidden;display:grid;place-items:center;font-size:26px;font-weight:800;color:#004A99}.hsg304-idphoto img{width:100%;height:100%;object-fit:cover}.hsg304-idbody h2{margin:0 0 8px;font-size:20px;color:#172b46}.hsg304-idbody p{margin:4px 0;color:#64748b;font-size:12px}.hsg304-idqr{background:#fff;padding:8px;border-radius:13px;border:1px solid #dce6f0}.hsg304-idqr img,.hsg304-idqr canvas{width:100%!important;height:auto!important}.hsg304-idcard footer{display:flex;justify-content:space-between;padding:13px 20px;background:#f4f8fc;color:#004A99;font-size:11px;font-weight:800}.hsg304-card-info{background:var(--ws-surface,#fff);border:1px solid var(--ws-border,#dce6f0);border-radius:18px;padding:20px}.hsg304-card-info h3{margin:0 0 8px}.hsg304-card-info p{font-size:12px;color:var(--ws-muted,#64748b);line-height:1.65}
#horizon-sge-app .hsg304-loading,#horizon-sge-app .hsg304-empty{min-height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--ws-surface,#fff);border:1px solid var(--ws-border,#dce6f0);border-radius:18px;color:var(--ws-muted,#64748b);text-align:center;padding:30px}.hsg304-empty i{font-size:30px;color:#1A75D3}.hsg304-empty strong{color:var(--ws-text,#172b46)}
:is(#horizon-sge-app.hsg-dark,#horizon-sge-app[data-hsg-theme="dark"]) .hsg304-areas button.is-active{background:#173552!important;color:#eef6ff!important}.hsg-dark .hsg304-result.is-success{background:#102e25!important;border-color:#275f4b!important}.hsg-dark .hsg304-result.is-error{background:#321d20!important;border-color:#6c343b!important}.hsg-dark .hsg304-idcard{background:#0f1c2d!important;border-color:#263a50!important}.hsg-dark .hsg304-idbody h2{color:#eef5fc!important}.hsg-dark .hsg304-idbody p{color:#9cb0c5!important}.hsg-dark .hsg304-idcard footer{background:#132238!important;color:#7fb9f2!important}
@media(max-width:1000px){#horizon-sge-app .hsg304-stats{grid-template-columns:repeat(3,1fr)}#horizon-sge-app .hsg304-layout,#horizon-sge-app .hsg304-card-page{grid-template-columns:1fr}}
@media(max-width:680px){#horizon-sge-app .hsg304-hero{padding:20px}.hsg304-hero-icon{display:none!important}#horizon-sge-app .hsg304-stats{grid-template-columns:repeat(2,1fr)}#horizon-sge-app .hsg304-areas{grid-template-columns:repeat(2,1fr)}#horizon-sge-app .hsg304-scan-input>div{grid-template-columns:40px 1fr}.hsg304-scan-input button{grid-column:1/-1;min-height:46px}.hsg304-switches{grid-template-columns:1fr!important}.hsg304-gate{grid-template-columns:1fr!important}.hsg304-idbody{grid-template-columns:82px 1fr}.hsg304-idphoto{width:82px;height:110px}.hsg304-idqr{grid-column:1/-1;width:130px;justify-self:center}.hsg304-reader-actions>*{width:100%}}
