/* ============================================================
   Ambiente de HOMOLOGAÇÃO — auth-gov.org
   Simulação interna de conscientização em segurança (phishing
   awareness). Não carrega recursos do domínio real gov.br.
   ============================================================ */

:root {
  --gov-blue: #1351b4;
  --gov-blue-dark: #0c326f;
  --gov-yellow: #ffcd07;
  --gov-green: #168821;
  --gov-gray-1: #f8f8f8;
  --gov-gray-2: #e8e8e8;
  --gov-gray-border: #888888;
  --gov-text: #333333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Rawline", Arial, sans-serif;
  color: var(--gov-text);
  background: #ffffff;
}

/* Faixa de aviso de homologação */
.homolog-banner {
  background: repeating-linear-gradient(
    45deg,
    #1a1a1a,
    #1a1a1a 12px,
    var(--gov-yellow) 12px,
    var(--gov-yellow) 24px
  );
  color: #1a1a1a;
  text-align: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.homolog-banner span {
  background: #fff;
  padding: 2px 10px;
  border-radius: 3px;
}

header.gov-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--gov-gray-2);
}

header.gov-header .logo img {
  height: 36px;
  display: block;
}

header.gov-header .actions {
  display: flex;
  gap: 24px;
}

header.gov-header .actions a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gov-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.gov-stripe {
  height: 6px;
  background: var(--gov-gray-1);
  position: relative;
}
.gov-stripe::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 0;
  height: 100%;
  width: 18%;
  background: var(--gov-yellow);
}

main.login-main {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 32px 80px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}

.illustration {
  max-width: 820px;
  flex: 2 1 480px;
  min-width: 0;
}
.illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

@media (max-width: 480px) {
  main.login-main {
    padding: 24px 16px 56px;
    gap: 24px;
  }
}

.login-box {
  width: 100%;
  max-width: 320px;
  flex: 0 0 320px;
  border: 1px solid var(--gov-gray-2);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.login-box h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--gov-text);
}

.identify-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--gov-blue);
  margin-bottom: 6px;
}
.identify-option img {
  width: 22px;
  height: 22px;
}

.helper-text {
  font-size: 13px;
  color: #555;
  margin: 0 0 16px;
}
.helper-text b {
  color: var(--gov-text);
}

label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

input.cpf-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gov-gray-border);
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 16px;
}
input.cpf-input::placeholder {
  color: #999;
}

.field-error {
  color: #a12622;
  font-size: 13px;
  font-weight: 700;
  margin: -10px 0 16px;
}
.field-error[hidden] {
  display: none;
}
.cpf-input.input-invalid {
  border-color: #a12622;
}

button.btn-primary {
  width: 100%;
  background: var(--gov-blue);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 24px;
}
button.btn-primary:hover {
  background: var(--gov-blue-dark);
}

.other-options-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--gov-text);
}
.option-row img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.option-row .link-text {
  color: var(--gov-green);
  font-weight: 700;
}
.option-row .badge {
  margin-left: auto;
  background: #c0c0c0;
  color: #333;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.divider {
  border: none;
  border-top: 1px solid var(--gov-gray-2);
  margin: 8px 0;
}

.help-links {
  margin-top: 24px;
  text-align: center;
}
.help-links a {
  display: block;
  color: var(--gov-blue);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 12px;
}
.help-links a:hover {
  text-decoration: underline;
}

footer.gov-footer {
  border-top: 1px solid var(--gov-gray-2);
  padding: 16px 32px;
  font-size: 12px;
  color: #777;
  text-align: center;
}

.bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.bank-item {
  border: 1px solid var(--gov-gray-border);
  border-radius: 4px;
  background: #fff;
  padding: 14px 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.bank-item:hover {
  border-color: var(--gov-blue);
  color: var(--gov-blue);
}

.qr-placeholder {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto 16px;
  background: #fff;
  border: 10px solid #fff;
  outline: 1px solid var(--gov-gray-2);
  border-radius: 4px;
}

.option-processing {
  text-align: center;
  padding: 24px 0;
  font-weight: 700;
  color: var(--gov-blue);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--gov-blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}
.back-link:hover {
  text-decoration: underline;
}

/* Modal de alerta de conscientização sobre phishing */
.phishing-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}
.phishing-modal[hidden] {
  display: none;
}

.phishing-modal-box {
  background: #fff;
  border-radius: 8px;
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.phishing-modal-box h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #a12622;
}
.phishing-modal-box p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.phishing-modal-box ul {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
  padding-left: 20px;
}
.phishing-modal-box li {
  margin-bottom: 6px;
}
.phishing-modal-box .btn-primary {
  margin-bottom: 0;
}

/* Alto contraste */
body.high-contrast {
  background: #000;
  color: #fff;
}
body.high-contrast header.gov-header,
body.high-contrast footer.gov-footer {
  background: #000;
  border-color: #ffcd07;
  color: #fff;
}
body.high-contrast .login-box {
  background: #000;
  border: 2px solid #ffcd07;
  color: #fff;
}
body.high-contrast .login-box h1,
body.high-contrast .helper-text,
body.high-contrast .field-label,
body.high-contrast .other-options-label,
body.high-contrast .option-row,
body.high-contrast .bank-item {
  color: #fff;
}
body.high-contrast a,
body.high-contrast .identify-option,
body.high-contrast .option-row .link-text {
  color: #ffcd07 !important;
}
body.high-contrast input.cpf-input {
  background: #111;
  color: #fff;
  border-color: #ffcd07;
}
body.high-contrast .btn-primary {
  background: #ffcd07;
  color: #000;
}
body.high-contrast .bank-item {
  background: #111;
  border-color: #ffcd07;
}

/* VLibras (widget simulado, sem dependência externa) */
.vlibras-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 260px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  z-index: 900;
}
.vlibras-widget[hidden] {
  display: none;
}
.vlibras-widget-header {
  background: var(--gov-blue);
  color: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
}
.vlibras-widget-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.vlibras-widget-body {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--gov-text);
}
