/* login.css — Login Avantilo (variables + estilos del rediseño) */

:root {
  --brand:        #A10F2B;
  --brand-600:    #8C0D26;
  --brand-700:    #5B1A24;
  --brand-soft:   #F3E0DE;
  --bg:           #F2ECE4;
  --surface:      #FFFFFF;
  --border:       #E7E0D8;
  --border-2:     #D8D1C7;
  --ink:          #1C1C1C;
  --ink-2:        #4A413B;
  --ink-3:        #7A6F66;
  --ink-4:        #A89D91;
  --green:        #15A35A;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  background:
    radial-gradient(900px 500px at 18% 12%, #f5e2e0, transparent 60%),
    radial-gradient(1000px 600px at 100% 100%, #f3ece3, transparent 55%),
    linear-gradient(135deg, #f2ece4 0%, #e7dfd3 100%);
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.login-card {
  width: 100%;
  max-width: 940px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow:
    0 30px 60px -24px rgba(16, 24, 40, .28),
    0 12px 28px -16px rgba(16, 24, 40, .18);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  min-height: 552px;
}

/* Brand panel */
.lg-brand {
  position: relative;
  padding: 46px 44px;
  color: #fff;
  background:
    radial-gradient(420px 320px at 80% 12%, rgba(255, 255, 255, .16), transparent 60%),
    linear-gradient(158deg, #C43850 0%, #A10F2B 52%, #5B1A24 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lg-brand .wm {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 300px;
  height: 300px;
  object-fit: contain;
  opacity: .07;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.lg-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: .5;
  mask-image: linear-gradient(160deg, #000, transparent 70%);
  pointer-events: none;
}

.lg-brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 14px;
}

.lg-badge {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  margin-bottom: 22px;
  padding: 14px;
}

.lg-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.lg-title {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.lg-tagline {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .82);
  margin: 12px 0 0;
  max-width: 17rem;
}

.lg-features {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 30px;
}

.lg-feature {
  display: flex;
  align-items: center;
  gap: 13px;
}

.lg-feature .fx {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.lg-feature .ft {
  display: flex;
  flex-direction: column;
}

.lg-feature .ft b {
  font-size: 14px;
  font-weight: 600;
}

.lg-feature .ft span {
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
}

/* Form panel */
.lg-form {
  padding: 30px 44px 34px;
  display: flex;
  flex-direction: column;
}

.lg-formtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 30px;
}

.lg-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.lg-wordmark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 9px;
  filter: brightness(0);
  -webkit-filter: brightness(0);
}

.lg-topactions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lg-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  background: #fff;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.lg-home:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.lg-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.lg-lang:hover {
  background: var(--bg);
}

.lg-head {
  margin-bottom: 22px;
}

.lg-head h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.lg-head p {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 5px 0 0;
}

.lg-field {
  margin-bottom: 16px;
}

.lg-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.lg-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-2);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.lg-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.lg-input .ic {
  width: 46px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
  font-size: 16px;
  align-self: stretch;
  border-right: 1px solid var(--border);
}

.lg-input input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 13px 14px;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--sans);
}

.lg-input input::placeholder {
  color: var(--ink-4);
}

.lg-input .toggle {
  border: none;
  background: transparent;
  color: var(--ink-3);
  padding: 0 14px;
  cursor: pointer;
  font-size: 16px;
  align-self: stretch;
}

.lg-input .toggle:hover {
  color: var(--ink);
}

.lg-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #2a2a2a, #1C1C1C);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6);
  transition: filter .15s, transform .05s;
}

.lg-submit:hover {
  filter: brightness(1.05);
}

.lg-submit:active {
  transform: translateY(1px);
}

.lg-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.lg-foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-4);
}

.lg-foot i {
  color: var(--green);
}

#otp-section {
  margin-bottom: 16px;
}

/* Toast — this page loads bootstrap.bundle.min.js (behavior only, no
   bootstrap.min.css), so Bootstrap's own .toast rules — including the
   display:none default that hides it until JS adds .show — never existed
   here. That's why it used to sit permanently visible, unstyled, top-right.
   This block is a fully self-contained replacement; it only relies on the
   .show/.showing classes the JS toggles. */
.login-toast-wrap {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}

.login-toast-wrap .toast {
  display: none;
  pointer-events: auto;
  width: 340px;
  max-width: calc(100vw - 40px);
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -16px rgba(16, 24, 40, .28), 0 8px 20px -10px rgba(16, 24, 40, .16);
  overflow: hidden;
}

.login-toast-wrap .toast.show {
  display: block;
}

.login-toast-wrap .toast.fade {
  transition: opacity .2s ease, transform .2s ease;
  opacity: 0;
  transform: translateY(-8px);
}

.login-toast-wrap .toast.fade.show {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .login-toast-wrap .toast.fade { transition: none; }
}

.login-toast-wrap .toast-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.login-toast-wrap .toast-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  transition: background .15s, color .15s;
}

.login-toast-wrap .toast-header.is-success .toast-icon-badge { background: #E4F4EB; color: var(--green); }
.login-toast-wrap .toast-header.is-error .toast-icon-badge   { background: var(--brand-soft); color: var(--brand); }
.login-toast-wrap .toast-header.is-warning .toast-icon-badge { background: #FBF0DC; color: #E08A00; }

.login-toast-wrap .toast-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.login-toast-wrap .btn-close {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  opacity: .7;
  transition: background .15s, opacity .15s;
}

.login-toast-wrap .btn-close::before,
.login-toast-wrap .btn-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.6px;
  background: currentColor;
  border-radius: 2px;
}
.login-toast-wrap .btn-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.login-toast-wrap .btn-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.login-toast-wrap .btn-close:hover { background: var(--bg); opacity: 1; }

.login-toast-wrap .toast-body {
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

@media (max-width: 820px) {
  .login-card {
    grid-template-columns: 1fr;
    max-width: 460px;
    min-height: 0;
  }

  .lg-brand {
    padding: 30px 30px 26px;
  }

  .lg-brand-top {
    margin-top: 0;
  }

  .lg-badge {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    margin-bottom: 14px;
    padding: 10px;
  }

  .lg-title {
    font-size: 22px;
  }

  .lg-tagline {
    font-size: 13px;
    margin-top: 8px;
  }

  .lg-features {
    flex-direction: row;
    gap: 10px;
    padding-top: 20px;
  }

  .lg-feature {
    flex: 1;
    flex-direction: column;
    text-align: center;
    gap: 7px;
  }

  .lg-feature .ft span {
    display: none;
  }

  .lg-form {
    padding: 24px 26px 28px;
  }

  .lg-formtop {
    margin-bottom: 22px;
  }
}

@media (max-width: 420px) {
  body {
    padding: 0;
    align-items: stretch;
  }

  .login-card {
    border-radius: 0;
    max-width: none;
    box-shadow: none;
    min-height: 100vh;
  }

  .lg-features {
    display: none;
  }

  .lg-wordmark span {
    display: none;
  }
}
