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

:root {
  --blue: #1f5da8;
  --blue-dark: #164f97;
  --blue-light: #2f78c7;
  --text: #222222;
  --muted: #8a8a8a;
  --line: #c9d8e8;
  --white: #ffffff;
  --page: #f1f3f5;
  --error: #d64a4a;
}

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

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.95), rgba(241,243,245,.75) 60%),
    var(--page);
}

.login-shell {
  width: min(900px, 100%);
  min-height: 500px;
  display: grid;
  grid-template-columns: 43% 57%;
  position: relative;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .20));
}

.brand-panel {
  position: relative;
  z-index: 2;
  min-height: 500px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, #1959a3 0%, var(--blue) 52%, var(--blue-light) 100%);
}

.brand-content {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 34px 42px;
  text-align: center;
  color: white;
}

.welcome { display: flex; flex-direction: column; line-height: 1.08; margin-bottom: 45px; }
.welcome span { font-size: 14px; font-weight: 300; opacity: .95; }
.welcome strong { font-size: 20px; font-weight: 500; }

.brand-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 24px; }
.logo-mark { width: 48px; height: 48px; }
.logo-mark img { display: block; width: 48px; height: 48px; object-fit: contain; border-radius: 10px; }
.brand-logo > span { font-size: 15px; font-weight: 600; letter-spacing: .1px; }

.brand-description {
  max-width: 250px; font-size: 12px; line-height: 1.7; font-weight: 300; opacity: .85; margin-bottom: auto;
}

.brand-action {
  border: 0; background: transparent; color: white; font-size: 11px; font-weight: 500;
  letter-spacing: .3px; padding: 12px 18px; transition: transform .2s ease, opacity .2s ease;
}
.brand-action span { display: inline-block; margin-left: 5px; font-size: 15px; line-height: 0; vertical-align: -1px; }
.brand-action:hover { transform: translateX(3px); opacity: .8; }

.form-panel {
  position: relative; z-index: 1; min-height: 500px; margin-left: -12px;
  background: var(--white); border-radius: 0 22px 22px 0;
}

.form-inner { min-height: 500px; display: flex; flex-direction: column; justify-content: center; padding: 48px 58px 42px 72px; }
.form-inner h1 { font-size: 22px; line-height: 1.2; font-weight: 500; margin-bottom: 6px; }
.form-subtitle { font-size: 12px; color: var(--muted); margin-bottom: 30px; }

.field { margin-bottom: 21px; }
.field label { display: block; font-size: 11px; font-weight: 500; margin-bottom: 7px; }

.input-wrap { position: relative; }
.input-wrap input {
  width: 100%; height: 34px; border: 0; border-bottom: 1px solid var(--line); outline: none;
  padding: 0 27px 0 0; color: var(--text); font-size: 13px; background: transparent; transition: border-color .2s ease;
}
.input-wrap input::placeholder { color: #b3b3b3; font-size: 12px; }
.input-wrap input:focus { border-bottom-color: var(--blue); }

.form-options { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 2px 0 28px; font-size: 11px; color: #8d8d8d; }
.form-options a { color: var(--blue); text-decoration: none; }
.form-options a:hover { text-decoration: underline; }

.submit-button {
  width: 100%; height: 37px; border: 0; border-radius: 6px; color: white;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  font-size: 12px; font-weight: 600; letter-spacing: .2px;
  box-shadow: 0 5px 12px rgba(31, 93, 168, .18); transition: transform .2s ease, box-shadow .2s ease;
}
.submit-button:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(31, 93, 168, .25); }

.form-message { min-height: 16px; margin-top: 10px; text-align: center; font-size: 11px; }
.form-message.success { color: #41845b; }
.form-message.error, .alerta-erro { color: var(--error); }
.alerta-erro { text-align: center; font-size: 12px; margin-bottom: 12px; }
.alerta-info { color: var(--blue); text-align: center; font-size: 12px; margin-bottom: 12px; }

.terms { margin-top: auto; padding-top: 20px; text-align: center; color: #aaa; font-size: 10px; line-height: 1.5; }

@media (max-width: 720px) {
  .page { min-height: 100vh; padding: 28px 18px; place-items: start center; }
  .login-shell { width: min(430px, 100%); min-height: auto; display: block; filter: drop-shadow(0 13px 18px rgba(0,0,0,.20)); }
  .brand-panel { min-height: 245px; border-radius: 20px 20px 18px 18px; }
  .brand-content { min-height: 245px; padding: 31px 28px 27px; }
  .welcome { margin-bottom: 20px; }
  .brand-logo { margin-bottom: 16px; }
  .brand-description { max-width: 245px; font-size: 11px; margin-bottom: 12px; }
  .form-panel { min-height: auto; margin: -1px 12px 0; border-radius: 0 0 20px 20px; }
  .form-inner { min-height: auto; padding: 34px 31px 27px; }
  .form-inner h1 { font-size: 20px; }
}

@media (max-width: 380px) {
  .page { padding: 18px 12px; }
  .form-panel { margin-left: 8px; margin-right: 8px; }
  .form-inner { padding-left: 24px; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Cartao avulso (troca de senha, etc.) - mesma linguagem visual, sem o painel azul lateral */
.card-solo {
  width: min(400px, 100%);
  background: var(--white);
  border-radius: 16px;
  padding: 40px 36px;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .14));
  text-align: center;
}
.card-solo .logo-mark { margin: 0 auto 16px; }
.card-solo h1 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.card-solo p.form-subtitle { margin-bottom: 24px; }
.card-solo .field { text-align: left; }
.card-solo .submit-button { margin-top: 8px; }
