:root {
  --sigsoft-bg: #f5f9ff;
  --sigsoft-primary: #0b5ed7;
  --sigsoft-primary-hover: #084298;
  --sigsoft-dark: #001f4f;
  --sigsoft-text: #1f2f46;
  --sigsoft-muted: #56657a;
  --sigsoft-border: #dbe3ee;
  --sigsoft-white: #ffffff;
  --sigsoft-success: #168821;
  --sigsoft-danger: #e52207;
  --sigsoft-warning: #a56300;
  --sigsoft-focus: #ffcd07;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--sigsoft-bg);
  color: var(--sigsoft-text);
  font-family: Rawline, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--sigsoft-primary);
}

button,
input,
select,
textarea {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--sigsoft-focus);
  outline-offset: 3px;
}

.container-lg {
  width: calc(100% - 32px);
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.template-base {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* ==================================================
   ACESSIBILIDADE
================================================== */

.sigsoft-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--sigsoft-focus);
  color: #000000;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.sigsoft-skip-link:focus {
  transform: translateY(0);
}

/* ==================================================
   CABEÇALHO
================================================== */

.sigsoft-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--sigsoft-border);
  background: var(--sigsoft-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.sigsoft-government-bar {
  display: flex;
  min-height: 38px;
  padding: 4px 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sigsoft-government-logo {
  display: inline-flex;
  align-items: center;
}

.sigsoft-government-logo img {
  width: auto;
  max-height: 28px;
}

.sigsoft-government-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 14px;
}

.sigsoft-government-links a {
  padding: 0;
  color: var(--sigsoft-dark);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sigsoft-government-links a:hover {
  text-decoration: underline;
}

.sigsoft-contrast-button {
  display: inline-grid;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e7f0ff;
  color: var(--sigsoft-dark);
  cursor: pointer;
  place-items: center;
}

.sigsoft-header-divider,
.sigsoft-footer-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--sigsoft-border);
}

.sigsoft-brand {
  display: flex;
  min-height: 78px;
  padding: 10px 0 14px;
  align-items: center;
  gap: 16px;
}

.sigsoft-brand-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.sigsoft-brand-logo img {
  width: 145px;
  max-width: 34vw;
  height: auto;
}

.sigsoft-brand-text {
  display: flex;
  flex-direction: column;
  color: var(--sigsoft-muted);
  font-size: 13px;
  line-height: 1.35;
}

.sigsoft-brand-text strong {
  color: var(--sigsoft-text);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.2;
}

/* ==================================================
   CONTEÚDO PRINCIPAL
================================================== */

.sigsoft-main {
  display: flex;
  padding: 18px 0;
  flex: 1;
  align-items: center;
  background: var(--sigsoft-bg);
}

.sigsoft-messages {
  display: grid;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 16px;
  gap: 10px;
}

.sigsoft-alert {
  padding: 12px 14px;
  border: 1px solid var(--sigsoft-border);
  border-left: 5px solid var(--sigsoft-primary);
  border-radius: 8px;
  background: var(--sigsoft-white);
  color: var(--sigsoft-text);
}

.sigsoft-alert-success {
  border-left-color: var(--sigsoft-success);
}

.sigsoft-alert-error {
  border-left-color: var(--sigsoft-danger);
}

.sigsoft-alert-warning {
  border-left-color: var(--sigsoft-warning);
}

/* ==================================================
   CAPA DO SIGSOFT
================================================== */

.sigsoft-card {
  display: grid;
  width: 100%;
  max-width: 900px;
  min-height: 460px;
  margin: 0 auto;
  padding: 24px 28px;
  align-items: center;
  border: 1px solid var(--sigsoft-border);
  border-radius: 22px;
  background: var(--sigsoft-white);
  box-shadow: 0 12px 32px rgba(0, 31, 79, 0.08);
  gap: 22px;
  grid-template-columns: 1.05fr 0.95fr;
}

.sigsoft-card-brand {
  padding: 8px 22px 8px 4px;
  border-right: 1px solid var(--sigsoft-border);
  text-align: center;
}

.sigsoft-card-icon {
  display: block;
  margin-bottom: 12px;
  color: var(--sigsoft-primary);
  font-size: 40px;
}

.sigsoft-card-brand h1 {
  margin: 0;
  color: var(--sigsoft-dark);
  font-size: clamp(36px, 3.8vw, 46px);
  font-weight: 800;
  letter-spacing: 5px;
  line-height: 1;
}

.sigsoft-card-brand h2 {
  margin: 12px 0 0;
  color: var(--sigsoft-dark);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 500;
  line-height: 1.22;
}

.sigsoft-divider {
  display: block;
  width: 56px;
  height: 4px;
  margin: 16px auto;
  border-radius: 999px;
  background: var(--sigsoft-primary);
}

.sigsoft-card-brand > p {
  max-width: 450px;
  margin: 0 auto;
  color: var(--sigsoft-muted);
  font-size: 14px;
  line-height: 1.45;
}

.sigsoft-info {
  display: flex;
  margin-top: 16px;
  padding-top: 14px;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--sigsoft-border);
  color: var(--sigsoft-dark);
  font-size: 13px;
  font-weight: 600;
  gap: 12px 22px;
}

.sigsoft-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sigsoft-info i {
  color: var(--sigsoft-primary);
}

/* ==================================================
   CARD DE ENTRADA
================================================== */

.sigsoft-login-card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--sigsoft-border);
  border-radius: 20px;
  background: var(--sigsoft-white);
  text-align: center;
}

.sigsoft-login-icon {
  display: block;
  color: var(--sigsoft-primary);
  font-size: 38px;
}

.sigsoft-login-card h2 {
  margin: 16px 0 0;
  color: var(--sigsoft-dark);
  font-size: 24px;
  font-weight: 800;
}

.sigsoft-login-card > p {
  margin: 0 0 18px;
  color: var(--sigsoft-muted);
  font-size: 14px;
  line-height: 1.45;
}

.sigsoft-button,
.sigsoft-button-outline {
  display: flex;
  width: 100%;
  min-height: 54px;
  padding: 9px 14px;
  align-items: center;
  justify-content: space-between;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  gap: 12px;
  text-align: center;
  text-decoration: none;
}

.sigsoft-button {
  border: 2px solid var(--sigsoft-primary);
  background: var(--sigsoft-primary);
  color: var(--sigsoft-white);
}

.sigsoft-button-outline {
  border: 2px solid var(--sigsoft-primary);
  background: var(--sigsoft-white);
  color: var(--sigsoft-primary);
}

.sigsoft-button:hover {
  border-color: var(--sigsoft-primary-hover);
  background: var(--sigsoft-primary-hover);
  color: var(--sigsoft-white);
  text-decoration: none;
}

.sigsoft-button-outline:hover {
  background: #eef5ff;
  color: var(--sigsoft-primary);
  text-decoration: none;
}

.sigsoft-button > div,
.sigsoft-button > span,
.sigsoft-button-outline > div,
.sigsoft-button-outline > span {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  text-align: center;
}

.sigsoft-button small,
.sigsoft-button-outline small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
}

/* ==================================================
   RODAPÉ
================================================== */

.sigsoft-footer {
  border-top: 1px solid var(--sigsoft-border);
  background: var(--sigsoft-white);
}

.sigsoft-footer-logos {
  display: grid;
  width: 100%;
  padding: 24px 20px;
  align-items: center;
  justify-items: center;
  gap: clamp(8px, 2vw, 32px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sigsoft-footer-logos > a {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 78px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
}

.sigsoft-footer-logos > a > img {
  display: block;
  width: auto;
  max-width: min(145px, 20vw);
  height: auto;
  max-height: 58px;
  margin: 0 auto;
  object-fit: contain;
}

.sigsoft-footer-logos > a:nth-child(1) > img {
  max-height: 48px;
}

.sigsoft-footer-logos > a:nth-child(2) > img {
  max-height: 54px;
}

.sigsoft-footer-logos > a:nth-child(3) > img {
  max-height: 58px;
}

.sigsoft-footer-logos > a:nth-child(4) > img {
  max-height: 62px;
}

.sigsoft-footer-divider {
  width: min(100%, 1100px);
  margin-right: auto;
  margin-left: auto;
}

.sigsoft-footer-text {
  padding: 14px 20px 22px;
  text-align: center;
}

.sigsoft-footer-text strong {
  display: block;
  margin-bottom: 4px;
  color: var(--sigsoft-dark);
  font-size: 13px;
}

.sigsoft-footer-text p {
  margin: 0;
  color: var(--sigsoft-muted);
  font-size: 12.5px;
  line-height: 1.4;
}

/* ==================================================
   ALTO CONTRASTE
================================================== */

body.contrast {
  background: #000000;
  color: #ffffff;
}

body.contrast .sigsoft-main {
  background: #000000;
}

body.contrast .sigsoft-header,
body.contrast .sigsoft-card,
body.contrast .sigsoft-login-card,
body.contrast .sigsoft-footer,
body.contrast .sigsoft-alert {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
}

body.contrast .sigsoft-card-brand {
  border-color: #ffffff;
}

body.contrast .sigsoft-header-divider,
body.contrast .sigsoft-footer-divider,
body.contrast .sigsoft-info {
  border-color: #ffffff;
  background-color: #ffffff;
}

body.contrast .sigsoft-info {
  background: transparent;
}

body.contrast .sigsoft-government-links a,
body.contrast .sigsoft-brand-text,
body.contrast .sigsoft-brand-text strong,
body.contrast .sigsoft-card-brand h1,
body.contrast .sigsoft-card-brand h2,
body.contrast .sigsoft-card-brand > p,
body.contrast .sigsoft-info,
body.contrast .sigsoft-login-card h2,
body.contrast .sigsoft-login-card > p,
body.contrast .sigsoft-footer-text,
body.contrast .sigsoft-footer-text strong,
body.contrast .sigsoft-footer-text p {
  color: #ffffff;
}

body.contrast a {
  color: #ffff00;
}

body.contrast .sigsoft-card-icon,
body.contrast .sigsoft-login-icon,
body.contrast .sigsoft-info i {
  color: #ffff00;
}

body.contrast .sigsoft-contrast-button {
  background: #ffff00;
  color: #000000;
}

body.contrast .sigsoft-button {
  border-color: #ffff00;
  background: #ffff00;
  color: #000000;
}

body.contrast .sigsoft-button *,
body.contrast .sigsoft-contrast-button * {
  color: #000000;
}

body.contrast .sigsoft-button-outline {
  border-color: #ffff00;
  background: #000000;
  color: #ffff00;
}

body.contrast .sigsoft-button-outline * {
  color: #ffff00;
}

body.contrast .sigsoft-government-logo img,
body.contrast .sigsoft-brand-logo img,
body.contrast .sigsoft-footer-logos img {
  padding: 4px;
  border-radius: 4px;
  background: #ffffff;
}

/* ==================================================
   NOTEBOOK
================================================== */

@media (max-width: 1200px) {
  .sigsoft-header .container-lg,
  .sigsoft-main .container-lg,
  .sigsoft-footer .container-lg {
    max-width: 1040px;
  }

  .sigsoft-card {
    max-width: 880px;
  }
}

/* ==================================================
   TABLET
================================================== */

@media (max-width: 992px) {
  .sigsoft-main {
    align-items: flex-start;
  }

  .sigsoft-government-links {
    gap: 10px;
  }

  .sigsoft-card {
    max-width: 700px;
    padding: 28px 22px;
    grid-template-columns: 1fr;
  }

  .sigsoft-card-brand {
    padding: 8px 12px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--sigsoft-border);
  }

  .sigsoft-login-card {
    max-width: 420px;
  }
}

/* Mantém todas as marcas na mesma linha em telas intermediárias. */
@media (max-width: 900px) and (min-width: 577px) {
  .sigsoft-footer-logos {
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sigsoft-footer-logos > a {
    height: 64px;
  }

  .sigsoft-footer-logos > a > img {
    max-width: min(110px, 21vw);
    max-height: 46px;
  }
}

/* ==================================================
   CELULAR
================================================== */

@media (max-width: 576px) {
  .container-lg {
    width: calc(100% - 24px);
  }

  .sigsoft-government-bar {
    gap: 8px;
  }

  .sigsoft-government-links a {
    display: none;
  }

  .sigsoft-brand {
    padding: 10px 0 12px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    text-align: center;
  }

  .sigsoft-brand-logo img {
    width: 130px;
    max-width: 80vw;
  }

  .sigsoft-brand-text {
    width: 100%;
  }

  .sigsoft-brand-text strong {
    font-size: 0.95rem;
  }

  .sigsoft-brand-text span {
    display: none;
  }

  .sigsoft-main {
    padding: 14px 0 18px;
  }

  .sigsoft-card {
    min-height: 0;
    padding: 22px 16px;
    border-radius: 18px;
  }

  .sigsoft-card-icon {
    margin-bottom: 12px;
    font-size: 40px;
  }

  .sigsoft-card-brand h1 {
    font-size: 36px;
    letter-spacing: 4px;
  }

  .sigsoft-card-brand h2 {
    font-size: 19px;
  }

  .sigsoft-card-brand > p {
    font-size: 13.5px;
  }

  .sigsoft-info {
    font-size: 12.5px;
    gap: 12px;
  }

  .sigsoft-login-card {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .sigsoft-login-icon {
    font-size: 38px;
  }

  .sigsoft-login-card h2 {
    font-size: 22px;
  }

  .sigsoft-button,
  .sigsoft-button-outline {
    min-height: 54px;
    font-size: 13.5px;
  }

  .sigsoft-button small,
  .sigsoft-button-outline small {
    font-size: 11.5px;
  }

  .sigsoft-footer-logos {
    padding: 22px 12px;
    gap: 16px;
    grid-template-columns: 1fr;
  }

  .sigsoft-footer-logos > a {
    width: 100%;
    height: 72px;
  }

  .sigsoft-footer-logos > a > img {
    max-width: min(220px, 78vw);
    max-height: 58px;
  }

  .sigsoft-footer-logos > a:nth-child(1) > img {
    max-height: 50px;
  }

  .sigsoft-footer-logos > a:nth-child(2) > img {
    max-height: 54px;
  }

  .sigsoft-footer-logos > a:nth-child(3) > img {
    max-height: 58px;
  }

  .sigsoft-footer-logos > a:nth-child(4) > img {
    max-height: 60px;
  }

  .sigsoft-footer-divider {
    width: calc(100% - 24px);
  }

  .sigsoft-footer-text {
    padding: 14px 16px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}