@import url('variables.css');

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

body, html {
  width: 100%;
  height: 100%;
  font-family: var(--font-family-primary);
  background-color: var(--bg-beige-light);
}

/* Centraliza o card no meio exato da tela */
.page-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* O Card unificado que junta tudo */
.login-card {
  display: flex;
  flex-direction: row;
  width: 972px;             /* 486 + 486 = 972px */
  height: 600px;            /* Altura total no Figma */
  background-color: var(--card-bg);
  border-radius: 16px;      /* Bordas arredondadas do card */
  box-shadow: 0 12px 32px var(--palette-rgba-0-0-0-0-05);
  overflow: hidden;         /* Impede a imagem de vazar as bordas arredondadas */
  border: 1px solid var(--border-color);
}

/* Lado Esquerdo - Painel Bege com Imagem (486px de largura) */
.brand-panel {
  width: 486px;
  height: 100%;
  background-color: var(--bg-beige-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;           /* Força a largura exata sem encolher */
}

.brand-img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* Preenche os 486x600px perfeitamente */
  display: block;
}

/* Lado Direito - Formulário Branco (486px de largura) */
.form-panel {
  width: 486px;
  height: 100%;
  background-color: var(--card-bg);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
}

.form-header {
  margin-bottom: 24px;
}

.form-header h2 {
  font-family: var(--font-family-secondary);
  font-size: 26px;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-header p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Campos */
.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 13px;
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.input-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: var(--bg-beige-light);
  color: var(--text-dark);
  outline: none;
}

.input-group input:focus {
  border-color: var(--blue-600);
  background-color: var(--card-bg);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.checkbox-group label {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background-color: var(--blue-600);
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-login:hover {
  background-color: var(--blue-700);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-subtle);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border-color);
}

.btn-microsoft-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.btn-microsoft-login:hover {
  background: var(--bg-beige-light);
}

.microsoft-logo {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 2px;
}

.microsoft-logo i:nth-child(1) { background: #f25022; }
.microsoft-logo i:nth-child(2) { background: #7fba00; }
.microsoft-logo i:nth-child(3) { background: #00a4ef; }
.microsoft-logo i:nth-child(4) { background: #ffb900; }

.login-feedback {
  margin: 12px 0 0;
  color: var(--red-dark);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.login-feedback:empty { display: none; }

.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.form-footer a {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 600;
}

/* Responsividade simples para telas pequenas */
@media (max-width: 890px) {
  .login-card {
    width: 100%;
    max-width: 440px;
    height: auto;
  }
  .brand-panel {
    display: none;
  }
  .form-panel {
    padding: 32px 24px;
  }
}