/* Estilos do backoffice PGIP — extraídos do mockup aprovado */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --navy:#002347;--blue:#006cbb;--lb:#54c7f5;--red:#cd2315;
  --white:#fff;--bg:#f0f2f5;--text:#1a2b4a;
  --ok:#16a34a;--ok-bg:#dcfce7;--warn:#d97706;--warn-bg:#fef3c7;
  --err:#dc2626;--err-bg:#fee2e2;--info:#2563eb;--info-bg:#dbeafe;
  --sw:232px;
}
html,body{height:100%;font-family:'Segoe UI','Helvetica Neue',Arial,sans-serif;color:var(--text);background:var(--bg);font-size:13px}
.app{display:grid;grid-template-columns:var(--sw) 1fr;grid-template-rows:52px 1fr;height:100vh;overflow:hidden}

/* ── HEADER ── */
.hdr{grid-column:1/-1;background:var(--navy);display:flex;align-items:center;padding:0 18px;gap:14px;box-shadow:0 2px 10px rgba(0,0,0,.35);z-index:100}
.hdr-logo{display:flex;align-items:center;gap:10px;flex-shrink:0;text-decoration:none}
.hdr-logo svg{height:26px;width:auto}
.hdr-sep{height:28px;width:1px;background:rgba(255,255,255,.15);margin:0 4px}
.hdr-title{font-size:12px;font-weight:700;color:rgba(255,255,255,.7);letter-spacing:.5px;text-transform:uppercase}
.hdr-sub{font-size:10px;color:rgba(255,255,255,.38);letter-spacing:.3px}
.hdr-sp{flex:1}
.sys-pill{display:flex;align-items:center;gap:6px;background:rgba(22,163,74,.15);border:1px solid rgba(22,163,74,.3);border-radius:20px;padding:4px 12px;color:#4ade80;font-size:11px;font-weight:600}
.sys-pill .dot{width:6px;height:6px;border-radius:50%;background:#4ade80;animation:blink 2s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.3}}
.hdr-time{font-size:11px;color:rgba(255,255,255,.45);font-variant-numeric:tabular-nums}
.hdr-user{display:flex;align-items:center;gap:8px;color:rgba(255,255,255,.75);font-size:12px;cursor:pointer;padding:4px 10px;border-radius:6px;transition:background .15s;margin-left:8px}
.hdr-user:hover{background:rgba(255,255,255,.1)}
.avatar{width:28px;height:28px;border-radius:50%;background:var(--blue);display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;font-weight:700;flex-shrink:0}

/* ── SIDEBAR ── */
.sb{background:#001830;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.1) transparent}
.sb-grp{color:rgba(255,255,255,.28);font-size:9.5px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;padding:14px 14px 5px}
.sb-item{display:flex;align-items:center;gap:9px;padding:8px 14px;color:rgba(255,255,255,.58);cursor:pointer;transition:all .15s;border-left:3px solid transparent;font-size:12.5px;user-select:none}
.sb-item:hover{color:#fff;background:rgba(255,255,255,.06)}
.sb-item.active{color:#fff;background:rgba(0,108,187,.22);border-left-color:var(--lb)}
.sb-item .ico{width:16px;height:16px;display:flex;align-items:center;justify-content:center;flex-shrink:0;opacity:.7}
.sb-item.active .ico,.sb-item:hover .ico{opacity:1}
.sb-item .ico svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
/* ── CHART TOOLTIP ── */
.chart-tt{position:fixed;background:#1e293b;color:#fff;padding:8px 12px;border-radius:7px;font-size:11.5px;pointer-events:none;white-space:nowrap;box-shadow:0 4px 16px rgba(0,0,0,.25);display:none;z-index:9999;border-left:3px solid var(--blue)}
.chart-tt .tt-date{color:#94a3b8;font-size:10.5px;margin-bottom:2px}
.chart-tt .tt-val{font-weight:700;font-size:13px}
.sb-badge{margin-left:auto;background:var(--red);color:#fff;font-size:9px;font-weight:700;padding:1px 5px;border-radius:10px;min-width:16px;text-align:center}

/* ── MAIN ── */
.main{overflow-y:auto;padding:22px 24px;background:var(--bg)}
.sec{display:none}
.sec.active{display:block}
.pg-hdr{margin-bottom:18px}
.pg-hdr h1{font-size:19px;font-weight:800;color:var(--navy)}
.pg-hdr p{color:#64748b;font-size:12.5px;margin-top:3px}
.ph-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}

/* ── CARDS ── */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.stat{background:#fff;border-radius:10px;padding:16px 18px;box-shadow:0 1px 4px rgba(0,0,0,.06);border:1px solid rgba(0,0,0,.06)}
.stat-lbl{font-size:10.5px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}
.stat-val{font-size:26px;font-weight:800;color:var(--navy);line-height:1}
.stat-sub{font-size:11px;color:#94a3b8;margin-top:5px}
.stat-chg{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;font-weight:600;padding:2px 7px;border-radius:20px;margin-top:6px}
.chg-up{background:#dcfce7;color:var(--ok)}
.chg-dn{background:#fee2e2;color:var(--err)}
.chg-ne{background:#f1f5f9;color:#64748b}

/* ── CARD ── */
.card{background:#fff;border-radius:10px;padding:18px;box-shadow:0 1px 4px rgba(0,0,0,.06);border:1px solid rgba(0,0,0,.06);margin-bottom:18px}
.card-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:10px}
.card-title{font-size:13.5px;font-weight:700;color:var(--navy)}
.card-sub{font-size:11px;color:#94a3b8;margin-top:2px}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.g3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px;margin-bottom:18px}
.g-r2{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;margin-bottom:18px}
.g-r3{display:grid;grid-template-columns:2fr 1fr;gap:18px;margin-bottom:18px}
.span2{grid-column:span 2}

/* ── BADGE ── */
.bdg{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:600}
.bdg.ok{background:var(--ok-bg);color:var(--ok)}
.bdg.warn{background:var(--warn-bg);color:var(--warn)}
.bdg.err{background:var(--err-bg);color:var(--err)}
.bdg.info{background:var(--info-bg);color:var(--info)}
.bdg.gray{background:#f1f5f9;color:#64748b}

/* ── TABLE ── */
.tbl{width:100%;border-collapse:collapse}
.tbl th{text-align:left;font-size:10.5px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.5px;padding:8px 10px;border-bottom:2px solid #f1f5f9;white-space:nowrap;background:#fafafa}
.tbl td{padding:8px 10px;font-size:12.5px;border-bottom:1px solid #f8fafc;vertical-align:middle}
.tbl tr:hover td{background:#f8fafc}
.tbl tr:last-child td{border-bottom:none}

/* ── BTN ── */
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:6px;font-size:12.5px;font-weight:600;cursor:pointer;border:none;transition:all .15s;text-decoration:none;white-space:nowrap}
.btn-p{background:var(--blue);color:#fff}
.btn-p:hover{background:#005a9e}
.btn-s{background:#f1f5f9;color:var(--text)}
.btn-s:hover{background:#e2e8f0}
.btn-d{background:var(--red);color:#fff}
.btn-d:hover{background:#b91c1c}
.btn-g{background:#16a34a;color:#fff}
.btn-g:hover{background:#15803d}
.btn-sm{padding:4px 10px;font-size:11.5px}
.btn-ico{padding:5px 7px;background:#f1f5f9;color:#64748b;border-radius:5px;cursor:pointer;border:none;font-size:13px;transition:all .15s}
.btn-ico:hover{background:#e2e8f0;color:var(--navy)}
.btn-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* ── FILTERS ── */
.flt-bar{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap;align-items:center}
.flt-sel,.flt-inp{padding:6px 10px;border:1px solid #e2e8f0;border-radius:6px;font-size:12.5px;color:var(--text);background:#fff;outline:none}
.flt-sel:focus,.flt-inp:focus{border-color:var(--blue);box-shadow:0 0 0 2px rgba(0,108,187,.15)}
.flt-inp{min-width:200px}

/* ── PROGRESS ── */
.prog{height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden}
.prog-f{height:100%;border-radius:3px;transition:width .6s}
.pf-bl{background:var(--blue)}
.pf-ok{background:var(--ok)}
.pf-wn{background:var(--warn)}
.pf-er{background:var(--err)}
.pf-lb{background:var(--lb)}

/* ── SERVICE ROW ── */
.svc-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #f1f5f9}
.svc-row:last-child{border-bottom:none}
.svc-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.svc-dot.ok{background:var(--ok)}
.svc-dot.warn{background:var(--warn)}
.svc-dot.err{background:var(--err)}
.svc-dot.off{background:#cbd5e1}
.svc-name{flex:1;font-size:12.5px;font-weight:500}
.svc-type{font-size:10.5px;color:#94a3b8}
.svc-up{font-size:11.5px;color:#64748b;font-weight:600;width:50px;text-align:right}
.svc-rt{font-size:11px;color:#94a3b8;width:60px;text-align:right}

/* ── RESOURCE BAR ── */
.res-item{margin-bottom:14px}
.res-lbl{display:flex;justify-content:space-between;margin-bottom:5px;font-size:12px}
.res-lbl span:last-child{font-weight:700}

/* ── FORM ── */
.form-g{margin-bottom:14px}
.form-lbl{display:block;font-size:11px;font-weight:700;color:#374151;margin-bottom:5px;text-transform:uppercase;letter-spacing:.3px}
.form-ctrl{width:100%;padding:8px 11px;border:1px solid #e2e8f0;border-radius:6px;font-size:12.5px;color:var(--text);background:#fff;outline:none;transition:border-color .15s}
.form-ctrl:focus{border-color:var(--blue);box-shadow:0 0 0 2px rgba(0,108,187,.12)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-chk{display:flex;align-items:center;gap:8px;margin-bottom:8px;cursor:pointer}
.form-chk input{width:14px;height:14px;cursor:pointer;accent-color:var(--blue)}
.form-chk label{font-size:12.5px;cursor:pointer}
.form-sep{border:none;border-top:1px solid #f1f5f9;margin:16px 0}
.form-section-title{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#64748b;margin:16px 0 10px}
.rtype-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:4px}
.rtype-card{border:2px solid #e2e8f0;border-radius:8px;padding:12px;cursor:pointer;transition:all .15s}
.rtype-card:hover{border-color:var(--blue);background:#f0f7ff}
.rtype-card.sel{border-color:var(--blue);background:#eff6ff}
.rtype-card .rt-ico{font-size:20px;margin-bottom:5px;display:flex;align-items:center;justify-content:center;color:var(--blue)}
.rtype-card .rt-ico svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.rtype-card .rt-name{font-size:12px;font-weight:700;color:var(--navy)}
.rtype-card .rt-desc{font-size:10.5px;color:#64748b;margin-top:2px}

/* ── REPORT PREVIEW ── */
.rpt-prev{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:14px;min-height:320px}
.rpt-prev-hdr{display:flex;align-items:center;gap:10px;padding-bottom:10px;border-bottom:2px solid #006cbb;margin-bottom:12px}
.rpt-prev-hdr svg{height:24px;width:auto}
.rpt-prev-title{font-size:12.5px;font-weight:700;color:var(--navy)}
.rpt-prev-date{font-size:10.5px;color:#94a3b8}
.rpt-sec-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#64748b;margin:12px 0 6px;border-bottom:1px solid #e2e8f0;padding-bottom:4px}
.rpt-row{display:flex;justify-content:space-between;padding:4px 0;font-size:11.5px;border-bottom:1px dotted #e2e8f0}
.rpt-row:last-child{border-bottom:none}
.rpt-row .lbl{color:#64748b}
.rpt-row .val{font-weight:700;color:var(--navy)}
.rpt-chart-placeholder{background:#e2e8f0;border-radius:4px;height:60px;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:11px;margin:8px 0}
.rpt-items{margin-bottom:18px}
.rpt-item{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #f1f5f9}
.rpt-item:last-child{border-bottom:none}
.rpt-item-ico{width:34px;height:34px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0}
.rpt-item-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.ico-pdf{background:#fee2e2}
.ico-xlsx{background:#dcfce7}
.ico-csv{background:#dbeafe}
.rpt-item-info{flex:1;min-width:0}
.rpt-item-name{font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rpt-item-meta{font-size:11px;color:#94a3b8;margin-top:2px}
.rpt-item-sz{font-size:11.5px;color:#64748b;font-weight:600;white-space:nowrap}

/* ── USERS ── */
.u-av{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:700;color:#fff;flex-shrink:0}
.perm-tbl{width:100%;border-collapse:collapse}
.perm-tbl th{font-size:10.5px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.4px;padding:8px;text-align:center;border-bottom:2px solid #f1f5f9}
.perm-tbl th:first-child{text-align:left}
.perm-tbl td{padding:8px;border-bottom:1px solid #f8fafc;text-align:center;font-size:12.5px}
.perm-tbl td:first-child{text-align:left;font-weight:600}
.perm-tbl tr:last-child td{border-bottom:none}
.p-ok{color:var(--ok);font-size:15px}
.p-no{color:#cbd5e1;font-size:15px}

/* ── NOTIFICATIONS ── */
.notif-rule{display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid #f1f5f9}
.notif-rule:last-child{border-bottom:none}
.nr-ico{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.nr-ico svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.nr-info{flex:1}
.nr-name{font-size:13px;font-weight:600}
.nr-desc{font-size:11.5px;color:#64748b;margin-top:2px}
.nr-sev{font-size:11px;font-weight:600;white-space:nowrap}
.toggle{position:relative;width:38px;height:21px;flex-shrink:0}
.toggle input{display:none}
.tgl-sl{position:absolute;inset:0;background:#cbd5e1;border-radius:11px;cursor:pointer;transition:background .2s}
.tgl-sl::before{content:'';position:absolute;width:15px;height:15px;border-radius:50%;background:#fff;top:3px;left:3px;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.toggle input:checked+.tgl-sl{background:var(--blue)}
.toggle input:checked+.tgl-sl::before{transform:translateX(17px)}

/* ── TIMELINE ── */
.tl-item{display:flex;gap:10px;padding-bottom:14px;position:relative}
.tl-item::before{content:'';position:absolute;left:14px;top:22px;bottom:0;width:1px;background:#e2e8f0}
.tl-item:last-child::before{display:none}
.tl-dot{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;z-index:1}
.tl-dot svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.tl-dot.ok{background:var(--ok-bg);color:var(--ok)}
.tl-dot.warn{background:var(--warn-bg);color:var(--warn)}
.tl-dot.err{background:var(--err-bg);color:var(--err)}
.tl-dot.info{background:var(--info-bg);color:var(--info)}
.tl-c{flex:1;padding-top:3px}
.tl-title{font-size:12.5px;font-weight:600}
.tl-meta{font-size:11px;color:#94a3b8;margin-top:2px}

/* ── MODAL ── */
.modal-ov{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center;z-index:1000}
.modal-ov.open{display:flex}
.modal{background:#fff;border-radius:12px;padding:24px;width:640px;max-width:95vw;max-height:85vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.modal-title{font-size:16px;font-weight:700;color:var(--navy)}
.modal-close{width:28px;height:28px;border-radius:50%;background:#f1f5f9;border:none;cursor:pointer;font-size:16px;color:#64748b;display:flex;align-items:center;justify-content:center}
.modal-close:hover{background:#e2e8f0}

/* ── TOAST ── */
.toast-ct{position:fixed;bottom:22px;right:22px;display:flex;flex-direction:column;gap:8px;z-index:2000}
.toast{background:#1e293b;color:#fff;padding:11px 15px;border-radius:8px;font-size:12.5px;display:flex;align-items:center;gap:8px;box-shadow:0 4px 16px rgba(0,0,0,.2);animation:tSlide .3s ease;max-width:300px}
.toast-ico{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.btn-svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;margin-right:4px;flex-shrink:0}
.step-ico{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.toast.t-ok{border-left:3px solid var(--ok)}
.toast.t-err{border-left:3px solid var(--err)}
.toast.t-warn{border-left:3px solid var(--warn)}
@keyframes tSlide{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}

/* ── MISC ── */
.divider{border:none;border-top:1px solid #f1f5f9;margin:16px 0}
.text-sm{font-size:11.5px;color:#64748b}
.text-muted{color:#94a3b8;font-size:11.5px}
.fw{font-weight:700}
.mt-sm{margin-top:8px}
.mt-md{margin-top:16px}
.mb-sm{margin-bottom:8px}
.mb-md{margin-bottom:16px}
.flex-center{display:flex;align-items:center;gap:8px}
.dot-live{width:8px;height:8px;border-radius:50%;background:var(--ok);animation:blink 1.5s infinite;flex-shrink:0}
.pg-info-bar{background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:10px 14px;margin-bottom:18px;font-size:12.5px;color:#1e40af;display:flex;align-items:center;gap:8px}

/* highlight row */
.row-err td{background:#fff5f5!important}
.row-warn td{background:#fffbeb!important}

/* section 18 highlight tag */

::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}


/* ══════════════════════════════════════════════════════════
   PoC INTERACTIVO — autenticação, auditoria, permissões
   ══════════════════════════════════════════════════════════ */
.app.locked{display:none!important}

/* ── LOGIN ── */
.lg-wrap{position:fixed;inset:0;z-index:5000;display:grid;grid-template-columns:1.05fr .95fr;background:var(--bg)}
.lg-wrap.hidden{display:none}
.lg-left{background:linear-gradient(150deg,#001830 0%,#002347 45%,#013a6b 100%);position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;padding:42px 46px;color:#fff}
.lg-left::after{content:"";position:absolute;right:-120px;bottom:-140px;width:460px;height:460px;border-radius:50%;background:radial-gradient(circle,rgba(84,199,245,.22),transparent 65%)}
.lg-left::before{content:"";position:absolute;left:-80px;top:-100px;width:320px;height:320px;border-radius:50%;background:radial-gradient(circle,rgba(0,108,187,.3),transparent 68%)}
.lg-brand{display:flex;align-items:center;gap:14px;position:relative;z-index:2}
.lg-brand svg{height:30px;width:auto}
.lg-brand-sep{width:1px;height:30px;background:rgba(255,255,255,.2)}
.lg-brand-txt{font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:rgba(255,255,255,.6);font-weight:700;line-height:1.5}
.lg-hero{position:relative;z-index:2;max-width:430px}
.lg-hero h1{font-size:30px;font-weight:800;line-height:1.18;letter-spacing:-.4px}
.lg-hero p{margin-top:14px;font-size:13.5px;line-height:1.65;color:rgba(255,255,255,.62)}
.lg-foot{position:relative;z-index:2;font-size:10.5px;color:rgba(255,255,255,.35);line-height:1.7}
.lg-right{display:flex;align-items:center;justify-content:center;padding:34px;overflow-y:auto}
.lg-card{width:100%;max-width:412px}
.lg-h{margin-bottom:20px}
.lg-h h2{font-size:21px;font-weight:800;color:var(--navy)}
.lg-h p{font-size:12.5px;color:#64748b;margin-top:5px}
.lg-tabs{display:flex;gap:6px;background:#eef2f7;padding:4px;border-radius:9px;margin-bottom:20px}
.lg-tab{flex:1;text-align:center;padding:8px 10px;border-radius:6px;font-size:12px;font-weight:600;color:#64748b;cursor:pointer;transition:all .15s;border:none;background:transparent;display:flex;align-items:center;justify-content:center;gap:6px}
.lg-tab svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lg-tab.on{background:#fff;color:var(--navy);box-shadow:0 1px 3px rgba(0,0,0,.1)}
.lg-pane{display:none}
.lg-pane.on{display:block}
.lg-fg{margin-bottom:14px}
.lg-lbl{display:block;font-size:11px;font-weight:700;color:#374151;margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px}
.lg-inp{width:100%;padding:11px 13px;border:1px solid #dbe2ea;border-radius:8px;font-size:13.5px;color:var(--text);background:#fff;outline:none;transition:all .15s;font-family:inherit}
.lg-inp:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(0,108,187,.13)}
.lg-inp.bad{border-color:var(--err);box-shadow:0 0 0 3px rgba(220,38,38,.1)}
.lg-inp:disabled{background:#f8fafc;color:#94a3b8}
.lg-pwd-wrap{position:relative}
.lg-pwd-eye{position:absolute;right:9px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:#94a3b8;padding:4px;display:flex}
.lg-pwd-eye svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lg-btn{width:100%;padding:12px;border-radius:8px;border:none;background:var(--blue);color:#fff;font-size:13.5px;font-weight:700;cursor:pointer;transition:all .15s;display:flex;align-items:center;justify-content:center;gap:8px;font-family:inherit}
.lg-btn:hover{background:#005a9e}
.lg-btn:disabled{background:#94a3b8;cursor:not-allowed}
.lg-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lg-btn-gov{background:var(--navy)}
.lg-btn-gov:hover{background:#00346a}
.lg-row{display:flex;align-items:center;justify-content:space-between;margin:14px 0 18px;font-size:12px}
.lg-chk{display:flex;align-items:center;gap:7px;cursor:pointer;color:#475569}
.lg-chk input{width:14px;height:14px;accent-color:var(--blue);cursor:pointer}
.lg-link{color:var(--blue);text-decoration:none;font-weight:600;cursor:pointer}
.lg-link:hover{text-decoration:underline}
.lg-alert{display:none;gap:9px;padding:11px 13px;border-radius:8px;font-size:12.5px;margin-bottom:16px;line-height:1.5;align-items:flex-start}
.lg-alert.show{display:flex}
.lg-alert svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;margin-top:1px}
.lg-alert.err{background:var(--err-bg);color:#991b1b;border:1px solid #fecaca}
.lg-alert.warn{background:var(--warn-bg);color:#92400e;border:1px solid #fde68a}
.lg-alert.info{background:var(--info-bg);color:#1e40af;border:1px solid #bfdbfe}
.lg-alert.ok{background:var(--ok-bg);color:#166534;border:1px solid #bbf7d0}
.lg-sep{display:flex;align-items:center;gap:12px;margin:18px 0;color:#cbd5e1;font-size:11px;text-transform:uppercase;letter-spacing:.6px}
.lg-sep::before,.lg-sep::after{content:"";flex:1;height:1px;background:#e2e8f0}
.lg-meta{text-align:center;font-size:10.5px;color:#94a3b8;margin-top:20px;line-height:1.7}

/* MFA / OTP */
.otp-row{display:flex;gap:8px;justify-content:space-between;margin-bottom:6px;position:relative}
.otp-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;border:0;padding:0;margin:0;background:transparent;color:transparent;z-index:3;cursor:text;font-size:16px;outline:none}
.otp-d{flex:1;aspect-ratio:1/1.15;display:flex;align-items:center;justify-content:center;font-size:21px;font-weight:700;color:var(--navy);border:1.5px solid #dbe2ea;border-radius:9px;font-family:inherit;transition:all .15s;background:#fff;user-select:none}
.otp-d.cur{border-color:var(--blue);box-shadow:0 0 0 3px rgba(0,108,187,.13)}
.otp-d.cur::after{content:"";width:1.5px;height:21px;background:var(--blue);animation:cb 1.05s step-end infinite}
@keyframes cb{0%,100%{opacity:1}50%{opacity:0}}
.otp-row.bad .otp-d{border-color:var(--err)}
.otp-row.bad{animation:shk .35s}
@keyframes shk{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.otp-ctx{background:#f8fafc;border:1px solid #e9eef4;border-radius:9px;padding:13px 15px;margin-bottom:18px;display:flex;gap:11px;align-items:center}
.otp-ctx .av{width:36px;height:36px;border-radius:50%;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12.5px;flex-shrink:0}
.otp-ctx .nm{font-size:12.5px;font-weight:700;color:var(--navy)}
.otp-ctx .em{font-size:11px;color:#94a3b8}
.lg-back{background:none;border:none;color:#64748b;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;gap:5px;padding:4px 0;font-family:inherit;margin-top:14px}
.lg-back:hover{color:var(--navy)}
.lg-back svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* credenciais de demonstração */
.demo-box{margin-top:22px;border:1px dashed #cbd5e1;border-radius:9px;background:#fbfcfe;overflow:hidden}
.demo-hd{display:flex;align-items:center;gap:8px;padding:9px 13px;cursor:pointer;font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.5px;user-select:none}
.demo-hd svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.demo-hd .chev{margin-left:auto;transition:transform .2s}
.demo-box.open .chev{transform:rotate(180deg)}
.demo-bd{display:none;padding:0 13px 13px}
.demo-box.open .demo-bd{display:block}
.demo-u{display:flex;align-items:center;gap:9px;padding:7px 8px;border-radius:7px;cursor:pointer;transition:background .13s}
.demo-u:hover{background:#eef5fc}
.demo-u .du-av{width:26px;height:26px;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;flex-shrink:0}
.demo-u .du-n{font-size:12px;font-weight:600;color:var(--navy)}
.demo-u .du-r{font-size:10.5px;color:#94a3b8}
.demo-u .du-go{margin-left:auto;font-size:10.5px;color:var(--blue);font-weight:700;opacity:0;transition:opacity .13s}
.demo-u:hover .du-go{opacity:1}
.demo-note{font-size:10.5px;color:#94a3b8;padding:8px 8px 2px;line-height:1.6;border-top:1px dashed #e2e8f0;margin-top:6px}
.demo-note code{background:#eef2f7;padding:1px 5px;border-radius:4px;font-size:10.5px;color:var(--navy);font-weight:700}

/* ── HEADER do PoC ── */
.hdr-sess{display:flex;align-items:center;gap:6px;font-size:11px;color:rgba(255,255,255,.45);background:rgba(255,255,255,.07);padding:4px 10px;border-radius:20px;font-variant-numeric:tabular-nums}
.hdr-sess svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hdr-sess.low{color:#fca5a5;background:rgba(220,38,38,.18)}
.hdr-btn{background:rgba(255,255,255,.08);border:none;color:rgba(255,255,255,.72);font-size:11.5px;font-weight:600;padding:6px 11px;border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-family:inherit;transition:all .15s}
.hdr-btn:hover{background:rgba(255,255,255,.17);color:#fff}
.hdr-btn svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ── PERMISSÕES / GATING ── */
.sb-item.denied{display:none}
.sb-item.locked{opacity:.34;cursor:not-allowed}
.sb-item.locked:hover{background:transparent;color:rgba(255,255,255,.58)}
.deny-card{background:#fff;border-radius:10px;border:1px solid #fecaca;padding:34px;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.deny-card .dc-ico{width:52px;height:52px;border-radius:50%;background:var(--err-bg);display:flex;align-items:center;justify-content:center;margin:0 auto 14px}
.deny-card .dc-ico svg{width:24px;height:24px;fill:none;stroke:var(--err);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.deny-card h2{font-size:16px;color:var(--navy);font-weight:800}
.deny-card p{font-size:12.5px;color:#64748b;margin-top:7px;line-height:1.6;max-width:430px;margin-left:auto;margin-right:auto}
.deny-card .dc-ref{margin-top:14px;font-size:11px;color:#94a3b8;font-family:ui-monospace,Consolas,monospace;background:#f8fafc;display:inline-block;padding:6px 11px;border-radius:6px;border:1px solid #f1f5f9}

/* matriz de permissões editável */
.perm-tbl td.pc{cursor:pointer;user-select:none;transition:background .12s}
.perm-tbl td.pc:hover{background:#eef5fc}
.perm-sw{width:30px;height:17px;border-radius:20px;background:#e2e8f0;position:relative;display:inline-block;transition:background .18s;vertical-align:middle}
.perm-sw::after{content:"";position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:#fff;transition:transform .18s;box-shadow:0 1px 2px rgba(0,0,0,.25)}
.perm-sw.on{background:var(--ok)}
.perm-sw.on::after{transform:translateX(13px)}
.perm-sw.dirty{box-shadow:0 0 0 2px rgba(217,119,6,.45)}
.perm-tbl tr.prow-hl td{background:#fffbeb!important}
.perm-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:10.5px;color:#94a3b8;margin-top:10px;align-items:center}
.pend-pill{background:var(--warn-bg);color:var(--warn);font-size:10.5px;font-weight:700;padding:2px 9px;border-radius:20px}

/* ── AUDITORIA ── */
.chain-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#f8fafc;border:1px solid #e9eef4;border-radius:9px;padding:11px 14px;margin-bottom:14px}
.chain-st{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700}
.chain-st svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.chain-st.ok{color:var(--ok)}
.chain-st.bad{color:var(--err)}
.chain-hash{font-family:ui-monospace,Consolas,monospace;font-size:10.5px;color:#64748b;background:#fff;border:1px solid #e2e8f0;padding:3px 8px;border-radius:5px}
.aud-new td{animation:audIn .9s ease}
@keyframes audIn{0%{background:#dbeafe}100%{background:transparent}}
.aud-hash{font-family:ui-monospace,Consolas,monospace;font-size:10px;color:#94a3b8}
.aud-live{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--ok);font-weight:700}


/* ── MODAL extra ── */
.m-sm{width:470px}
.m-lg{width:760px}
.mfield{margin-bottom:13px}
.mfield label{display:block;font-size:11px;font-weight:700;color:#374151;margin-bottom:5px;text-transform:uppercase;letter-spacing:.3px}
.diff-box{background:#f8fafc;border:1px solid #e9eef4;border-radius:8px;padding:11px 13px;font-size:12px;line-height:1.8}
.diff-box .d-from{color:var(--err);text-decoration:line-through}
.diff-box .d-to{color:var(--ok);font-weight:700}
.fmt-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.fmt-card{border:2px solid #e2e8f0;border-radius:9px;padding:11px 8px;cursor:pointer;text-align:center;transition:all .15s}
.fmt-card:hover{border-color:var(--blue);background:#f4f9ff}
.fmt-card.sel{border-color:var(--blue);background:#eff6ff}
.fmt-card .fc-i{width:30px;height:30px;border-radius:7px;display:flex;align-items:center;justify-content:center;margin:0 auto 6px}
.fmt-card .fc-i svg{width:16px;height:16px;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fmt-card .fc-n{font-size:11.5px;font-weight:800;color:var(--navy)}
.fmt-card .fc-d{font-size:9.5px;color:#94a3b8;margin-top:1px}
.dl-flash{animation:dlf 1.1s ease}
@keyframes dlf{0%{background:#dcfce7}100%{background:transparent}}
.poc-tag{background:#7c3aed;color:#fff;font-size:9px;font-weight:800;padding:2px 7px;border-radius:20px;letter-spacing:.6px}
.kpi-live{font-variant-numeric:tabular-nums}
@media(max-width:1000px){.lg-wrap{grid-template-columns:1fr}.lg-left{display:none}}

.rtype-card.locked{opacity:.5;cursor:not-allowed;border-style:dashed;background:#fafbfc}
.rtype-card.locked:hover{border-color:#e2e8f0;background:#fafbfc}
.rtype-card.locked .rt-ico{color:#94a3b8}

/* ── cabeçalho: nunca quebrar o bloco do utilizador ── */
.hdr-title,.hdr-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}
#hdr-right{flex-shrink:0}
#hdr-right .hdr-user>div{min-width:0}
#hdr-right .hdr-user>div>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px}
@media(max-width:1280px){.hdr-sess{display:none}.hdr-btn span.lbl{display:none}}
@media(max-width:1080px){#hdr-right .hdr-user>div>div:last-child{display:none}.hdr-sub{display:none}}

/* ── logótipo oficial da APL (nítido, sem opacidade) ── */
.hdr-logo img{height:30px;width:auto;display:block;opacity:1}
.hdr-logo{opacity:1}
.lg-brand img{height:36px;width:auto;display:block}

/* ── organizações e rastreabilidade ao caderno de encargos ── */
.org-chip{display:inline-block;font-size:9.5px;font-weight:800;letter-spacing:.4px;padding:1px 7px;border-radius:20px;
  background:color-mix(in srgb,var(--oc) 14%,transparent);color:var(--oc);border:1px solid color-mix(in srgb,var(--oc) 30%,transparent);vertical-align:middle}
.req-chip{display:inline-block;font-size:9.5px;font-weight:700;font-family:ui-monospace,Consolas,monospace;
  padding:1px 6px;border-radius:4px;background:#eef2f7;color:#475569;white-space:nowrap}
.du-req{font-size:10px;color:#94a3b8;margin-top:2px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.perm-tbl th:nth-child(2),.perm-tbl td:nth-child(2){text-align:left}

/* ── escolha de organização na criação de contas ── */
.org-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.org-card{border:2px solid #e2e8f0;border-radius:9px;padding:10px;cursor:pointer;transition:all .15s;position:relative;overflow:hidden}
.org-card:hover{border-color:var(--blue);background:#f6fafe}
.org-card.sel{border-color:var(--blue);background:#eff6ff}
.org-bar{position:absolute;left:0;top:0;bottom:0;width:3px}
.org-n{font-size:11.5px;font-weight:800;color:var(--navy);padding-left:6px}
.org-d{font-size:10.5px;color:var(--blue);font-family:ui-monospace,Consolas,monospace;padding-left:6px;margin-top:1px}
.org-p{font-size:9.5px;color:#94a3b8;line-height:1.45;margin-top:5px;padding-left:6px}
.dom-tag{display:flex;align-items:center;padding:0 10px;background:#eef2f7;border:1px solid #e2e8f0;border-left:none;
  border-radius:0 6px 6px 0;font-size:12px;color:#475569;font-family:ui-monospace,Consolas,monospace;white-space:nowrap}

/* ── verificação de serviços ── */
.spin{display:inline-block;width:9px;height:9px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rodar .7s linear infinite;vertical-align:-1px;margin-right:5px}
@keyframes rodar{to{transform:rotate(360deg)}}
.svc-flash td{animation:svcOk 1.4s ease}
@keyframes svcOk{0%{background:#dcfce7}100%{background:transparent}}
