/* ==========================================================================
   login.css — CSS auto-contido do login.html. Conteúdo do ex-auth.css
   sem a seção Home/landing (a landing única é index.html na raiz).
   ========================================================================== */

:root {
  --blue-50: #E4F6FC;
  --blue-100: #e4f6fc;
  --blue-200: #bfe7f5;
  --blue-300: #E4F6FC;
  --blue-700: #1f637a;
  --blue-800: #174e61;
  --ink: #111827;
  --muted: #64727c;
  --line: #dce6ea;
  --line-strong: #DCE6EA;
  --white: #ffffff;
  --success-bg: #3BAE24;
  --success: #3BAE24;
  --error-bg: #FFF6F6;
  --error: #D90307;
  --error-line: #EBA1A2;
  --radius: 8px;
  --shadow-focus: 0 0 0 4px rgba(31, 99, 122, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--white);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--white);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 43%) minmax(520px, 57%);
}

.auth-brand {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 36px clamp(32px, 5vw, 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(rgba(243, 251, 254, 0.93), rgba(228, 246, 252, 0.96)),
    radial-gradient(circle at 15% 18%, var(--blue-300) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 72%, var(--blue-200) 0 1px, transparent 2px);
  background-size: auto, 28px 28px, 34px 34px;
  border-right: 1px solid var(--line);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* marca nova: logo PNG + fonte Laila (padrão do Editar Perfil) */
.brand .brand-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.brand .brand-text {
  font-family: "Laila", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0;
}

.brand-content {
  max-width: 560px;
  margin: auto 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-content h1,
.auth-header h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.035em;
}

.brand-content h1 {
  max-width: 600px;
  font-size: clamp(2rem, 4vw, 3.9rem);
  line-height: 1.08;
}

.brand-content > p:not(.eyebrow) {
  max-width: 580px;
  margin: 24px 0 0;
  color: #64727C;
  font-size: 1.05rem;
  line-height: 1.8;
}

.benefits {
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  list-style: none;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #111827;
  font-weight: 650;
}

.benefits .benefit-copy {
  flex: 1;
  min-width: 0;
  width: auto;
  height: auto;
  display: grid;
  gap: 2px;
  text-align: left;
}

.benefits .benefit-copy strong {
  font-size: 15px;
  font-weight: 700;
}

.benefits .benefit-copy small {
  font-size: 13px;
  font-weight: 400;
  color: #64727C;
}

.benefits span[aria-hidden] {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--blue-800);
  background: var(--white);
  border: 1px solid var(--blue-200);
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 92px);
  background: var(--white);
}

.auth-panel-inner {
  width: min(100%, 560px);
}

.register-panel {
  align-items: start;
}

.register-inner {
  width: min(100%, 820px);
}

.auth-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.auth-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1.15;
}

.auth-header > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  margin-top: 32px;
}

.form-group {
  min-width: 0;
}

.auth-form > .form-group + .form-group {
  margin-top: 22px;
}

.form-group label,
.role-fieldset legend,
.form-section h3 {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.form-group label {
  display: inline-block;
  margin-bottom: 8px;
}

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

.label-row label {
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #F8FAFB;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input::placeholder {
  color: #64727C;
}

input:hover,
select:hover {
  border-color: #DCE6EA;
}

input:focus,
select:focus {
  background: var(--white);
  border-color: var(--blue-700);
  box-shadow: var(--shadow-focus);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--error);
  background: #FFFBFB;
}

input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(217, 3, 7, 0.09);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 84px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  height: 34px;
  padding: 0 10px;
  transform: translateY(-50%);
  color: var(--blue-700);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--blue-100);
  outline: none;
}

.text-link {
  color: var(--blue-700);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 650;
}

.text-link:hover {
  color: var(--blue-800);
  text-decoration: underline;
}

.text-link.strong {
  font-weight: 800;
}

.checkbox-row {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #111827;
  font-size: 0.88rem;
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--blue-700);
}

.primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  padding: 12px 20px;
  color: var(--white);
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  background: var(--blue-800);
  border-color: var(--blue-800);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.auth-switch {
  margin: 26px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  display: block;
}

.forgot-link {
  display: block;
  margin-top: 8px;
  text-align: right;
}

.field-help,
.field-error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  font-size: 0.76rem;
  line-height: 1.35;
}

.field-help {
  color: var(--muted);
}

.field-error {
  min-height: 0;
  margin-top: 7px;
  color: var(--error);
  font-size: 0.8rem;
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.form-message {
  display: none;
  margin-top: 18px;
  padding: 12px 14px 12px 42px;
  border-radius: 10px;
  position: relative;
  font-size: 0.85rem;
  line-height: 1.5;
}

.form-message.is-success,
.form-message.is-error {
  display: block;
}

.form-message.is-success {
  color: #3BAE24;
  background: transparent;
  border: none;
  font-weight: 600;
  margin-top: 12px;
}

.form-message.is-error {
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid var(--error-line);
  font-weight: 600;
}

.form-message.is-error::before {
  content: "!";
  position: absolute;
  top: 12px;
  left: 14px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--error);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.role-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0 0 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.role-fieldset legend {
  margin-bottom: 14px;
}

.role-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.role-option {
  position: relative;
  cursor: pointer;
}

.role-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option-body {
  min-height: 90px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: #F8FAFB;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.role-option:hover .role-option-body {
  border-color: var(--blue-300);
}

.role-option > input:focus-visible + .role-option-body {
  box-shadow: var(--shadow-focus);
}

.role-option > input:checked + .role-option-body {
  background: var(--blue-100);
  border-color: var(--blue-700);
}

.role-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--blue-800);
  background: var(--white);
  border: 1px solid var(--blue-200);
  font-family: Georgia, serif;
  font-weight: 800;
}

.role-option-body > span:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.role-option-body strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.role-option-body small {
  color: var(--muted);
  line-height: 1.4;
}

.form-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h3 {
  margin: 0;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.full-width {
  grid-column: 1 / -1;
}

.psychologist-fields[hidden] {
  display: none;
}

.terms-row {
  margin-top: 26px;
}

.checkbox-error {
  min-height: 0;
  margin-left: 27px;
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    position: static;
    min-height: auto;
    padding: 28px clamp(22px, 6vw, 64px) 38px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-content {
    margin: 54px 0 36px;
  }

  .auth-panel {
    min-height: auto;
    padding: 48px clamp(22px, 6vw, 64px) 72px;
  }
}

@media (max-width: 640px) {
  .auth-brand {
    padding-inline: 20px;
  }

  .brand-content {
    margin-top: 42px;
  }

  .brand-content h1 {
    font-size: 2.2rem;
  }

  .brand-content > p:not(.eyebrow) {
    font-size: 0.98rem;
  }

  .auth-panel {
    padding: 38px 20px 58px;
  }

  .role-options,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }

  .label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

