:root{
  --navy:#07182f;
  --navy2:#0c2b55;
  --blue:#1f5fbf;
  --blue-soft:#eaf2ff;
  --gold:#f5c84b;
  --gold2:#ffda6f;
  --bg:#f4f7fb;
  --card:#ffffff;
  --text:#0d1f36;
  --muted:#6d7d92;
  --line:#e1e8f0;
  --green:#12a66a;
  --greenbg:#ecfbf5;
  --red:#c63a31;
  --redbg:#fff1f0;
  --shadow:0 18px 45px rgba(7,24,47,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text);background:var(--bg)}
button,input,textarea{font:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
.sgo2-body{min-height:100vh}
.sgo2-container{width:min(1280px,calc(100% - 40px));margin:0 auto}
.sgo2-brand{display:flex;align-items:center;gap:12px;min-width:0}
.sgo2-mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,var(--gold2),var(--gold));color:var(--navy);display:grid;place-items:center;font-weight:1000;box-shadow:0 10px 22px rgba(245,200,75,.25)}
.sgo2-brand strong{display:block;font-size:14px;letter-spacing:.06em}
.sgo2-brand span{display:block;margin-top:2px;font-size:12px;color:var(--muted)}
.sgo2-eyebrow,.sgo2-card-label{font-size:11px;letter-spacing:.16em;text-transform:uppercase;font-weight:900;color:var(--blue)}
.sgo2-muted{color:var(--muted)}
.sgo2-btn{border:0;border-radius:13px;padding:13px 18px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;min-height:48px;transition:.18s ease;text-decoration:none}
.sgo2-btn:hover{transform:translateY(-1px)}
.sgo2-btn-primary{background:linear-gradient(180deg,#276bd0,#1f5fbf);color:#fff;box-shadow:0 12px 24px rgba(31,95,191,.18)}
.sgo2-btn-dark{background:var(--navy);color:#fff}
.sgo2-btn-gold{background:linear-gradient(180deg,var(--gold2),var(--gold));color:var(--navy);box-shadow:0 12px 26px rgba(245,200,75,.22)}
.sgo2-btn-light{background:#eef3f9;color:var(--navy)}
.sgo2-btn-full{width:100%}
.sgo2-form{display:grid;gap:15px}
.sgo2-form label{display:grid;gap:7px;font-size:13px;font-weight:800;color:#243b55}
.sgo2-form input,.sgo2-form textarea{width:100%;border:1px solid #ced8e5;border-radius:12px;background:#fff;padding:13px 14px;color:var(--text);outline:none;transition:.18s ease}
.sgo2-form input:focus,.sgo2-form textarea:focus{border-color:#5890dd;box-shadow:0 0 0 4px rgba(88,144,221,.12)}
.sgo2-flash{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-radius:13px;margin-bottom:18px;font-size:14px;font-weight:700;border:1px solid transparent}
.sgo2-flash button{border:0;background:transparent;font-size:21px;line-height:1;color:inherit}
.sgo2-flash-success{background:var(--greenbg);color:#08734a;border-color:#c7f0df}
.sgo2-flash-error{background:var(--redbg);color:#9d2b25;border-color:#ffd0cc}

/* AUTH */
.sgo2-auth-layout{min-height:100vh;display:grid;grid-template-columns:minmax(420px,1.05fr) minmax(420px,.95fr)}
.sgo2-auth-brand{background:radial-gradient(circle at 20% 15%,rgba(245,200,75,.18),transparent 28%),linear-gradient(150deg,#061426 0%,#092242 58%,#0d3568 100%);color:#fff;display:flex;align-items:center;padding:56px}
.sgo2-auth-brand-inner{width:min(630px,100%);margin:0 auto}
.sgo2-auth-brand .sgo2-brand span{color:#adc0d8}
.sgo2-auth-copy{margin-top:90px}
.sgo2-auth-copy .sgo2-eyebrow{color:var(--gold)}
.sgo2-auth-copy h1{font-size:clamp(42px,5vw,70px);line-height:.98;letter-spacing:-.045em;margin:14px 0 24px;max-width:720px}
.sgo2-auth-copy p{color:#c1cee0;font-size:17px;line-height:1.65;max-width:600px}
.sgo2-auth-badge{margin-top:58px;display:inline-flex;gap:8px;align-items:center;padding:10px 13px;border-radius:999px;background:rgba(255,255,255,.08);color:#dce7f5;font-size:13px}
.sgo2-auth-badge span{color:#2bd487}
.sgo2-auth-main{display:grid;place-items:center;padding:42px;background:#f7f9fc}
.sgo2-auth-box{width:min(500px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:30px;box-shadow:var(--shadow)}
.sgo2-auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#f1f5fa;border-radius:13px;padding:5px;margin-bottom:26px}
.sgo2-auth-tabs button{border:0;background:transparent;border-radius:10px;padding:11px;font-weight:900;color:#718197}
.sgo2-auth-tabs button.is-active{background:#fff;color:var(--navy);box-shadow:0 5px 16px rgba(7,24,47,.08)}
.sgo2-auth-box h2{font-size:28px;margin:0 0 6px}
.sgo2-auth-box .sgo2-muted{font-size:14px;margin:0 0 22px}

/* PENDING */
.sgo2-screen-center{min-height:100vh;display:grid;place-items:center;padding:30px;background:radial-gradient(circle at top left,#eef4ff,transparent 35%),var(--bg)}
.sgo2-pending-card{width:min(560px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:var(--shadow);text-align:center}
.sgo2-pending-card .sgo2-brand{justify-content:center;margin-bottom:28px;text-align:left}
.sgo2-pending-icon{width:70px;height:70px;border-radius:20px;background:#fff6d8;display:grid;place-items:center;font-size:30px;margin:8px auto 20px}
.sgo2-pending-card h1{font-size:34px;margin:9px 0 10px}
.sgo2-pending-card p{color:var(--muted);line-height:1.6;margin:0 0 22px}

/* APP */
.sgo2-app{min-height:100vh;background:var(--bg)}
.sgo2-topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;position:sticky;top:0;z-index:20}
.sgo2-topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:20px}
.sgo2-user{display:flex;align-items:center;gap:10px;min-width:0}
.sgo2-avatar{width:38px;height:38px;border-radius:12px;background:#e9f6ef;color:#0d8e59;display:grid;place-items:center;font-weight:1000}
.sgo2-user-text{min-width:0}
.sgo2-user-text strong{display:block;font-size:13px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sgo2-user-text span{display:block;font-size:11px;color:var(--muted);max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sgo2-icon-btn{width:38px;height:38px;border:0;border-radius:11px;background:#f2f5f9;color:var(--navy);font-weight:900;font-size:16px}
.sgo2-main{padding-top:38px;padding-bottom:60px}
.sgo2-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}
.sgo2-page-head h1{font-size:44px;letter-spacing:-.035em;line-height:1;margin:7px 0 8px}
.sgo2-page-head p{margin:0;color:var(--muted)}
.sgo2-summary-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,.72fr);gap:18px;margin-bottom:20px}
.sgo2-next-card{min-height:235px;border-radius:22px;padding:30px;background:radial-gradient(circle at 82% 16%,rgba(245,200,75,.20),transparent 26%),linear-gradient(135deg,#07182f,#0e3261);color:#fff;display:flex;align-items:flex-end;justify-content:space-between;gap:24px;box-shadow:0 20px 42px rgba(7,24,47,.18)}
.sgo2-next-copy{align-self:center;min-width:0}
.sgo2-next-card .sgo2-card-label{color:#d9e6f7}
.sgo2-next-card h2{font-size:clamp(34px,4vw,50px);letter-spacing:-.035em;line-height:1.03;margin:12px 0 12px}
.sgo2-next-card p{max-width:720px;margin:0;color:#c8d5e7;line-height:1.55}
.sgo2-stat-card{border-radius:22px;padding:28px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);display:flex;flex-direction:column;justify-content:center}
.sgo2-stat-card strong{display:block;font-size:62px;line-height:1;margin:18px 0 6px;letter-spacing:-.05em;color:var(--navy)}
.sgo2-stat-card span:last-child{font-size:13px;color:var(--muted)}
.sgo2-history-card{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);overflow:hidden}
.sgo2-history-head{padding:24px 26px 18px;border-bottom:1px solid var(--line)}
.sgo2-history-head h2{font-size:25px;margin:7px 0 0}
.sgo2-table-wrap{overflow:auto}
.sgo2-table{width:100%;border-collapse:collapse}
.sgo2-table th{background:#f8fafc;color:#65758a;font-size:11px;letter-spacing:.12em;text-transform:uppercase;text-align:left;padding:14px 18px;border-bottom:1px solid var(--line);white-space:nowrap}
.sgo2-table td{padding:17px 18px;border-bottom:1px solid #edf1f5;vertical-align:middle;font-size:14px}
.sgo2-table tbody tr:last-child td{border-bottom:0}
.sgo2-table tbody tr:hover td{background:#fbfdff}
.sgo2-table td:first-child{min-width:250px;color:var(--navy)}
.sgo2-table td:nth-child(2){min-width:340px;line-height:1.5}
.sgo2-table td:nth-child(3){min-width:200px}
.sgo2-person{display:flex;align-items:center;gap:9px}
.sgo2-person>span{width:32px;height:32px;border-radius:10px;background:#edf4ff;color:var(--blue);display:grid;place-items:center;font-weight:900}
.sgo2-row-actions{text-align:right;white-space:nowrap}
.sgo2-row-btn{border:0;background:#edf4ff;color:var(--blue);font-weight:900;padding:8px 11px;border-radius:9px;margin-left:5px}
.sgo2-row-btn.sgo2-danger{background:#fff0ef;color:var(--red)}
.sgo2-inline{display:inline}
.sgo2-empty{padding:48px 20px;text-align:center;color:var(--muted);display:grid;place-items:center;gap:7px}
.sgo2-empty>div{width:52px;height:52px;border-radius:16px;background:#eef4fb;display:grid;place-items:center;font-size:25px;color:var(--blue)}
.sgo2-empty strong{color:var(--navy);font-size:17px}

/* MODAL */
.sgo2-modal{display:none;position:fixed;inset:0;background:rgba(3,13,26,.68);z-index:100;padding:24px;overflow:auto;backdrop-filter:blur(4px)}
.sgo2-modal.is-open{display:flex;align-items:center;justify-content:center}
.sgo2-modal-dialog{width:min(720px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border-radius:24px;padding:28px;position:relative;box-shadow:0 30px 90px rgba(0,0,0,.32)}
.sgo2-modal-dialog h2{font-size:31px;margin:9px 0 7px}
.sgo2-modal-dialog>.sgo2-muted{margin:0 0 22px;line-height:1.5}
.sgo2-modal-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border:0;border-radius:11px;background:#f0f4f8;color:#607187;font-size:24px;line-height:1}
.sgo2-type-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sgo2-type-card{display:flex!important;grid-template-columns:none!important;align-items:center;gap:12px;border:1px solid #d7e0eb;border-radius:14px;padding:14px!important;background:#fff;cursor:pointer;transition:.18s ease}
.sgo2-type-card input{display:none}
.sgo2-type-card.is-selected{border-color:#6a9ce0;box-shadow:0 0 0 3px rgba(66,126,207,.10);background:#f7faff}
.sgo2-type-card.is-disabled{opacity:.48;cursor:not-allowed}
.sgo2-type-icon{width:38px;height:38px;border-radius:11px;background:#edf4ff;color:var(--blue);display:grid;place-items:center;font-weight:1000;flex:0 0 auto}
.sgo2-type-card strong{display:block;font-size:14px}
.sgo2-type-card small{display:block;color:var(--muted);margin-top:2px;font-weight:500}
.sgo2-preview{font-size:12px;color:var(--blue);font-weight:800}
.sgo2-migration{border:1px solid #eadba7;border-radius:17px;padding:18px;background:#fffaf0;display:grid;gap:12px}
.sgo2-migration h3{font-size:18px;margin:0}
.sgo2-choice-row{display:flex;gap:9px;flex-wrap:wrap}
.sgo2-choice-row label{display:flex;align-items:center;gap:7px;padding:10px 12px;border:1px solid #d9e1ea;border-radius:11px;background:#fff;font-size:13px!important;cursor:pointer}
.sgo2-choice-row input{width:auto!important;margin:0}
.sgo2-note{font-size:12px;color:#776633;margin:0;line-height:1.5}

@media(max-width:980px){
  .sgo2-auth-layout{grid-template-columns:1fr}
  .sgo2-auth-brand{min-height:420px;padding:38px}
  .sgo2-auth-copy{margin-top:58px}
  .sgo2-auth-main{padding:30px 20px}
  .sgo2-summary-grid{grid-template-columns:1fr}
  .sgo2-next-card{align-items:flex-start;flex-direction:column;justify-content:center}
}
@media(max-width:700px){
  .sgo2-container{width:min(100%,calc(100% - 24px))}
  .sgo2-topbar{height:auto;padding:12px 0}
  .sgo2-user-text{display:none}
  .sgo2-brand span{display:none}
  .sgo2-main{padding-top:24px}
  .sgo2-page-head{align-items:flex-start;flex-direction:column}
  .sgo2-page-head .sgo2-btn{width:100%}
  .sgo2-page-head h1{font-size:38px}
  .sgo2-next-card{padding:22px;min-height:0}
  .sgo2-next-card h2{font-size:31px}
  .sgo2-stat-card strong{font-size:48px}
  .sgo2-type-grid{grid-template-columns:1fr}
  .sgo2-modal{padding:12px}
  .sgo2-modal-dialog{padding:22px 18px;max-height:calc(100vh - 24px)}
  .sgo2-row-actions{white-space:normal}
  .sgo2-auth-brand{min-height:370px;padding:28px 22px}
  .sgo2-auth-copy h1{font-size:42px}
}

/* V2.1 — categorias e séries independentes */
.sgo2-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sgo2-btn-config{border:1px solid var(--line);background:#fff;color:var(--navy);box-shadow:none}
.sgo2-btn-config:hover{background:#f8fafc}
.sgo2-category-overview{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);padding:22px 24px;margin-bottom:20px}
.sgo2-category-overview-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:15px}
.sgo2-category-overview-head strong{font-size:18px;color:var(--navy)}
.sgo2-category-pills{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.sgo2-category-pill{border:1px solid #dce5ef;background:#f9fbfd;border-radius:15px;padding:14px 15px;text-align:left;display:grid;gap:5px;color:var(--text)}
.sgo2-category-pill:hover{border-color:#8fb3e5;background:#f5f9ff}
.sgo2-category-pill span{font-size:12px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:var(--blue)}
.sgo2-category-pill strong{font-size:15px;color:var(--navy)}
.sgo2-category-pill.is-unconfigured{opacity:.58;cursor:default}
.sgo2-category-pill.is-unconfigured:hover{border-color:#dce5ef;background:#f9fbfd}
.sgo2-category-select-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sgo2-category-select-grid .sgo2-type-card{min-height:78px}
.sgo2-modal-wide{width:min(980px,100%)}
.sgo2-category-manager{display:grid;gap:11px;margin-top:22px}
.sgo2-category-manage-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.6fr) auto;gap:14px;align-items:end;border:1px solid var(--line);border-radius:17px;padding:16px;background:#fff}
.sgo2-category-manage-row.is-ordinary{background:linear-gradient(180deg,#fffdf5,#fffaf0);border-color:#eadba7}
.sgo2-category-manage-info{align-self:center;min-width:0}
.sgo2-category-manage-info strong{display:block;font-size:17px;color:var(--navy);margin:6px 0 4px}
.sgo2-category-manage-info small{display:block;color:var(--muted);font-size:12px;line-height:1.4}
.sgo2-category-badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#edf4ff;color:var(--blue);font-size:9px;font-weight:1000;letter-spacing:.12em}
.sgo2-category-manage-row.is-ordinary .sgo2-category-badge{background:#fff0b8;color:#735b0c}
.sgo2-category-edit-form{display:grid;grid-template-columns:minmax(150px,1fr) minmax(130px,.55fr) auto;gap:9px;align-items:end}
.sgo2-category-edit-form label,.sgo2-new-category-form label{display:grid;gap:6px;font-size:11px;font-weight:900;color:#516278;text-transform:uppercase;letter-spacing:.06em}
.sgo2-category-edit-form input,.sgo2-new-category-form input{width:100%;border:1px solid #ced8e5;border-radius:11px;background:#fff;padding:11px 12px;color:var(--text);outline:none}
.sgo2-category-edit-form input:disabled{background:#f1f4f8;color:#7b8796}
.sgo2-category-delete-form{align-self:end}
.sgo2-new-category-box{margin-top:18px;border-radius:18px;padding:18px;background:#f4f8fd;border:1px dashed #bfd0e4;display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.5fr);gap:18px;align-items:end}
.sgo2-new-category-box h3{font-size:19px;margin:5px 0}
.sgo2-new-category-box p{font-size:12px;color:var(--muted);margin:0}
.sgo2-new-category-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(120px,.55fr) auto;gap:9px;align-items:end}

@media(max-width:900px){
  .sgo2-category-manage-row{grid-template-columns:1fr}
  .sgo2-category-edit-form{grid-template-columns:1fr 1fr auto}
  .sgo2-category-delete-form{justify-self:start}
  .sgo2-new-category-box{grid-template-columns:1fr}
}
@media(max-width:700px){
  .sgo2-head-actions{width:100%}
  .sgo2-head-actions .sgo2-btn{flex:1 1 auto}
  .sgo2-category-select-grid{grid-template-columns:1fr}
  .sgo2-category-overview-head{align-items:flex-start;flex-direction:column}
  .sgo2-category-edit-form,.sgo2-new-category-form{grid-template-columns:1fr}
  .sgo2-category-edit-form .sgo2-btn,.sgo2-new-category-form .sgo2-btn{width:100%}
}

/* V2.2 — documentos por ofício e trilha de auditoria */
.sgo2-document-table{min-width:1480px}
.sgo2-document-table th:nth-child(4),
.sgo2-document-table th:nth-child(5),
.sgo2-document-table th:nth-child(6),
.sgo2-document-table th:nth-child(8){text-align:center}
.sgo2-document-table td:nth-child(4),
.sgo2-document-table td:nth-child(5),
.sgo2-document-table td:nth-child(6),
.sgo2-document-table td:nth-child(8){text-align:center}
.sgo2-document-table td:nth-child(4),
.sgo2-document-table td:nth-child(5),
.sgo2-document-table td:nth-child(6){min-width:145px}
.sgo2-document-table td:nth-child(7){min-width:165px}
.sgo2-document-table td:nth-child(8){min-width:90px}
.sgo2-doc-cell{white-space:nowrap}
.sgo2-attach-btn{border:1px dashed #9db8dc;background:#f7faff;color:var(--blue);border-radius:11px;min-height:38px;padding:8px 11px;display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:900;transition:.18s ease}
.sgo2-attach-btn:hover{background:#edf5ff;border-color:#6f9bd8}
.sgo2-attach-btn svg,.sgo2-file-icon svg,.sgo2-audit-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sgo2-file-actions{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.sgo2-file-icon,.sgo2-audit-btn{width:38px;height:38px;border:1px solid #d8e3ef;border-radius:10px;background:#fff;color:var(--blue);display:inline-grid;place-items:center;padding:0;transition:.18s ease}
.sgo2-file-icon:hover,.sgo2-audit-btn:hover{background:#edf5ff;border-color:#a8c3e6;transform:translateY(-1px)}
.sgo2-file-icon.sgo2-file-danger{color:var(--red)}
.sgo2-file-icon.sgo2-file-danger:hover{background:#fff1f0;border-color:#ffc5c1}
.sgo2-audit-btn{color:var(--navy);background:#f4f7fb}
.sgo2-audit-cell{text-align:center}
.sgo2-file-note{font-size:12px;line-height:1.5;color:#64758a;background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:12px 13px}
.sgo2-form input[type="file"]{padding:10px;background:#f8fafc}

.sgo2-pdf-modal{padding:18px}
.sgo2-pdf-dialog{width:min(1180px,100%);height:calc(100vh - 36px);max-height:none;padding:0;overflow:hidden;display:flex;flex-direction:column;border-radius:20px}
.sgo2-pdf-head{min-height:74px;padding:16px 66px 14px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;background:#fff}
.sgo2-pdf-head h2{font-size:20px;margin:5px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sgo2-pdf-close{top:18px;right:18px}
.sgo2-pdf-frame{width:100%;height:100%;flex:1 1 auto;border:0;background:#e9eef5}

.sgo2-confirm-dialog,.sgo2-password-dialog{width:min(520px,100%);text-align:center}
.sgo2-confirm-dialog>.sgo2-muted,.sgo2-password-dialog>.sgo2-muted{max-width:430px;margin-left:auto;margin-right:auto}
.sgo2-confirm-icon{width:58px;height:58px;border-radius:18px;background:#fff4cf;color:#80630a;display:grid;place-items:center;margin:0 auto 17px;font-size:26px;font-weight:1000}
.sgo2-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}
.sgo2-password-dialog .sgo2-form{text-align:left;margin-top:18px}
.sgo2-password-error{padding:10px 12px;border-radius:10px;background:var(--redbg);color:#9d2b25;border:1px solid #ffd0cc;font-size:13px;font-weight:800;text-align:center}
.sgo2-password-dialog.is-loading .sgo2-btn{opacity:.65;pointer-events:none}

.sgo2-audit-dialog{width:min(720px,100%)}
.sgo2-audit-timeline{position:relative;display:grid;gap:0;margin-top:18px}
.sgo2-audit-item{position:relative;display:grid;grid-template-columns:28px 1fr;gap:12px;padding:0 0 22px}
.sgo2-audit-item:not(:last-child)::before{content:"";position:absolute;left:8px;top:16px;bottom:0;width:2px;background:#dfe7f1}
.sgo2-audit-dot{width:18px;height:18px;border-radius:999px;background:#fff;border:5px solid var(--blue);box-shadow:0 0 0 4px #edf4ff;margin-top:2px;z-index:1}
.sgo2-audit-content{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 7px;min-width:0}
.sgo2-audit-content strong{color:var(--navy);font-size:14px}
.sgo2-audit-content>span{font-size:14px;color:#334b65}
.sgo2-audit-content time{display:block;flex-basis:100%;font-size:12px;color:var(--muted);margin-top:3px}
.sgo2-audit-content small{display:block;flex-basis:100%;margin-top:5px;padding:8px 10px;background:#f7f9fc;border-radius:9px;color:#69798c;font-size:11px;line-height:1.45;word-break:break-word}
.sgo2-audit-empty{padding:28px;text-align:center;color:var(--muted);background:#f7f9fc;border-radius:14px}

@media(max-width:700px){
  .sgo2-pdf-modal{padding:0}
  .sgo2-pdf-dialog{height:100vh;border-radius:0;max-height:none}
  .sgo2-confirm-actions{grid-template-columns:1fr}
}

/* V2.2.1 — tabela compacta sem rolagem horizontal no desktop */
.sgo2-table-wrap{overflow-x:hidden!important;overflow-y:visible}
.sgo2-document-table{width:100%!important;min-width:0!important;table-layout:fixed}
.sgo2-document-table th,
.sgo2-document-table td{min-width:0!important}

.sgo2-document-table th{padding:11px 7px;font-size:9.5px;line-height:1.2;white-space:normal;word-break:normal;overflow-wrap:anywhere}
.sgo2-document-table td{padding:12px 7px;font-size:12px;line-height:1.35;overflow-wrap:anywhere;word-break:normal}

/* distribuição das oito colunas */
.sgo2-document-table th:nth-child(1),.sgo2-document-table td:nth-child(1){width:17%}
.sgo2-document-table th:nth-child(2),.sgo2-document-table td:nth-child(2){width:20%}
.sgo2-document-table th:nth-child(3),.sgo2-document-table td:nth-child(3){width:13%}
.sgo2-document-table th:nth-child(4),.sgo2-document-table td:nth-child(4){width:10%}
.sgo2-document-table th:nth-child(5),.sgo2-document-table td:nth-child(5){width:11%}
.sgo2-document-table th:nth-child(6),.sgo2-document-table td:nth-child(6){width:10%}
.sgo2-document-table th:nth-child(7),.sgo2-document-table td:nth-child(7){width:14%}
.sgo2-document-table th:nth-child(8),.sgo2-document-table td:nth-child(8){width:5%}

.sgo2-document-table td:first-child{font-size:11.5px;line-height:1.3}
.sgo2-document-table td:nth-child(2){line-height:1.35}

.sgo2-person{gap:6px;min-width:0}
.sgo2-person>span{width:26px;height:26px;border-radius:8px;font-size:11px;flex:0 0 26px}
.sgo2-person>div{min-width:0}
.sgo2-person strong{display:block;font-size:11.5px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}

.sgo2-doc-cell{white-space:normal!important}
.sgo2-attach-btn{min-height:31px;padding:6px 7px;border-radius:8px;gap:4px;font-size:10px;white-space:nowrap}
.sgo2-attach-btn svg,.sgo2-file-icon svg,.sgo2-audit-btn svg{width:14px;height:14px}
.sgo2-file-actions{gap:3px;flex-wrap:nowrap}
.sgo2-file-icon,.sgo2-audit-btn{width:29px;height:29px;border-radius:8px}

.sgo2-row-actions{text-align:center;white-space:normal!important}
.sgo2-row-btn{padding:6px 7px;border-radius:7px;margin:2px 1px;font-size:10px;line-height:1.15}
.sgo2-inline{display:inline}
.sgo2-audit-cell{padding-left:3px!important;padding-right:3px!important}

@media(max-width:1100px){
  .sgo2-document-table th{font-size:8.5px;padding:9px 4px}
  .sgo2-document-table td{font-size:10.5px;padding:10px 4px}
  .sgo2-document-table td:first-child{font-size:10px}
  .sgo2-person>span{display:none}
  .sgo2-person strong{font-size:10px}
  .sgo2-attach-btn{padding:5px 5px;font-size:9px}
  .sgo2-file-icon,.sgo2-audit-btn{width:26px;height:26px}
  .sgo2-file-actions{gap:2px}
  .sgo2-row-btn{font-size:9px;padding:5px 5px}
}

/* Em telas pequenas, mantém tudo acessível sem barra horizontal transformando cada registro em bloco. */
@media(max-width:760px){
  .sgo2-table-wrap{overflow:visible!important}
  .sgo2-document-table,.sgo2-document-table tbody,.sgo2-document-table tr,.sgo2-document-table td{display:block;width:100%!important}
  .sgo2-document-table thead{display:none}
  .sgo2-document-table tr{border-bottom:1px solid var(--line);padding:12px 14px}
  .sgo2-document-table td{display:grid;grid-template-columns:115px minmax(0,1fr);gap:10px;align-items:center;border-bottom:1px dashed #edf1f5!important;padding:9px 0!important;text-align:left!important;font-size:12px!important}
  .sgo2-document-table td:last-child{border-bottom:0!important}
  .sgo2-document-table td::before{font-size:9px;letter-spacing:.08em;text-transform:uppercase;font-weight:900;color:#65758a}
  .sgo2-document-table td:nth-child(1)::before{content:'Número'}
  .sgo2-document-table td:nth-child(2)::before{content:'Motivo'}
  .sgo2-document-table td:nth-child(3)::before{content:'Quem pegou'}
  .sgo2-document-table td:nth-child(4)::before{content:'Ofício'}
  .sgo2-document-table td:nth-child(5)::before{content:'Protocolo'}
  .sgo2-document-table td:nth-child(6)::before{content:'Resposta'}
  .sgo2-document-table td:nth-child(7)::before{content:'Ações'}
  .sgo2-document-table td:nth-child(8)::before{content:'Registros'}
  .sgo2-document-table .sgo2-empty{display:grid;width:100%;grid-column:1/-1}
  .sgo2-person>span{display:grid}
  .sgo2-row-actions,.sgo2-audit-cell{text-align:left!important}
}

/* V2.3 — ofício ordinário avulso */
.sgo2-next-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;flex:0 0 auto}
.sgo2-btn-outline-light{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.28);box-shadow:none}
.sgo2-btn-outline-light:hover{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.42)}
.sgo2-loose-badge{display:inline-flex;align-items:center;margin-left:7px;padding:3px 6px;border-radius:999px;background:#fff4cf;color:#755a08;border:1px solid #efd778;font-size:8px;line-height:1;font-weight:1000;letter-spacing:.08em;vertical-align:middle}
.sgo2-number-field{display:grid;grid-template-columns:auto minmax(100px,1fr) auto;align-items:center;border:1px solid #ced8e5;border-radius:12px;background:#fff;overflow:hidden;transition:.18s ease}
.sgo2-number-field:focus-within{border-color:#5890dd;box-shadow:0 0 0 4px rgba(88,144,221,.12)}
.sgo2-number-field>span{padding:0 13px;color:#52657c;font-size:12px;font-weight:900;white-space:nowrap}
.sgo2-number-field input{border:0!important;border-left:1px solid #e1e8f0!important;border-right:1px solid #e1e8f0!important;border-radius:0!important;box-shadow:none!important;text-align:center;font-size:18px;font-weight:900;color:var(--navy)}
.sgo2-loose-warning{display:grid;grid-template-columns:44px 1fr;gap:12px;padding:15px;border-radius:14px;background:#fff8e6;border:1px solid #f0d37a;color:#4f410d}
.sgo2-loose-warning-icon{width:40px;height:40px;border-radius:12px;background:#f5c84b;color:#4f3d00;display:grid;place-items:center;font-size:20px;font-weight:1000}
.sgo2-loose-warning strong{display:block;color:#3f340b;font-size:14px;line-height:1.4;margin-top:1px}
.sgo2-loose-warning p{margin:6px 0 11px;color:#6b5b22;font-size:12px;line-height:1.5}
.sgo2-loose-warning-actions{display:flex;gap:8px;flex-wrap:wrap}
.sgo2-loose-warning-actions .sgo2-btn{min-height:38px;padding:9px 12px;border-radius:10px;font-size:12px}
.sgo2-loose-info{padding:12px 13px;border-radius:12px;background:#eef5ff;border:1px solid #cbdcf5;color:#355272;font-size:12px;line-height:1.55}
.sgo2-loose-info strong{color:var(--navy)}

@media(max-width:900px){
  .sgo2-next-actions{justify-content:flex-start;width:100%}
}
@media(max-width:560px){
  .sgo2-next-actions{display:grid;grid-template-columns:1fr;width:100%}
  .sgo2-next-actions .sgo2-btn{width:100%}
  .sgo2-number-field{grid-template-columns:auto 1fr auto}
  .sgo2-number-field>span{padding:0 8px;font-size:10px}
  .sgo2-loose-warning{grid-template-columns:1fr}
  .sgo2-loose-warning-icon{width:34px;height:34px}
  .sgo2-loose-warning-actions{display:grid;grid-template-columns:1fr}
}

/* V2.4 — Controle de Atas */
.sgo2-btn-minutes{border:1px solid #d8e4f1;background:#fff;color:var(--navy);box-shadow:none}
.sgo2-btn-minutes:hover{background:#f5f9ff;border-color:#b8cee9}
.sgo2-minutes-head{margin-bottom:22px}
.sgo2-minutes-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:20px}
.sgo2-minute-stat{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px 26px;box-shadow:var(--shadow);display:grid;gap:7px;min-height:152px;align-content:center}
.sgo2-minute-stat-primary{background:linear-gradient(145deg,#081b36,#103c75);border:0;color:#fff}
.sgo2-minute-stat-primary .sgo2-card-label{color:#cfe0f7}
.sgo2-minute-stat strong{font-size:48px;line-height:1;letter-spacing:-.04em;color:var(--navy)}
.sgo2-minute-stat-primary strong{color:#fff}
.sgo2-minute-stat small{font-size:12px;color:var(--muted);line-height:1.45}
.sgo2-minute-stat-primary small{color:#bfd0e5}

.sgo2-minutes-directory,.sgo2-minutes-table-card{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);overflow:hidden}
.sgo2-minutes-directory-head,.sgo2-minutes-table-head{padding:22px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:18px}
.sgo2-minutes-directory-head h2,.sgo2-minutes-table-head h2{font-size:24px;margin:6px 0 0;color:var(--navy)}
.sgo2-city-search{width:min(360px,100%);height:44px;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid #d3deea;border-radius:12px;background:#f9fbfd;color:#617287}
.sgo2-city-search span{font-size:19px;line-height:1}
.sgo2-city-search input{border:0;background:transparent;outline:0;width:100%;color:var(--text);font-size:13px}
.sgo2-city-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px}
.sgo2-city-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto 22px;gap:12px;align-items:center;padding:15px;border:1px solid #dfe7f0;border-radius:16px;background:#fbfdff;text-decoration:none;color:var(--text);transition:.18s ease;min-width:0}
.sgo2-city-card:hover{transform:translateY(-2px);border-color:#a8c3e6;background:#f5f9ff;box-shadow:0 12px 24px rgba(31,95,191,.08)}
.sgo2-city-card-icon{width:46px;height:46px;border-radius:13px;background:linear-gradient(145deg,#e7f0ff,#f4f8ff);color:var(--blue);display:grid;place-items:center;font-size:18px;font-weight:1000}
.sgo2-city-card-copy{min-width:0}
.sgo2-city-card-copy strong{display:block;font-size:14px;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sgo2-city-card-copy span{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.sgo2-city-card-meta{text-align:right;white-space:nowrap}
.sgo2-city-card-meta small{display:block;color:#8a98aa;font-size:9px;text-transform:uppercase;letter-spacing:.08em;font-weight:900}
.sgo2-city-card-meta b{display:block;margin-top:3px;color:#38516d;font-size:11px}
.sgo2-city-card-arrow{font-size:26px;color:#91a4bb;font-weight:300}
.sgo2-city-no-results{padding:30px;text-align:center;color:var(--muted);font-size:13px}
.sgo2-minutes-empty{padding:64px 24px;display:grid;place-items:center;text-align:center}
.sgo2-minutes-empty-icon{width:66px;height:66px;border-radius:18px;background:#eef4fb;color:var(--blue);display:grid;place-items:center;font-size:28px;margin-bottom:14px}
.sgo2-minutes-empty h3{font-size:22px;margin:0 0 7px;color:var(--navy)}
.sgo2-minutes-empty p{max-width:520px;margin:0 0 20px;color:var(--muted);line-height:1.55;font-size:13px}

.sgo2-city-detail-head{margin-bottom:18px;background:linear-gradient(135deg,#08182f,#0d3466);border-radius:22px;padding:22px 26px;color:#fff;box-shadow:0 18px 38px rgba(7,24,47,.16)}
.sgo2-back-link{display:inline-flex;color:#c8d7ea;text-decoration:none;font-size:12px;font-weight:800;margin-bottom:16px}
.sgo2-back-link:hover{color:#fff}
.sgo2-city-detail-title{display:flex;align-items:center;gap:14px}
.sgo2-city-detail-letter{width:54px;height:54px;border-radius:16px;background:linear-gradient(145deg,var(--gold2),var(--gold));color:var(--navy);display:grid;place-items:center;font-size:21px;font-weight:1000;box-shadow:0 10px 24px rgba(245,200,75,.18)}
.sgo2-city-detail-title .sgo2-card-label{color:#bed2ea}
.sgo2-city-detail-title h2{font-size:31px;margin:5px 0 2px;letter-spacing:-.02em}
.sgo2-city-detail-title p{margin:0;color:#bfcfe2;font-size:12px}

.sgo2-minutes-table-wrap{overflow:visible}
.sgo2-minutes-table{width:100%;border-collapse:collapse;table-layout:fixed}
.sgo2-minutes-table th{padding:13px 16px;background:#f8fafc;border-bottom:1px solid var(--line);font-size:10px;letter-spacing:.1em;text-transform:uppercase;text-align:left;color:#65758a}
.sgo2-minutes-table td{padding:15px 16px;border-bottom:1px solid #edf1f5;vertical-align:middle;font-size:12px}
.sgo2-minutes-table tbody tr:last-child td{border-bottom:0}
.sgo2-minutes-table tbody tr:hover td{background:#fbfdff}
.sgo2-minutes-table th:nth-child(1),.sgo2-minutes-table td:nth-child(1){width:13%}
.sgo2-minutes-table th:nth-child(2),.sgo2-minutes-table td:nth-child(2){width:49%}
.sgo2-minutes-table th:nth-child(3),.sgo2-minutes-table td:nth-child(3){width:23%}
.sgo2-minutes-table th:nth-child(4),.sgo2-minutes-table td:nth-child(4){width:15%;text-align:center}
.sgo2-minute-teor-cell{line-height:1.5;color:#31465e}
.sgo2-minute-person>span{flex:0 0 auto}
.sgo2-minute-actions{white-space:nowrap}
.sgo2-minute-actions .sgo2-inline{display:inline-flex;vertical-align:middle}
.sgo2-field-help{font-size:11px;color:var(--muted);font-weight:500}
.sgo2-minute-dialog{width:min(760px,100%)}
.sgo2-minute-dialog textarea{resize:vertical;min-height:190px}
.sgo2-minute-view-dialog{width:min(850px,100%)}
.sgo2-minute-view-meta{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 18px}
.sgo2-minute-view-meta span{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#eef4fb;color:#36516f;font-size:11px;font-weight:800}
.sgo2-minute-view-content{white-space:pre-wrap;line-height:1.72;color:#253b53;background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:20px;max-height:54vh;overflow:auto;font-size:14px}

@media(max-width:1050px){
  .sgo2-city-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .sgo2-minutes-summary{grid-template-columns:1fr}
  .sgo2-minutes-directory-head,.sgo2-minutes-table-head{align-items:flex-start;flex-direction:column}
  .sgo2-city-search{width:100%}
  .sgo2-city-grid{grid-template-columns:1fr;padding:12px}
  .sgo2-city-card{grid-template-columns:42px minmax(0,1fr) 20px}
  .sgo2-city-card-meta{display:none}
  .sgo2-city-card-icon{width:42px;height:42px}
  .sgo2-city-detail-head{padding:18px}
  .sgo2-city-detail-title h2{font-size:25px}
  .sgo2-minutes-table,.sgo2-minutes-table tbody,.sgo2-minutes-table tr,.sgo2-minutes-table td{display:block;width:100%!important}
  .sgo2-minutes-table thead{display:none}
  .sgo2-minutes-table tr{padding:12px 14px;border-bottom:1px solid var(--line)}
  .sgo2-minutes-table td{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;align-items:start;padding:9px 0!important;border-bottom:1px dashed #edf1f5!important;text-align:left!important}
  .sgo2-minutes-table td:last-child{border-bottom:0!important}
  .sgo2-minutes-table td::before{content:attr(data-label);font-size:9px;letter-spacing:.08em;text-transform:uppercase;font-weight:900;color:#65758a}
  .sgo2-minute-actions{display:flex!important;align-items:center!important;justify-content:flex-start!important}
}

/* Atas — suporte a PDF */
.sgo2-minutes-table th:nth-child(1),.sgo2-minutes-table td:nth-child(1){width:12%}
.sgo2-minutes-table th:nth-child(2),.sgo2-minutes-table td:nth-child(2){width:43%}
.sgo2-minutes-table th:nth-child(3),.sgo2-minutes-table td:nth-child(3){width:20%}
.sgo2-minutes-table th:nth-child(4),.sgo2-minutes-table td:nth-child(4){width:9%;text-align:center}
.sgo2-minutes-table th:nth-child(5),.sgo2-minutes-table td:nth-child(5){width:16%;text-align:center}
.sgo2-minute-pdf-cell{white-space:nowrap}
.sgo2-minute-no-pdf{color:#9aa8b7;font-weight:800}
.sgo2-optional{font-weight:600;color:var(--muted);font-size:11px}
.sgo2-current-pdf{padding:12px 14px;border:1px solid var(--line);background:#f8fafc;border-radius:12px;color:#50657b;font-size:12px;line-height:1.5}
.sgo2-inline-pdf-link{border:0;background:none;padding:0;color:var(--blue);font:inherit;font-weight:900;text-decoration:underline;cursor:pointer}
.sgo2-form input[type="file"]{padding:10px;background:#f8fafc}

/* v2.4.2 — destaque discreto do município recém-cadastrado */
.sgo2-city-card.is-newly-added{
  border-color:#e4b72f;
  box-shadow:0 0 0 3px rgba(244,197,66,.18),0 14px 34px rgba(7,21,42,.10);
}
