/* ================================================
   InfoCare — Login Page
   Design: split-screen, azul petróleo + pêssego
   Substitui: css/styleLogin.css
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&display=swap');

/* ── Reset & tokens ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #34677D;
  --primary-dk: #28516A;
  --primary-lt: #5B9DB5;
  --accent: #E8A87C;
  --accent-dk: #D48B5A;
  --bg: #F4F8FA;
  --surface: #FFFFFF;
  --text: #2C3E50;
  --text-muted: #6B8CAA;
  --danger: #D95F5F;
  --success: #4CAF87;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(52, 103, 125, 0.15);
}

html,
body {
  height: 100%;
  font-family: 'Comfortaa', 'Amaranth', sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── Layout split-screen ── */
.login-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Painel esquerdo — identidade visual ── */
.login-panel-left {
  flex: 1;
  background: linear-gradient(145deg, var(--primary-dk) 0%, var(--primary) 50%, var(--primary-lt) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* centraliza verticalmente */
  align-items: center;
  /* centraliza horizontalmente */
  text-align: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
  /* necessário para o corte diagonal */
}

/* Imagem de fundo do idoso, semi-transparente */
.login-bg-image {
  position: absolute;
  inset: 0;
  background: url('../img/idoso-bg.jpg') center center / cover no-repeat;
  opacity: 0.25;
  /* ajuste a transparência aqui */
  z-index: 0;
  pointer-events: none;
}

/* Conteúdo centralizado acima da imagem e do corte */
.login-logo,
.login-tagline,
.login-sub {
  position: relative;
  z-index: 2;
}

.login-logo {
  width: 260px;
  height: 180px;
  background: url('../img/infocare branco.png') center center / contain no-repeat;
  margin-bottom: 32px;
}

.login-tagline {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 400px;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.login-sub {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 400;
  max-width: 350px;
  line-height: 1.6;
}

/* Círculos decorativos de fundo */
.login-panel-left .deco {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 0;
}

.login-panel-left .deco-1 {
  width: 320px;
  height: 320px;
  bottom: -80px;
  left: -80px;
}

.login-panel-left .deco-2 {
  width: 180px;
  height: 180px;
  top: 40px;
  right: 80px;
}

/* ── Corte diagonal (original restaurado) ── */
.login-panel-left::after {
  content: '';
  position: absolute;
  top: 0;
  right: -60px;
  width: 120px;
  height: 100%;
  background: var(--bg);
  clip-path: polygon(60px 0, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* ── Painel direito — formulário ── */
.login-panel-right {
  width: 420px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
  background: var(--bg);
  position: relative;
  z-index: 2;
}

.login-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 44px 40px;
  box-shadow: var(--shadow);
}

.login-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dk);
  margin-bottom: 6px;
}

.login-card-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* ── Campos ── */
.field-group {
  margin-bottom: 20px;
}

.field-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #DDE6EC;
  border-radius: 8px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.field-group input:focus {
  border-color: var(--primary-lt);
  box-shadow: 0 0 0 3px rgba(91, 157, 181, 0.18);
  background: var(--surface);
}

.field-group input::placeholder {
  color: #A8BFCC;
}

/* ── Botão principal ── */
.btn-login {
  display: block;
  width: 100%;
  padding: 15px;
  margin-top: 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(52, 103, 125, 0.30);
}

.btn-login:hover {
  background: var(--primary-dk);
  box-shadow: 0 6px 20px rgba(52, 103, 125, 0.38);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(52, 103, 125, 0.20);
}

/* ── Acento no botão — bolinha pêssego ── */
.btn-login::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 10px;
  vertical-align: middle;
}

/* ── Mensagens de feedback ── */
.msg-erro,
.msg-sucesso {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-erro {
  background: rgba(217, 95, 95, 0.10);
  color: var(--danger);
  border: 1px solid rgba(217, 95, 95, 0.25);
}

.msg-erro::before {
  content: '✕';
}

.msg-sucesso {
  background: rgba(76, 175, 135, 0.10);
  color: var(--success);
  border: 1px solid rgba(76, 175, 135, 0.25);
}

.msg-sucesso::before {
  content: '✓';
}

/* ── Rodapé discreto ── */
.login-footer {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Responsivo ── */
@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-panel-left {
    padding: 40px 32px 60px;
  }

  .login-logo {
    width: 180px;
    height: 120px;
    margin: 0 auto 40px;
  }

  .login-tagline {
    font-size: 1.5rem;
    max-width: 100%;
  }

  .login-panel-right {
    width: 100%;
    padding: 32px 20px 48px;
  }

  /* Em mobile, escondemos o corte diagonal para não atrapalhar */
  .login-panel-left::after {
    display: none;
  }
}

@media (max-width: 400px) {
  .login-card {
    padding: 32px 24px;
  }
}