/* gvdesenrola — gov.br Design System Styles */

:root {
  --gov-blue: #1351b4;
  --gov-blue-dark: #0c326f;
  --gov-blue-navy: #071d41;
  --gov-blue-soft: #eff6ff;
  --gov-blue-border: #bfdbfe;
  --gov-green: #168821;
  --gov-green-soft: #ecfdf5;
  --gov-yellow: #ffcd07;
  --gov-gold: #fdb913;
  --gov-bg: #f0f2f5;
  --gov-card-bg: #ffffff;
  --gov-border: #d1d5db;
  --gov-text-dark: #1a1a1a;
  --gov-text-body: #334155;
  --gov-text-muted: #64748b;
  --hdr-icon: #1351b4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--gov-blue-navy);
}

body {
  font-family: "Rawline", "Inter", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gov-bg);
  color: var(--gov-text-dark);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Modo escuro (botão contraste) */
html.theme-dark {
  background: #0a0a0a;
}

html.theme-dark body {
  background: #1b1b1b;
  color: #e8e8e8;
}

html.theme-dark .barra-brasil-topo {
  background: #000;
  border-bottom-color: #333;
}

html.theme-dark .hdr {
  background: #252525;
  border-bottom-color: #333;
}

html.theme-dark .hdr-logo-img,
html.theme-dark .ft-gov-img {
  filter: brightness(1.15);
}

html.theme-dark .crumb {
  background: #071d41;
  color: #d1d5db;
}

html.theme-dark .card-main {
  background: #262626;
  border-color: #3f3f46;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

html.theme-dark .gov-instrucao-box .instrucao-titulo {
  color: #7eb8ff;
}

html.theme-dark .gov-instrucao-box .instrucao-texto {
  color: #d4d4d8;
}

html.theme-dark .field-label {
  color: #e4e4e7;
}

html.theme-dark .input-container {
  background: #18181b;
  border-color: #52525b;
}

html.theme-dark input.input-cpf {
  background: transparent;
  color: #ffffff;
}

html.theme-dark .info-box {
  background: #1e293b;
  border-color: #3b82f6;
}

html.theme-dark .info-box p,
html.theme-dark .info-box strong {
  color: #f1f5f9;
}

html.theme-dark .trust-badges,
html.theme-dark .trust-sub {
  color: #a1a1aa;
}

html.theme-dark .site-ft {
  background: #090e17;
}

html.theme-dark .copy-block {
  background: #04070c;
}

/* ===== BARRA BRASIL ===== */
.barra-brasil-topo {
  background: #000000;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 16px;
  border-bottom: 1px solid #1f2937;
  width: 100%;
}

.barra-brasil-topo-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.barra-brasil-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.flag-icon-svg {
  display: inline-block;
  vertical-align: middle;
  border-radius: 1.5px;
  flex-shrink: 0;
}

.barra-brasil-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.barra-brasil-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 10px;
  transition: color 0.15s;
}

.barra-brasil-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 540px) {
  .barra-brasil-links { display: none; }
}

/* Wrapper */
.page-wrap {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* Header */
.hdr {
  width: 100%;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 10px 16px;
  border-bottom: 2.5px solid var(--gov-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hdr-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.hdr-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}

.hdr-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.hdr-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hdr-icon);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.hdr-icon-btn:hover {
  background: var(--gov-blue-soft);
  border-color: var(--gov-blue-border);
}

.hdr-vsep {
  width: 1px;
  height: 18px;
  background: #cbd5e1;
  flex-shrink: 0;
  margin: 0 2px;
}

/* Breadcrumbs */
.crumb {
  width: 100%;
  background: #e2e8f0;
  color: #475569;
  padding: 7px 16px;
  font-size: 11.5px;
  font-weight: 500;
  border-bottom: 1px solid #cbd5e1;
}

.crumb span {
  color: #94a3b8;
  margin: 0 2px;
}

.crumb strong {
  color: var(--gov-blue);
  font-weight: 700;
}

/* Card Principal */
.card-main {
  background: #fff;
  margin: 16px;
  padding: 24px 20px 28px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  position: relative;
  text-align: center;
}

.dept-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gov-blue-soft);
  color: var(--gov-blue);
  border: 1px solid var(--gov-blue-border);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.dept-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gov-green);
}

.limpe-logo {
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto 16px;
  display: block;
}

.gov-instrucao-box {
  margin-bottom: 20px;
}

.instrucao-titulo {
  font-size: 18px;
  font-weight: 800;
  color: var(--gov-text-dark);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.instrucao-texto {
  font-size: 13.5px;
  color: var(--gov-text-body);
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

/* Formulário e Campo de Entrada */
.field-wrap {
  text-align: left;
  margin-bottom: 18px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gov-text-dark);
  margin-bottom: 6px;
  display: block;
}

.input-container {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--gov-border);
  border-radius: 10px;
  padding: 0 14px;
  transition: all 0.2s;
}

.input-container:focus-within {
  border-color: var(--gov-blue);
  box-shadow: 0 0 0 3px rgba(19, 81, 180, 0.15);
}

.input-icon {
  width: 20px;
  height: 20px;
  color: var(--gov-text-muted);
  flex-shrink: 0;
  margin-right: 10px;
}

input.input-cpf {
  width: 100%;
  height: 50px;
  border: none;
  outline: none;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  color: var(--gov-text-dark);
  letter-spacing: 0.05em;
  background: transparent;
}

.field-hint {
  font-size: 11.5px;
  color: var(--gov-text-muted);
  margin-top: 5px;
  display: block;
}

/* Botão Principal Gov.br */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: var(--gov-blue);
  color: #fff !important;
  border: none;
  border-radius: 26px;
  font-size: 14.5px;
  font-weight: 800;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(19, 81, 180, 0.3);
}

.btn-primary:hover {
  background: var(--gov-blue-dark);
  box-shadow: 0 6px 18px rgba(19, 81, 180, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Bloco Informativo */
.info-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--gov-blue-soft);
  border: 1px solid var(--gov-blue-border);
  border-radius: 10px;
  margin-top: 20px;
  text-align: left;
}

.ico-i-wrapper {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gov-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  font-family: serif;
}

.info-box-content strong {
  display: block;
  font-size: 13px;
  color: var(--gov-blue-dark);
  margin-bottom: 2px;
}

.info-box-content p {
  font-size: 12.5px;
  color: var(--gov-text-body);
  line-height: 1.45;
}

/* Selos e Rodapé */
.trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 12px;
  color: var(--gov-text-body);
  font-weight: 600;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-ico {
  flex-shrink: 0;
  color: var(--gov-green);
}

.trust-sub {
  margin-top: 10px;
  font-size: 11px;
  color: var(--gov-text-muted);
  text-align: center;
  line-height: 1.5;
}

/* Footer */
footer.site-ft {
  background: var(--gov-blue-navy);
  color: #e2e8f0;
  text-align: left;
  font-size: 13px;
  margin-top: auto;
  padding: 20px 16px;
  width: 100%;
}

.site-ft-inner {
  max-width: 720px;
  margin: 0 auto;
}

.ft-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ft-gov-img {
  height: 36px;
  width: auto;
}

.ft-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
}

.ft-org {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-block {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.copy-block strong {
  color: #ffffff;
}

@media (max-width: 480px) {
  .card-main {
    margin: 10px;
    padding: 20px 14px;
  }
  
  .instrucao-titulo {
    font-size: 16.5px;
  }
}