/* =========================================================
   Auth pages: login / logout / password reset
   Enlace Médico
   ========================================================= */

:root {
  --auth-navy: var(--navy, #071a2b);
  --auth-navy-2: var(--navy-2, #061821);
  --auth-gold: var(--gold, #c7a24a);
  --auth-gold-2: #b38f3d;
  --auth-border: rgba(7, 26, 43, .12);
  --auth-shadow: 0 28px 80px rgba(7, 26, 43, .18);
}

body {
  overflow-x: hidden;
  background: transparent !important;
  color: var(--auth-navy);
}

/* Botón volver */
.back-btn,
.back-btn--page {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 200;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  color: #0b1320;
  background: linear-gradient(180deg, var(--auth-gold), var(--auth-gold-2));
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 14px 34px rgba(199, 162, 74, .28);
  transition: transform .15s ease, filter .15s ease;
}

.back-btn:hover,
.back-btn--page:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.back-btn:active,
.back-btn--page:active {
  transform: translateY(0);
}

/* Layout principal */
.login-page,
.logout-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 84px 20px 32px;
  background: transparent;
}

.login-page *,
.logout-page * {
  box-sizing: border-box;
}

.login-card,
.logout-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(7, 26, 43, .10);
  box-shadow: var(--auth-shadow);
}

/* Columna visual */
.login-aside,
.logout-aside,
.login-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  color: #fff;
  background: linear-gradient(180deg, var(--auth-navy-2), #071c26);
}

.login-aside h2,
.login-aside h1,
.login-aside p,
.logout-aside h2,
.logout-aside h1,
.logout-aside p,
.login-left h1,
.login-left p {
  margin: 0;
}

.login-aside h2,
.logout-aside h2 {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 900;
}

.login-aside h1,
.logout-aside h1,
.login-left h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.login-aside p,
.logout-aside p,
.muted {
  color: rgba(255, 255, 255, .78);
  font-weight: 700;
}

.login-illus,
.logout-illus {
  margin-top: auto;
  max-height: 330px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
}

.login-illus img,
.logout-illus img,
.doc-img {
  width: 100%;
  height: 330px;
  max-height: 38vh;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Columna formulario */
.login-form,
.logout-form,
.login-right {
  min-width: 0;
  padding: 30px;
}

.logout-form {
  display: flex;
  align-items: center;
}

.login-form form,
.logout-form form,
.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  min-width: 0;
}

.field label,
.login-form label,
.logout-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
  color: rgba(7, 26, 43, .82);
}

.login-form input,
.logout-form input,
.login-right input,
.form input,
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  max-width: 100%;
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--auth-border);
  outline: none;
  font: inherit;
  font-weight: 700;
  color: var(--auth-navy);
  background: #fff;
}

.login-form input:focus,
.logout-form input:focus,
.login-right input:focus,
.form input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: rgba(199, 162, 74, .75);
  box-shadow: 0 0 0 5px rgba(199, 162, 74, .20);
}

/* Password toggle */
.pw,
.input-with-icon {
  position: relative;
}

.pw input,
.input-with-icon input {
  padding-right: 56px;
}

.pw .toggle-pass,
.input-with-icon .toggle-pass,
.input-with-icon .pw__toggle,
.pw__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(7, 26, 43, .14);
  background: rgba(7, 26, 43, .04);
  cursor: pointer;
}

/* Botones y enlaces */
.btn-gold,
.btn.btn--gold,
.btn--gold {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font: inherit;
  font-weight: 900;
  color: #0b1320;
  background: linear-gradient(180deg, var(--auth-gold), var(--auth-gold-2));
  box-shadow: 0 14px 34px rgba(199, 162, 74, .28);
}

.btn-gold:hover,
.btn--gold:hover {
  filter: brightness(1.03);
}

.btn-gold:active,
.btn--gold:active {
  transform: translateY(1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
}

.w100 {
  width: 100%;
}

.link {
  color: #a77f25;
  font-weight: 900;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-linkbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .42rem .8rem;
  border-radius: 999px;
  background: var(--auth-gold);
  border: 1px solid rgba(199, 162, 74, .55);
  color: #141414;
  font-weight: 900;
  font-size: .92rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(199, 162, 74, .18);
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}

.auth-linkbtn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.auth-linkbtn:active {
  transform: translateY(0);
  opacity: .92;
}

.auth-alt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.auth-alt,
.mini {
  margin: 0;
  color: rgba(7, 26, 43, .65);
  font-weight: 700;
}

/* Alertas */
.alert,
.logout-alert {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(7, 26, 43, .05);
  border: 1px solid rgba(7, 26, 43, .10);
  color: rgba(7, 26, 43, .78);
  font-weight: 800;
  line-height: 1.45;
}

/* Logout específico */
.logout-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.logout-actions .btn-gold {
  flex: 1 1 220px;
}

.logout-back-text {
  margin: 0;
  color: rgba(7, 26, 43, .65);
  font-weight: 700;
}

/* Compatibilidad con estilos anteriores */
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.brand__logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: rgba(214, 178, 94, .18);
  border: 1px solid rgba(214, 178, 94, .45);
}

.brand__name {
  font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
  .login-card,
  .logout-card {
    grid-template-columns: 1fr;
  }

  .login-aside,
  .logout-aside,
  .login-left,
  .login-form,
  .logout-form,
  .login-right {
    padding: 26px;
  }

  .login-illus,
  .logout-illus {
    max-height: 220px;
  }

  .login-illus img,
  .logout-illus img,
  .doc-img {
    height: 220px;
    max-height: 28vh;
  }
}

@media (max-width: 560px) {
  .login-page,
  .logout-page {
    padding: 72px 14px 24px;
  }

  .back-btn,
  .back-btn--page {
    top: 12px;
    left: 12px;
    width: 44px;
    height: 44px;
  }

  .login-card,
  .logout-card {
    border-radius: 20px;
  }

  .login-aside,
  .logout-aside,
  .login-left,
  .login-form,
  .logout-form,
  .login-right {
    padding: 22px;
  }

  .login-illus,
  .logout-illus {
    display: none;
  }

  .auth-alt-row {
    gap: 8px;
  }

  .auth-linkbtn {
    padding: .42rem .72rem;
  }
}
