/* V2.6.4 — cadastro de quatro logotipos e login alinhados ao padrão do DRE. */
.topbar {
  grid-template-columns: minmax(160px, .8fr) minmax(420px, 1.45fr) minmax(0, 1.9fr);
  grid-template-areas: "user brand links";
  align-items: center;
}

.topbar .top-brand {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.25fr);
  align-items: center;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 62px;
  gap: 10px;
  text-align: left;
  text-decoration: none;
}

.brand-copy { display: block; min-width: 0; }
.brand-copy strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--texto);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: normal;
}
.brand-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: normal;
}

.header-logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 5px;
  width: 100%;
  height: 58px;
}
.header-logos .logo-vaga {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: 58px;
  padding: 4px;
  border: 1px solid var(--linha);
  border-radius: 8px;
  background: #fff;
}
.header-logos .empresa-logo-cabecalho {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 48px;
  max-height: 48px;
  object-fit: contain;
  transform: none;
}

.logo-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.logo-section-head h2 { margin: 0 0 5px; }
.logo-section-head p { margin: 0; color: var(--texto-apoio); font-size: 12px; }
.logo-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  align-items: stretch;
  gap: 12px;
  margin-bottom: 14px;
}
.logo-escolha,
.logo-remover {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  color: #45556b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.logo-escolha input,
.logo-remover input {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--azul);
}
.logo-sem-login,
.login-logo-preview {
  padding: 12px;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: #f8fafc;
}
.login-logo-preview { display: grid; align-content: center; gap: 8px; min-height: 94px; }
.login-logo-preview > b { color: #53647b; font-size: 11px; font-weight: 650; }
#login-logo-preview { display: flex; align-items: center; justify-content: center; min-height: 52px; }
#login-logo-preview img { max-width: 100%; max-height: 72px; object-fit: contain; }
#login-logo-preview span { color: var(--muted); font-size: 11px; text-align: center; }

.logos-cadastro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.logo-posicao {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: #fbfcfe;
}
.logo-posicao-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logo-posicao-title strong { color: #26384f; font-size: 13px; font-weight: 650; }
.logo-posicao-title span { color: var(--muted); font-size: 10px; }
.logo-posicao-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 112px;
  padding: 8px;
  overflow: hidden;
  border: 1px dashed #bdcde0;
  border-radius: 9px;
  background: #fff;
  color: #8090a6;
  font-size: 11px;
  text-align: center;
}
.logo-posicao-preview img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-file-label { display: grid; gap: 5px; min-width: 0; color: #53647b; font-size: 11px; font-weight: 600; }
.logo-file-label input[type="file"] {
  width: 100%;
  height: auto;
  min-height: 40px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--linha);
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
}
.logo-remover { color: #a63240; }
.logo-help { margin-top: 12px; }

.login-shell {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  min-height: clamp(430px, calc(100dvh - 300px), 820px);
  padding: clamp(14px, 3vw, 34px);
  background: transparent;
}
.login-card {
  width: min(460px, 100%);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #d7e2f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(31, 41, 55, .09);
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 116px;
  margin-bottom: 10px;
}
.login-logo img { display: block; width: auto; max-width: min(100%, 340px); height: auto; max-height: 116px; object-fit: contain; }
.login-logo-fallback {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid #d7e2f2;
  border-radius: 18px;
  background: #f0f6ff;
  color: #225fb4;
  font-size: 27px;
  font-weight: 650;
}
.login-company { display: grid; gap: 3px; text-align: center; }
.login-company strong { color: #203149; font-size: 15px; font-weight: 650; line-height: 1.3; }
.login-company span { color: var(--muted); font-size: 11px; }
.login-heading { margin-top: 23px; }
.login-heading > small { color: #5a78a6; font-size: 10px; font-weight: 700; }
.login-heading h1 { margin: 4px 0 6px; font-size: 25px; }
.login-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 14px; margin-top: 20px; }
.login-form label { display: grid; gap: 6px; color: #52627a; font-size: 12px; font-weight: 600; }
.login-form input { width: 100%; min-height: 44px; }
.login-form button { width: 100%; min-height: 48px; margin-top: 3px; font-size: 14px; }
.login-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "user menu" "brand brand" "links links";
  }
  .topbar .top-brand { grid-template-columns: minmax(120px, .9fr) minmax(180px, 1.1fr); }
}

@media (max-width: 900px) {
  .logos-cadastro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .topbar .top-brand {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    justify-self: stretch;
    width: 100% !important;
    gap: 8px;
  }
  .brand-copy strong { font-size: 12px; }
  .header-logos { max-width: 100%; height: 52px; }
  .header-logos .logo-vaga { height: 52px; padding: 3px; }
  .header-logos .empresa-logo-cabecalho { height: 44px; max-height: 44px; }
  .logo-controls { grid-template-columns: minmax(0, 1fr); }
  .logo-section-head { align-items: flex-start; }
  .login-shell { min-height: max(430px, calc(100dvh - 340px)); padding: 12px 0; }
  .login-card { border-radius: 16px; }
  .login-logo { min-height: 94px; }
  .login-logo img { max-height: 94px; }
}

@media (max-width: 390px) {
  .logos-cadastro { gap: 8px; }
  .logo-posicao { padding: 9px; }
  .logo-posicao-preview { height: 94px; }
  .logo-file-label input[type="file"] { font-size: 9px; }
}

@media print {
  .header-logos, .login-shell { display: none !important; }
}
