/* Situação Fiscal — módulo isolado. Nenhuma regra vaza para outras telas do ERP. */
#situacao-fiscal-root {
  --sf-ink: #171710;
  --sf-ink-soft: #29281f;
  --sf-gold: #c9a227;
  --sf-gold-deep: #8b6914;
  --sf-cream: #fbf7eb;
  --sf-line: #e7dfca;
  --sf-paper: #fff;
  --sf-text: #292d35;
  --sf-muted: #717784;
  --sf-green: #087f5b;
  --sf-red: #c92a2a;
  --sf-amber: #c26b00;
  --sf-blue: #2854b8;
  min-width: 0;
  color: var(--sf-text);
}

#situacao-fiscal-root *,
#situacao-fiscal-root *::before,
#situacao-fiscal-root *::after,
.sf-preview-bg,
.sf-preview-bg *,
.sf-preview-bg *::before,
.sf-preview-bg *::after { box-sizing: border-box; }

#situacao-fiscal-root .sf-icon { width: 20px; height: 20px; flex: 0 0 auto; }
#situacao-fiscal-root button,
.sf-preview-bg button { font: inherit; }

.sf-page {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 18px 20px 34px;
}

.sf-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 154px;
  overflow: hidden;
  padding: 28px 30px;
  border: 1px solid rgba(201, 162, 39, .38);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(201, 162, 39, .2), transparent 32%),
    linear-gradient(135deg, #13130f 0%, #212017 68%, #181711 100%);
  box-shadow: 0 20px 50px rgba(17, 17, 13, .16);
}

.sf-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

.sf-hero-main, .sf-hero-actions { position: relative; z-index: 1; }
.sf-hero-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.sf-hero-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 1px solid rgba(238, 211, 121, .42);
  border-radius: 22px;
  color: #f4d568;
  background: linear-gradient(145deg, rgba(201,162,39,.18), rgba(201,162,39,.05));
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 12px 30px rgba(0,0,0,.22);
}
.sf-hero-icon .sf-icon { width: 36px; height: 36px; stroke-width: 1.45; }
.sf-hero-main small, .sf-dossier-head > div:nth-child(2) > span, .sf-roster header span, .sf-section-title span {
  display: block;
  margin-bottom: 4px;
  color: var(--sf-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.sf-hero-main h1 { margin: 0; color: #fff; font-size: clamp(25px, 2.4vw, 36px); line-height: 1.08; letter-spacing: -.035em; }
.sf-hero-main p { max-width: 690px; margin: 9px 0 0; color: #c9c8c0; font-size: 13px; line-height: 1.55; }
.sf-hero-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.sf-readonly {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  color: #d9d7ce;
  background: rgba(255,255,255,.055);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.sf-readonly .sf-icon { width: 16px; height: 16px; color: #e1bd4a; }

.sf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.sf-button:hover { transform: translateY(-1px); }
.sf-button:active { transform: translateY(0); }
.sf-button--primary { color: #181711; background: linear-gradient(135deg, #e2bd44, #c9a227); box-shadow: 0 8px 22px rgba(201,162,39,.26); }
.sf-button--primary:hover { box-shadow: 0 11px 28px rgba(201,162,39,.38); }
.sf-button--secondary { color: var(--sf-gold-deep); border: 1px solid #ddc77e; background: #fffaf0; }
.sf-button .sf-icon { width: 17px; height: 17px; }

.sf-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: -20px 24px 20px;
  padding: 7px;
  position: relative;
  z-index: 4;
  overflow-x: auto;
  border: 1px solid rgba(216, 206, 176, .92);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 35px rgba(31, 29, 20, .13);
  scrollbar-width: none;
}
.sf-tabs::-webkit-scrollbar { display: none; }
.sf-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #696d77;
  background: transparent;
  font-size: 11.5px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.sf-tabs button:hover { color: var(--sf-gold-deep); background: #faf5e7; }
.sf-tabs button.is-active { color: #fff; background: var(--sf-ink); box-shadow: 0 7px 17px rgba(22,22,16,.22); }
.sf-tabs button.is-active .sf-icon { color: #e2bd44; }
.sf-tabs .sf-icon { width: 16px; height: 16px; }

.sf-panel { min-height: 480px; }
.sf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.sf-kpis--federal { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.sf-kpis--federal .sf-kpi { min-height: 96px; padding: 14px; }
.sf-kpis--federal .sf-kpi-icon { width: 39px; height: 39px; border-radius: 13px; }
.sf-kpis--federal .sf-kpi-icon .sf-icon { width: 19px; height: 19px; }
.sf-kpis--federal .sf-kpi-copy small { font-size: 8.5px; }
.sf-kpis--federal .sf-kpi-copy strong { font-size: 20px; }
.sf-kpis--federal .sf-kpi-copy em { font-size: 8.5px; }
.sf-kpi {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--sf-line);
  border-radius: 18px;
  background: var(--sf-paper);
  box-shadow: 0 6px 20px rgba(45, 40, 24, .055);
}
.sf-kpi-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  border-radius: 15px;
  color: var(--sf-gold-deep);
  background: #f8f1dc;
}
.sf-kpi-icon .sf-icon { width: 22px; height: 22px; }
.sf-kpi-copy { min-width: 0; }
.sf-kpi-copy small { display: block; color: var(--sf-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.sf-kpi-copy strong { display: block; margin-top: 3px; color: var(--sf-ink); font-size: 24px; line-height: 1.1; letter-spacing: -.03em; }
.sf-kpi-copy em { display: block; overflow: hidden; margin-top: 4px; color: #868b95; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.sf-kpi--success .sf-kpi-icon { color: var(--sf-green); background: #e7f7f0; }
.sf-kpi--danger .sf-kpi-icon { color: var(--sf-red); background: #fff0ee; }
.sf-kpi--muted .sf-kpi-icon { color: #6c7280; background: #f0f2f5; }
.sf-kpi--ink { color: #fff; border-color: #29291f; background: linear-gradient(140deg, #202019, #12120e); }
.sf-kpi--ink .sf-kpi-icon { color: #e4c353; background: rgba(201,162,39,.13); }
.sf-kpi--ink .sf-kpi-copy strong { color: #fff; }
.sf-kpi--ink .sf-kpi-copy small, .sf-kpi--ink .sf-kpi-copy em { color: #bebdb5; }

.sf-sphere-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.sf-sphere-card {
  padding: 16px;
  border: 1px solid var(--sf-line);
  border-radius: 18px;
  background: linear-gradient(155deg, #fff 0%, #fffcf4 100%);
}
.sf-sphere-card header { display: flex; align-items: center; gap: 10px; }
.sf-sphere-card header > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--sf-gold-deep); background: #f6edcf; }
.sf-sphere-card header > span .sf-icon { width: 18px; height: 18px; }
.sf-sphere-card header > div { min-width: 0; flex: 1; }
.sf-sphere-card header small { display: block; color: #989184; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sf-sphere-card header strong { color: var(--sf-ink); font-size: 13px; }
.sf-sphere-card header b { color: var(--sf-gold-deep); font-size: 17px; }
.sf-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #eeeae0; }
.sf-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sf-gold-deep), #e2bd44); }
.sf-sphere-card .sf-progress { margin: 14px 0 11px; }
.sf-sphere-card footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: #7c7f86; font-size: 10px; }
.sf-sphere-card footer span { display: inline-flex; align-items: center; gap: 4px; }
.sf-sphere-card footer i { width: 6px; height: 6px; border-radius: 50%; }
.sf-sphere-card footer .is-regular { background: var(--sf-green); }
.sf-sphere-card footer .is-attention { background: var(--sf-red); }
.sf-sphere-card footer .is-missing { background: #a9adb5; }

.sf-filterbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 230px) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px;
  border: 1px solid var(--sf-line);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 5px 18px rgba(45,40,24,.045);
}
.sf-search { position: relative; display: flex; align-items: center; min-width: 0; }
.sf-search > .sf-icon { position: absolute; left: 15px; width: 18px; height: 18px; color: #8d8f94; pointer-events: none; }
.sf-search input {
  width: 100%;
  height: 44px;
  padding: 0 43px;
  border: 1px solid #ded9ca;
  border-radius: 999px;
  outline: 0;
  color: var(--sf-text);
  background: #fff;
  font: 500 12px/1 var(--font-family);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.sf-search input:focus { border-color: var(--sf-gold); box-shadow: 0 0 0 4px rgba(201,162,39,.12); }
.sf-search input::-webkit-search-cancel-button { appearance: none; }
.sf-search button { position: absolute; right: 4px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #7a7d83; background: #f2f2ef; cursor: pointer; }
.sf-search button .sf-icon { width: 14px; height: 14px; }
.sf-select { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 15px; border: 1px solid #ded9ca; border-radius: 999px; background: #fff; }
.sf-select > span { color: #9a7d2e; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.sf-select select { min-width: 0; border: 0; outline: 0; color: #3f4249; background: transparent; font: 700 11px/1 var(--font-family); cursor: pointer; }
.sf-integrity-note { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--sf-green); white-space: nowrap; }
.sf-integrity-note .sf-icon { width: 18px; height: 18px; }
.sf-integrity-note span { display: grid; }
.sf-integrity-note strong { color: #3a5047; font-size: 11px; }
.sf-integrity-note small { color: #84908a; font-size: 9.5px; }

.sf-workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(350px, .85fr); gap: 14px; align-items: start; }
.sf-roster, .sf-dossier {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sf-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(45,40,24,.055);
}
.sf-roster > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 14px 17px;
  border-bottom: 1px solid #eee9dc;
  background: linear-gradient(180deg, #fffdf7, #fff);
}
.sf-roster header span { margin-bottom: 1px; font-size: 9.5px; }
.sf-roster header h3 { margin: 0; color: var(--sf-ink); font-size: 15px; }
.sf-roster header > small { color: #989ba3; font-size: 10px; }
.sf-roster-list { max-height: min(58vh, 680px); overflow-y: auto; scrollbar-color: #cfc5a9 transparent; scrollbar-width: thin; }

.sf-client-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 1.12fr) minmax(380px, 1.3fr) 22px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #f0ede5;
  color: inherit;
  text-align: left;
  background: #fff;
  cursor: pointer;
  transition: background .14s ease, box-shadow .14s ease;
}
.sf-client-row:hover { background: #fffcf4; }
.sf-client-row.is-selected { z-index: 1; background: linear-gradient(90deg, #fff9e8, #fff); box-shadow: inset 4px 0 var(--sf-gold); }
.sf-client-row:last-child { border-bottom: 0; }
.sf-client-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sf-client-identity > b { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 13px; color: var(--sf-gold-deep); background: #f7f1df; font-size: 10px; }
.sf-client-identity > span { min-width: 0; }
.sf-client-identity strong { display: block; overflow: hidden; color: #292b30; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.sf-client-identity small { display: block; margin-top: 4px; color: #91959e; font-size: 9.5px; }
.sf-client-statuses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.sf-client-statuses > span { min-width: 0; }
.sf-client-statuses > span > small { display: block; margin: 0 0 3px 3px; color: #8f939b; font-size: 8.5px; font-weight: 750; }
.sf-row-arrow { display: grid; place-items: center; color: #b4b5b8; }
.sf-row-arrow .sf-icon { width: 15px; height: 15px; }

.sf-client-row--sphere { grid-template-columns: minmax(230px, 1fr) minmax(190px, .7fr) 22px; }
.sf-sphere-result { display: grid; justify-items: start; gap: 5px; }
.sf-sphere-result > small { color: #8e929a; font-size: 9.5px; }

.sf-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 780;
  white-space: nowrap;
}
.sf-status .sf-icon { width: 13px; height: 13px; }
.sf-status.is-compact { min-height: 24px; padding: 0 8px; font-size: 9px; }
.sf-status.is-compact .sf-icon { width: 11px; height: 11px; }
.sf-status--regular { color: #087656; border-color: #b8e5d4; background: #eaf8f2; }
.sf-status--vence_breve { color: #9b5c00; border-color: #eed08c; background: #fff7df; }
.sf-status--vencida, .sf-status--irregular { color: #b32626; border-color: #efc1bd; background: #fff0ee; }
.sf-status--em_revisao { color: #2753a8; border-color: #c8d5f1; background: #eef3ff; }
.sf-status--sem_documento { color: #6b707b; border-color: #dadde2; background: #f2f3f5; }

.sf-dossier { position: sticky; top: 12px; }
.sf-dossier-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 17px;
  color: #fff;
  background: linear-gradient(138deg, #1d1d17, #29281e);
}
.sf-client-avatar { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid rgba(224,190,78,.42); border-radius: 15px; color: #f0cf62; background: rgba(201,162,39,.1); font-size: 10px; font-weight: 850; }
.sf-dossier-head > div:nth-child(2) { min-width: 0; }
.sf-dossier-head > div:nth-child(2) > span { color: #c8a63a; font-size: 8.5px; }
.sf-dossier-head h3 { overflow: hidden; margin: 0; color: #fff; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.sf-dossier-head p { overflow: hidden; margin: 4px 0 0; color: #aaa9a2; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.sf-dossier-body { max-height: min(61vh, 720px); overflow-y: auto; padding: 14px; scrollbar-color: #cfc5a9 transparent; scrollbar-width: thin; }
.sf-coverage-card { padding: 15px; border: 1px solid #e8dfc7; border-radius: 16px; background: #fffcf4; }
.sf-coverage-card > div:first-child { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.sf-coverage-card span { color: #767a82; font-size: 10px; font-weight: 750; }
.sf-coverage-card strong { color: var(--sf-ink); font-size: 24px; line-height: 1; }
.sf-coverage-card strong small { margin-left: 3px; color: #969991; font-size: 9px; }
.sf-dossier-spheres { display: grid; gap: 8px; margin-top: 10px; }
.sf-dossier-sphere { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid #ece8de; border-radius: 15px; background: #fff; }
.sf-dossier-sphere-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--sf-gold-deep); background: #f7f1df; }
.sf-dossier-sphere-icon .sf-icon { width: 17px; height: 17px; }
.sf-dossier-sphere > div { min-width: 0; }
.sf-dossier-sphere > div > small { display: block; margin: 0 0 4px 3px; color: #8f9299; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.sf-dossier-sphere p { margin: 5px 0 0 3px; color: #898d95; font-size: 9px; }
.sf-icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #e1d8be; border-radius: 50%; color: var(--sf-gold-deep); background: #fffaf0; cursor: pointer; transition: transform .14s ease, background .14s ease; }
.sf-icon-button:hover:not(:disabled) { transform: translateY(-1px); background: #f4e7ba; }
.sf-icon-button:disabled { color: #b6b8bd; border-color: #e2e3e6; background: #f4f5f6; cursor: not-allowed; }
.sf-icon-button .sf-icon { width: 16px; height: 16px; }
.sf-policy-card { display: flex; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 15px; color: #305348; background: #edf8f4; }
.sf-policy-card > .sf-icon { width: 20px; height: 20px; color: var(--sf-green); }
.sf-policy-card strong { display: block; font-size: 10.5px; }
.sf-policy-card p { margin: 3px 0 0; color: #6b7d77; font-size: 9.5px; line-height: 1.45; }

.sf-insight { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid #e6dfcc; border-radius: 16px; background: #fffaf0; }
.sf-insight > span { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 13px; color: var(--sf-gold-deep); background: #f4e9c8; }
.sf-insight > div { min-width: 0; }
.sf-insight small { display: block; color: #8b8170; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.sf-insight strong { display: block; margin-top: 3px; color: var(--sf-ink); font-size: 14px; }
.sf-insight p { margin: 5px 0 0; color: #75777d; font-size: 10px; line-height: 1.5; }
.sf-insight--regular { border-color: #c9e8dc; background: #f0faf6; }
.sf-insight--regular > span { color: var(--sf-green); background: #dff3eb; }
.sf-insight--irregular, .sf-insight--vencida { border-color: #efcac6; background: #fff4f2; }
.sf-insight--irregular > span, .sf-insight--vencida > span { color: var(--sf-red); background: #ffe5e1; }
.sf-insight--em_revisao { border-color: #d0daf0; background: #f3f6ff; }
.sf-insight--em_revisao > span { color: var(--sf-blue); background: #e4ebfb; }
.sf-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 2px 9px; }
.sf-section-title span { font-size: 8.5px; }
.sf-section-title h4 { margin: 0; color: var(--sf-ink); font-size: 12px; }
.sf-section-title b { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; color: var(--sf-gold-deep); background: #f4ead0; font-size: 10px; }
.sf-document-stack { display: grid; gap: 8px; }
.sf-document { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 12px; border: 1px solid #ebe7dd; border-radius: 15px; background: #fff; }
.sf-document.is-latest { border-color: #dfcb89; background: #fffdf6; box-shadow: inset 3px 0 #c9a227; }
.sf-document-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--sf-gold-deep); background: #f7f1df; }
.sf-document-icon .sf-icon { width: 17px; height: 17px; }
.sf-document-main { min-width: 0; }
.sf-document-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sf-document-title strong { overflow: hidden; color: #31333a; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.sf-document-title span { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; color: #806414; background: #f6e9bb; font-size: 6.8px; font-weight: 850; text-transform: uppercase; }
.sf-document-main > p { margin: 3px 0 7px; color: #8b8e95; font-size: 9px; }
.sf-document dl { display: flex; flex-wrap: wrap; gap: 7px 13px; margin: 0; }
.sf-document dl div { display: flex; align-items: center; gap: 4px; }
.sf-document dt { color: #92959c; font-size: 8.5px; }
.sf-document dd { margin: 0; color: #555961; font-size: 9px; font-weight: 700; }
.sf-document-main > small { display: block; margin-top: 7px; color: #7c7f86; font-size: 9px; line-height: 1.4; }

.sf-empty-state { display: grid; justify-items: center; padding: 34px 18px; border: 1px dashed #d9d3c3; border-radius: 16px; color: #858991; text-align: center; background: #fbfaf7; }
.sf-empty-state .sf-icon { width: 29px; height: 29px; margin-bottom: 9px; color: #b19b5a; }
.sf-empty-state strong { color: #53565d; font-size: 11px; }
.sf-empty-state p { max-width: 380px; margin: 5px 0 0; font-size: 9px; line-height: 1.5; }
.sf-empty-state--list { min-height: 260px; align-content: center; border: 0; border-radius: 0; }
.sf-empty-state--error .sf-icon { color: var(--sf-red); }

.sf-loading { display: grid; justify-items: center; gap: 9px; color: #777b84; text-align: center; }
.sf-loading > span { width: 34px; height: 34px; border: 3px solid #eee5c8; border-top-color: var(--sf-gold); border-radius: 50%; animation: sf-spin .8s linear infinite; }
.sf-loading strong { color: #4d5057; font-size: 11px; }
.sf-loading small { color: #999ca3; font-size: 8.5px; }
.sf-loading-page { min-height: 430px; align-content: center; }
.sf-error { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 400px; padding: 30px; color: #7f858e; text-align: center; }
.sf-error > .sf-icon { width: 34px; height: 34px; color: var(--sf-red); }
.sf-error strong { color: #3e4148; font-size: 14px; }
.sf-error span { font-size: 10px; }

/* Federal — carteira compacta, dossiê analítico e sincronização auditável. */
.sf-sync-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  margin-bottom: 12px;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid #e4ddcb;
  border-radius: 17px;
  color: #6b624e;
  background: linear-gradient(115deg, #fffdf7, #f8f4e8);
}
.sf-sync-strip > .sf-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.sf-sync-strip > div { display: grid; min-width: 0; flex: 1; }
.sf-sync-strip strong { color: #343128; font-size: 11px; }
.sf-sync-strip small { overflow: hidden; margin-top: 2px; color: #858078; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.sf-sync-strip--ready { color: var(--sf-green); border-color: #c8e5da; background: #f1faf6; }
.sf-sync-strip--running { color: var(--sf-gold-deep); border-color: #e8d28d; background: #fffae9; }
.sf-sync-strip--running > .sf-icon { animation: sf-spin 1.1s linear infinite; }
.sf-sync-strip--done { color: var(--sf-green); border-color: #c8e5da; background: #f1faf6; }
.sf-sync-strip--error { color: var(--sf-red); border-color: #efcac6; background: #fff4f2; }
.sf-sync-strip--offline { color: #737781; border-color: #dfe1e5; background: #f6f7f8; }
.sf-sync-progress { height: 4px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: rgba(122, 98, 24, .13); }
.sf-sync-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #997319, #ddb943); transition: width .25s ease; }

.sf-filterbar--federal { grid-template-columns: minmax(280px, 1fr) minmax(190px, 235px) auto; }
.sf-sync-all { min-width: 164px; white-space: nowrap; }
.sf-workspace--federal { grid-template-columns: minmax(520px, .96fr) minmax(440px, 1.04fr); }
.sf-federal-roster > header { min-height: 59px; padding-block: 11px; }
.sf-federal-roster .sf-roster-list { max-height: min(67vh, 820px); }
.sf-federal-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 116px;
  padding: 9px 10px 10px 12px;
  border: 0;
  border-bottom: 1px solid #f0ede5;
  color: inherit;
  background: #fff;
  cursor: pointer;
  transition: background .14s ease, box-shadow .14s ease, transform .14s ease;
}
.sf-federal-row:hover { z-index: 1; background: #fffcf4; }
.sf-federal-row.is-selected { z-index: 2; background: linear-gradient(90deg, #fff8df, #fff); box-shadow: inset 4px 0 var(--sf-gold); }
.sf-federal-row:last-child { border-bottom: 0; }
.sf-federal-row .sf-client-identity { grid-column: 1 / -1; gap: 8px; }
.sf-federal-row .sf-client-identity > b { width: 34px; height: 34px; border-radius: 11px; }
.sf-federal-row .sf-client-identity strong { font-size: 10.5px; }
.sf-federal-row .sf-client-identity small { margin-top: 2px; font-size: 8.7px; }
.sf-federal-evidence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 64px;
  overflow: hidden;
  padding: 8px 8px 8px 11px;
  border: 1px solid #e7e4dc;
  border-radius: 14px;
  background: #fafafa;
}
.sf-federal-evidence-copy { min-width: 0; }
.sf-federal-evidence-copy small,
.sf-federal-evidence-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-evidence-copy small { color: #767a83; font-size: 9px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.sf-federal-evidence-copy strong {
  display: -webkit-box;
  min-height: 24px;
  margin-top: 3px;
  overflow: hidden;
  color: #555961;
  font-size: 10px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.sf-federal-evidence-copy em { margin-top: 3px; color: #898d95; font-size: 8px; font-style: normal; }
.sf-federal-evidence--success { border-color: #cce7dd; background: #f4fbf8; box-shadow: inset 3px 0 var(--sf-green); }
.sf-federal-evidence--success strong { color: #087355; }
.sf-federal-evidence--success-attention { border-color: #cce7dd; background: #f4fbf8; box-shadow: inset 4px 0 var(--sf-amber); }
.sf-federal-evidence--success-attention strong { color: #087355; }
.sf-federal-evidence--attention { border-color: #ead8ad; background: #fffaf0; box-shadow: inset 3px 0 var(--sf-amber); }
.sf-federal-evidence--attention strong { color: #95600a; }
.sf-federal-evidence--danger { border-color: #efcfcb; background: #fff7f5; box-shadow: inset 3px 0 var(--sf-red); }
.sf-federal-evidence--danger strong { color: #ad3030; }
.sf-federal-evidence--missing { border-style: dashed; }
.sf-pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #dfcd91;
  border-radius: 999px;
  color: var(--sf-gold-deep);
  background: #fffaf0;
  cursor: pointer;
}
.sf-pdf-button .sf-icon { width: 18px; height: 18px; }
.sf-pdf-button:hover:not(:disabled) { color: #fff; background: var(--sf-ink); }
.sf-pdf-button:disabled { color: #adb0b6; border-color: #e1e3e6; background: #f3f4f5; cursor: not-allowed; }

.sf-federal-dossier .sf-dossier-body { max-height: min(72vh, 850px); }
.sf-federal-dossier-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.sf-federal-dossier-actions .sf-button { min-height: 38px; padding-inline: 15px; font-size: 10px; }
.sf-federal-document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 9px; }
.sf-federal-document {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  border: 1px solid #e2dccd;
  border-radius: 17px;
  color: #5e6169;
  text-align: left;
  background: #fff;
}
button.sf-federal-document { cursor: pointer; }
.sf-federal-document > span { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 13px; color: var(--sf-gold-deep); background: #f6edcf; }
.sf-federal-document > span .sf-icon { width: 18px; height: 18px; }
.sf-federal-document > div { min-width: 0; }
.sf-federal-document small,
.sf-federal-document strong,
.sf-federal-document p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-document small { color: #9a8243; font-size: 7.4px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.sf-federal-document strong { margin-top: 3px; color: #34372f; font-size: 10px; }
.sf-federal-document p { margin: 4px 0 0; color: #8b8f97; font-size: 8px; }
.sf-federal-document > .sf-icon { width: 16px; height: 16px; color: #a88b35; }
.sf-federal-document--success { border-color: #c7e4d9; background: #f5fbf8; }
.sf-federal-document--success-attention { border-color: #c7e4d9; background: #f5fbf8; box-shadow: inset 4px 0 var(--sf-amber); }
.sf-federal-document--danger { border-color: #ecc9c5; background: #fff6f4; }
.sf-federal-document--attention { border-color: #e6d39e; background: #fffaf0; }
.sf-federal-document--missing { border-style: dashed; background: #fafafa; }
button.sf-federal-document:hover { color: #fff; border-color: var(--sf-ink); background: var(--sf-ink); }
button.sf-federal-document:hover strong,
button.sf-federal-document:hover p,
button.sf-federal-document:hover small,
button.sf-federal-document:hover > .sf-icon { color: #fff; }
.sf-federal-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid #e4d8ae;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffcf1, #fff);
}
.sf-federal-status-card > div { min-width: 0; }
.sf-federal-status-card small { color: #9b7d28; font-size: 8.5px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.sf-federal-status-card strong { display: block; margin-top: 4px; color: var(--sf-ink); font-size: clamp(18px, 2.2vw, 27px); line-height: 1.06; letter-spacing: -.035em; }
.sf-federal-status-card p { margin: 7px 0 0; color: #7c8088; font-size: 9.5px; line-height: 1.45; }
.sf-federal-status-card > span { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; border-radius: 18px; color: var(--sf-gold-deep); background: #f7edcd; }
.sf-federal-status-card > span .sf-icon { width: 27px; height: 27px; }
.sf-federal-status-card--success { border-color: #bfe2d5; background: linear-gradient(135deg, #effaf6, #fff); }
.sf-federal-status-card--success > span { color: var(--sf-green); background: #daf1e8; }
.sf-federal-status-card--success-attention { border-color: #bfe2d5; background: linear-gradient(135deg, #effaf6, #fff); box-shadow: inset 5px 0 var(--sf-amber); }
.sf-federal-status-card--success-attention > span { color: var(--sf-amber); background: #f8eac1; }
.sf-federal-status-card--danger { border-color: #ecc4c0; background: linear-gradient(135deg, #fff1ef, #fff); }
.sf-federal-status-card--danger > span { color: var(--sf-red); background: #ffe1de; }
.sf-federal-status-card--attention { border-color: #ebd096; background: linear-gradient(135deg, #fff8e5, #fff); }
.sf-federal-status-card--attention > span { color: var(--sf-amber); background: #f8eac1; }
.sf-federal-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.sf-federal-mini-grid article { min-width: 0; padding: 12px; border: 1px solid #ebe7dd; border-radius: 15px; background: #fff; }
.sf-federal-mini-grid small,
.sf-federal-mini-grid span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-mini-grid small { color: #96999f; font-size: 7.8px; font-weight: 800; text-transform: uppercase; }
.sf-federal-mini-grid strong { display: block; margin-top: 3px; overflow: hidden; color: #242720; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-mini-grid span { margin-top: 3px; color: #898d94; font-size: 7.8px; }
.sf-federal-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.sf-federal-source-grid article { min-width: 0; padding: 10px 12px; border-radius: 14px; color: #d7d4c8; background: linear-gradient(145deg, #24241d, #171713); }
.sf-federal-source-grid span { display: block; color: #c4a540; font-size: 7.8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sf-federal-source-grid strong { display: block; overflow: hidden; margin-top: 4px; color: #f6f4ec; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-conclusions { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.sf-federal-conclusions li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 11px; border: 1px solid #e9e3d3; border-radius: 13px; color: #646870; background: #fffdf8; font-size: 9.5px; line-height: 1.45; }
.sf-federal-conclusions .sf-icon { width: 14px; height: 14px; flex: 0 0 auto; color: var(--sf-green); }
.sf-document-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #decb87;
  border-radius: 15px;
  color: var(--sf-gold-deep);
  text-align: left;
  background: #fffaf0;
  cursor: pointer;
}
.sf-document-link > .sf-icon { width: 18px; height: 18px; }
.sf-document-link span { min-width: 0; }
.sf-document-link small,
.sf-document-link strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-document-link small { color: #9a8b64; font-size: 7.5px; text-transform: uppercase; }
.sf-document-link strong { margin-top: 2px; color: #49463e; font-size: 9.5px; }
.sf-document-link:hover { color: #fff; border-color: var(--sf-ink); background: var(--sf-ink); }
.sf-document-link:hover small,
.sf-document-link:hover strong { color: #fff; }
.sf-federal-empty { min-height: 380px; align-content: center; }
.sf-federal-loading { min-height: 380px; align-content: center; }

.sf-federal-dashboard-bg { z-index: 99996; padding: 12px; }
.sf-federal-dashboard {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1500px, calc(100vw - 24px));
  height: min(940px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid rgba(224, 188, 68, .48);
  border-radius: 24px;
  background: #f4f2eb;
  box-shadow: 0 36px 100px rgba(0,0,0,.48);
}
.sf-federal-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 16px 19px;
  color: #fff;
  background: radial-gradient(circle at 78% 10%, rgba(201,162,39,.19), transparent 35%), linear-gradient(135deg, #171711, #29281f);
}
.sf-federal-dashboard-head > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sf-federal-dashboard-head > div:first-child > span { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border: 1px solid rgba(226,191,75,.36); border-radius: 16px; color: #e4c552; background: rgba(201,162,39,.1); }
.sf-federal-dashboard-head > div:first-child > span .sf-icon { width: 24px; height: 24px; }
.sf-federal-dashboard-head small { color: #c8a63a; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.sf-federal-dashboard-head h2 { overflow: hidden; max-width: min(62vw, 850px); margin: 2px 0 0; color: #fff; font-size: clamp(18px, 2vw, 27px); text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-dashboard-head p { margin: 4px 0 0; color: #aaa99f; font-size: 12px; }
.sf-federal-dashboard-head > div:last-child button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 0 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #eeeae0; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 800; cursor: pointer; }
.sf-federal-dashboard-head > div:last-child button:hover { color: #fff; border-color: rgba(224,188,68,.55); background: rgba(201,162,39,.13); }
.sf-federal-dashboard-head > div:last-child button:last-child { width: 39px; padding: 0; }
.sf-federal-dashboard-head button .sf-icon { width: 15px; height: 15px; }
.sf-federal-dashboard-body { min-height: 0; overflow: auto; padding: 15px; scrollbar-color: #c5b889 transparent; scrollbar-width: thin; }
.sf-federal-dashboard-proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.sf-federal-dashboard-proof article { min-width: 0; min-height: 0; padding: 16px; border: 1px solid #e1dac7; border-radius: 19px; background: #fff; box-shadow: 0 7px 20px rgba(39,35,23,.045); }
.sf-federal-dashboard-proof article > header { display: flex; align-items: center; gap: 8px; }
.sf-federal-dashboard-proof article > header > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; color: #876a1b; background: #f4e9c7; }
.sf-federal-dashboard-proof article > header .sf-icon { width: 16px; height: 16px; }
.sf-federal-dashboard-proof article > header small { color: #978048; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sf-federal-dashboard-proof article > strong { display: block; margin-top: 11px; color: #292b25; font-size: 18px; letter-spacing: -.02em; }
.sf-federal-dashboard-proof article > p { margin: 6px 0 0; color: #777b84; font-size: 12px; line-height: 1.5; }
.sf-federal-dashboard-proof article > small { display: block; margin-top: 7px; color: #8e7540; font-size: 11px; }
.sf-federal-dashboard-proof--success { border-color: #bfe0d4 !important; background: linear-gradient(135deg, #effaf6, #fff) !important; }
.sf-federal-dashboard-proof--success-attention { border-color: #bfe0d4 !important; background: linear-gradient(135deg, #effaf6, #fff) !important; box-shadow: inset 5px 0 var(--sf-amber), 0 7px 20px rgba(39,35,23,.045) !important; }
.sf-federal-dashboard-proof--danger { border-color: #ebc7c3 !important; background: linear-gradient(135deg, #fff2f0, #fff) !important; }
.sf-federal-dashboard-proof--attention { border-color: #e7d29f !important; background: linear-gradient(135deg, #fff9e8, #fff) !important; }
.sf-federal-dashboard-proof--missing { border-style: dashed !important; background: #fafafa !important; }
.sf-federal-dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sf-federal-dashboard-kpis article { min-width: 0; min-height: 112px; padding: 15px; border: 1px solid #e5decb; border-radius: 18px; background: #fff; box-shadow: 0 7px 20px rgba(39,35,23,.055); }
.sf-federal-dashboard-kpis article:first-child { color: #fff; border-color: #2c2b22; background: linear-gradient(145deg, #27271f, #151511); }
.sf-federal-dashboard-kpis small { display: block; color: #a38a46; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sf-federal-dashboard-kpis strong { display: block; overflow: hidden; margin-top: 6px; color: #242620; font-size: clamp(17px, 1.8vw, 25px); letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-dashboard-kpis article:first-child strong { color: #f4d15f; }
.sf-federal-dashboard-kpis span { display: block; overflow: hidden; margin-top: 7px; color: #858991; font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-dashboard-kpis article:first-child span { color: #b9b7ad; }
.sf-federal-dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 10px; margin-top: 10px; }
.sf-federal-dashboard-panel { min-width: 0; padding: 15px; border: 1px solid #e3dcc9; border-radius: 18px; background: #fff; box-shadow: 0 7px 20px rgba(39,35,23,.045); }
.sf-federal-dashboard-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sf-federal-dashboard-panel > header small { display: block; color: #a18843; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sf-federal-dashboard-panel > header h3 { margin: 2px 0 0; color: #272922; font-size: 15px; }
.sf-federal-dashboard-panel > header b { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 8px; border-radius: 999px; color: #765b14; background: #f3e8c5; font-size: 11px; }
.sf-federal-chart-row + .sf-federal-chart-row { margin-top: 11px; }
.sf-federal-chart-row header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.sf-federal-chart-row strong { overflow: hidden; color: #454840; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sf-federal-debt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.sf-federal-debt-cards article { display: grid; gap: 3px; padding: 10px; border: 1px solid #e7e2d8; border-radius: 10px; background: #fff; }
.sf-federal-debt-cards small, .sf-federal-debt-cards span { color: #777b83; font-size: 11px; }
.sf-federal-debt-cards strong { color: #454840; font-size: 15px; }
.sf-federal-chart-row span { flex: 0 0 auto; color: #777b83; font-size: 11px; font-variant-numeric: tabular-nums; }
.sf-federal-chart-row > div { height: 7px; overflow: hidden; border-radius: 999px; background: #eeeae0; }
.sf-federal-chart-row > div i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #987218, #ddb73e); }
.sf-federal-no-data { margin: 0; padding: 14px; border: 1px dashed #ddd6c4; border-radius: 13px; color: #898d94; text-align: center; font-size: 11px; }
.sf-federal-dashboard-timeline,
.sf-federal-dashboard-conclusions { margin-top: 10px; }
.sf-federal-table-wrap { overflow: auto; border: 1px solid #e8e2d4; border-radius: 14px; }
.sf-federal-table-wrap table { width: 100%; min-width: 1120px; border-collapse: collapse; color: #4e525a; font-size: 11px; font-variant-numeric: tabular-nums; }
.sf-federal-table-wrap th { position: sticky; top: 0; z-index: 1; padding: 10px; color: #756632; text-align: left; background: #faf5e6; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.sf-federal-table-wrap td { padding: 10px; border-top: 1px solid #eeeae0; vertical-align: top; }
.sf-federal-table-wrap tbody tr:hover { background: #fffcf4; }
.sf-federal-table-wrap td strong,
.sf-federal-table-wrap td small { display: block; }
.sf-federal-table-wrap td small { max-width: 260px; margin-top: 3px; color: #8e9299; font-size: 11px; line-height: 1.35; }
.sf-federal-table-tag { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px; color: #725914; background: #f5ebcb; font-size: 10px; font-weight: 850; white-space: nowrap; }
.sf-federal-table-wrap td button { min-width: 34px; min-height: 27px; border: 1px solid #ddc980; border-radius: 999px; color: #765b14; background: #fff9e9; font-size: 10px; font-weight: 800; cursor: pointer; }
.sf-federal-dashboard-conclusions ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sf-federal-dashboard-conclusions li { display: flex; gap: 9px; padding: 11px 12px; border: 1px solid #e8e2d2; border-radius: 14px; color: #646870; background: #fffdf7; font-size: 12px; line-height: 1.5; }
.sf-federal-dashboard-conclusions li .sf-icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--sf-gold-deep); }

.sf-preview-bg {
  position: fixed;
  inset: 0;
  z-index: 99994;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(11, 11, 9, .75);
  backdrop-filter: blur(7px);
}
.sf-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1160px, calc(100vw - 44px));
  height: min(820px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid rgba(225, 194, 86, .5);
  border-radius: 22px;
  background: #f5f3ed;
  box-shadow: 0 34px 90px rgba(0,0,0,.46);
  transition: width .2s ease, height .2s ease, border-radius .2s ease;
}
.sf-preview.is-expanded { width: calc(100vw - 18px); height: calc(100vh - 18px); border-radius: 16px; }
.sf-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; padding: 12px 14px 12px 18px; color: #fff; background: linear-gradient(135deg, #191913, #28271e); }
.sf-preview > header > div:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sf-preview > header > div:first-child > span { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 13px; color: #e5c455; background: rgba(201,162,39,.12); }
.sf-preview header small { display: block; color: #c8a63a; font-size: 7.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sf-preview header strong { display: block; overflow: hidden; max-width: min(55vw, 650px); margin-top: 2px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sf-preview-actions { display: flex; align-items: center; gap: 7px; }
.sf-preview-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: #e9e8e1; background: rgba(255,255,255,.06); font-size: 9px; font-weight: 750; cursor: pointer; }
.sf-preview-actions button:hover { color: #fff; border-color: rgba(226,189,68,.55); background: rgba(201,162,39,.13); }
.sf-preview-actions button:last-child { width: 38px; padding: 0; }
.sf-preview-actions .sf-icon { width: 15px; height: 15px; }
.sf-button:focus-visible,
.sf-tabs button:focus-visible,
.sf-search button:focus-visible,
.sf-icon-button:focus-visible,
.sf-client-row:focus-visible,
.sf-federal-row:focus-visible,
.sf-pdf-button:focus-visible,
.sf-federal-document:focus-visible,
.sf-document-link:focus-visible,
.sf-select select:focus-visible,
.sf-preview-actions button:focus-visible,
.sf-federal-dashboard button:focus-visible {
  outline: 3px solid rgba(219, 177, 48, .7);
  outline-offset: 2px;
}
.sf-preview-body { min-height: 0; overflow: auto; background: #deddd8; }
.sf-preview-body > .sf-loading { height: 100%; align-content: center; }
.sf-preview-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.sf-image-preview { display: grid; place-items: center; min-height: 100%; padding: 22px; }
.sf-image-preview img { display: block; max-width: 100%; max-height: calc(100vh - 150px); border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.22); }

@keyframes sf-spin { to { transform: rotate(360deg); } }

@media (max-width: 1220px) {
  .sf-workspace { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr); }
  .sf-workspace--federal { grid-template-columns: minmax(470px, .95fr) minmax(0, 1.05fr); }
  .sf-kpis--federal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sf-client-row { grid-template-columns: minmax(210px, 1fr) minmax(315px, 1.2fr) 18px; }
  .sf-federal-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-federal-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-status.is-compact span { overflow: hidden; max-width: 70px; text-overflow: ellipsis; }
  .sf-sphere-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .sf-page { max-width: 100%; padding-inline: 14px; overflow-x: clip; }
  .sf-hero { align-items: flex-start; padding: 24px; }
  .sf-hero-actions { flex-direction: column; align-items: stretch; }
  .sf-tabs { width: auto; margin-right: 14px; margin-left: 14px; }
  .sf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-workspace { grid-template-columns: 1fr; }
  .sf-workspace--federal { grid-template-columns: minmax(0, 1fr); }
  .sf-dossier { position: static; }
  .sf-roster { max-height: min(68vh, 748px); }
  .sf-roster-list,
  .sf-federal-roster .sf-roster-list { max-height: min(calc(68vh - 68px), 680px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .sf-dossier-body { max-height: none; }
  .sf-filterbar { grid-template-columns: minmax(0, 1fr) minmax(170px, 220px); }
  .sf-filterbar--federal { grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto; }
  .sf-federal-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-integrity-note { display: none; }
  .sf-client-row,
  .sf-client-row--sphere { grid-template-columns: minmax(0, 1fr) 18px; gap: 9px; }
  .sf-client-statuses { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; padding-left: 48px; }
  .sf-client-statuses > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
  .sf-client-statuses > span > small { margin: 0; }
  .sf-client-row > .sf-row-arrow { grid-column: 2; grid-row: 1; }
  .sf-sphere-result { grid-column: 1 / -1; grid-row: 2; min-width: 0; padding-left: 48px; }
}

@media (max-width: 720px) {
  .sf-page { padding: 10px 9px 26px; }
  .sf-hero { display: grid; min-height: 0; padding: 19px; border-radius: 20px; }
  .sf-hero-main { align-items: flex-start; }
  .sf-hero-icon { width: 52px; height: 52px; border-radius: 17px; }
  .sf-hero-icon .sf-icon { width: 27px; height: 27px; }
  .sf-hero-main p { font-size: 11px; }
  .sf-hero-actions { flex-direction: row; }
  .sf-readonly { display: none; }
  .sf-tabs { width: auto; margin: -13px 9px 14px; border-radius: 18px; }
  .sf-tabs button { flex: 0 0 auto; }
  .sf-kpis, .sf-sphere-overview { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sf-kpi { min-height: 91px; padding: 13px; border-radius: 16px; }
  .sf-kpi-icon { width: 38px; height: 38px; border-radius: 13px; }
  .sf-kpi-copy strong { font-size: 20px; }
  .sf-filterbar { grid-template-columns: 1fr; border-radius: 17px; }
  .sf-filterbar--federal { grid-template-columns: 1fr; }
  .sf-sync-all { width: 100%; }
  .sf-sync-strip { align-items: flex-start; }
  .sf-sync-strip small { white-space: normal; }
  .sf-federal-roster > header > small { display: none; }
  .sf-federal-dossier-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .sf-federal-status-card { min-height: 104px; padding: 14px; }
  .sf-federal-status-card > span { width: 45px; height: 45px; border-radius: 15px; }
  .sf-federal-mini-grid { grid-template-columns: 1fr 1fr; }
  .sf-federal-source-grid { grid-template-columns: 1fr; }
  .sf-federal-dashboard-bg { padding: 5px; }
  .sf-federal-dashboard { width: calc(100vw - 10px); height: calc(100vh - 10px); border-radius: 16px; }
  .sf-federal-dashboard-head { align-items: flex-start; min-height: 106px; padding: 13px; }
  .sf-federal-dashboard-head > div:first-child > span { display: none; }
  .sf-federal-dashboard-head h2 { max-width: 54vw; font-size: 16px; }
  .sf-federal-dashboard-head p { max-width: 54vw; }
  .sf-federal-dashboard-head > div:last-child button:not(:last-child) { width: 38px; padding: 0; font-size: 0; }
  .sf-federal-dashboard-kpis,
  .sf-federal-dashboard-grid { grid-template-columns: 1fr; }
  .sf-federal-dashboard-conclusions ul { grid-template-columns: 1fr; }
  .sf-client-row, .sf-client-row--sphere { grid-template-columns: minmax(0, 1fr) 18px; gap: 9px; }
  .sf-client-statuses { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; padding-left: 48px; }
  .sf-client-statuses > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
  .sf-client-statuses > span > small { margin: 0; }
  .sf-client-row > .sf-row-arrow { grid-column: 2; grid-row: 1; }
  .sf-sphere-result { grid-column: 1 / -1; grid-row: 2; padding-left: 48px; }
  .sf-dossier-head { grid-template-columns: auto minmax(0, 1fr); }
  .sf-dossier-head > .sf-status { grid-column: 1 / -1; justify-self: start; margin-left: 54px; }
  .sf-preview-bg { padding: 8px; }
  .sf-preview, .sf-preview.is-expanded { width: calc(100vw - 16px); height: calc(100vh - 16px); border-radius: 16px; }
  .sf-preview-actions button span { display: none; }
  .sf-preview-actions button { width: 36px; min-width: 36px; padding: 0; }
}

@media (max-width: 480px) {
  .sf-hero-main { display: grid; }
  .sf-hero-actions .sf-button { width: 100%; }
  .sf-kpis, .sf-sphere-overview { grid-template-columns: 1fr; }
  .sf-kpi { min-height: 82px; }
  .sf-sphere-card footer { font-size: 8px; }
  .sf-roster > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .sf-client-statuses { padding-left: 0; }
  .sf-dossier-head > .sf-status { margin-left: 0; }
  .sf-federal-row { grid-template-columns: 1fr; }
  .sf-federal-row .sf-client-identity { grid-column: 1; }
  .sf-federal-document-grid,
  .sf-federal-dashboard-proof { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #situacao-fiscal-root *, .sf-preview-bg * { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
