/* ==========================================================
   LOGIN · BOUTIQUE / RETAIL
   Diseño premium, neutro y reutilizable para nuevas empresas.
   Todo queda acotado a .container-login para no afectar módulos.
   ========================================================== */

.container-login {
  --login-ink: #17191d;
  --login-ink-soft: #30343a;
  --login-muted: #72767e;
  --login-line: #e6e2dc;
  --login-paper: #fffdfa;
  --login-warm: #f4efe8;
  --login-champagne: #d9b77f;
  --login-champagne-2: #b99057;
  --login-dark: #17181c;
  --login-dark-2: #25272d;
  --login-success: #26a269;

  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
  min-height: 100vh;
  overflow: hidden;
  color: var(--login-ink);
  background: var(--login-paper);
  font-family: "Source Sans Pro", "Segoe UI", Arial, sans-serif;
}

.container-login *,
.container-login *::before,
.container-login *::after {
  box-sizing: border-box;
}

/* ========================= PANEL MARCA ========================= */
.container-login .left-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  padding: clamp(38px, 5.5vw, 78px) clamp(34px, 6vw, 88px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 11% 9%, rgba(217,183,127,.17), transparent 27%),
    radial-gradient(circle at 86% 77%, rgba(217,183,127,.12), transparent 31%),
    linear-gradient(145deg, #121317 0%, #1c1e23 52%, #292b31 100%);
}

.container-login .left-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: .23;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

.fashion-grid {
  position: absolute;
  right: -110px;
  bottom: -130px;
  z-index: -2;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(217,183,127,.16);
  border-radius: 50%;
}

.fashion-grid::before,
.fashion-grid::after {
  content: "";
  position: absolute;
  inset: 44px;
  border: 1px solid rgba(217,183,127,.11);
  border-radius: 50%;
}

.fashion-grid::after {
  inset: 108px;
}

.fashion-shape {
  position: absolute;
  z-index: -2;
  pointer-events: none;
}

.fashion-shape-one {
  top: -105px;
  right: -80px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(217,183,127,.18);
  border-radius: 42% 58% 61% 39% / 43% 40% 60% 57%;
  transform: rotate(21deg);
}

.fashion-shape-two {
  left: 43%;
  bottom: 12%;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255,255,255,.07);
  transform: rotate(45deg);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(100%, 650px);
}

.brand-logo-frame,
.mobile-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}

.brand-logo-frame {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 24px;
}

.brand-logo-frame img,
.mobile-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-frame img {
  border-radius: 18px;
}

.brand-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  background: linear-gradient(145deg, var(--login-dark-2), #40434a);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 600;
}

.brand-name {
  min-width: 0;
}

.brand-kicker,
.form-kicker,
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
}

.brand-kicker {
  display: block;
  margin-bottom: 5px;
  color: #cfb486;
  font-size: 10px;
  font-weight: 700;
}

.brand-name h2 {
  max-width: 480px;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.left-panel .hero-text {
  width: min(100%, 660px);
  margin: auto 0;
  padding: clamp(55px, 9vh, 100px) 0;
  animation: loginFadeUp .7s cubic-bezier(.2,.7,.2,1) both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #d9bd8e;
  font-size: 11px;
  font-weight: 700;
}

.hero-eyebrow i {
  font-size: 11px;
}

.left-panel .descrih1tion {
  max-width: 630px;
  margin: 0 0 22px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 5.1vw, 76px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.035em;
}

.left-panel .description {
  max-width: 600px;
  margin: 0 0 28px;
  color: rgba(255,255,255,.70);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
}

.login-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
}

.login-benefits span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.045);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-benefits i {
  color: var(--login-champagne);
  font-size: 9px;
}

.support-link {
  display: grid;
  grid-template-columns: 40px 1fr 26px;
  align-items: center;
  gap: 12px;
  width: min(100%, 330px);
  padding: 11px 14px 11px 11px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.055);
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.support-link:hover,
.support-link:focus {
  color: #fff;
  border-color: rgba(255,255,255,.20);
  background: rgba(255,255,255,.09);
  text-decoration: none;
  transform: translateY(-2px);
}

.support-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #fff;
  background: #25d366;
  font-size: 20px;
}

.support-link span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.support-link small {
  margin-bottom: 1px;
  color: rgba(255,255,255,.55);
  font-size: 10px;
}

.support-link strong {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.support-arrow {
  color: rgba(255,255,255,.40);
  font-size: 12px;
  text-align: right;
}

.brand-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(255,255,255,.42);
  font-size: 11px;
}

.brand-footnote i {
  color: #bfa372;
}

/* ========================= PANEL LOGIN ========================= */
.container-login .right-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(26px, 5vw, 70px);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 9%, rgba(217,183,127,.16), transparent 24%),
    radial-gradient(circle at 5% 92%, rgba(40,42,48,.05), transparent 28%),
    linear-gradient(155deg, #fffdfa 0%, #f5f1eb 100%);
}

.container-login .right-panel::before {
  content: "";
  position: absolute;
  top: 7%;
  right: -80px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(68,62,52,.055);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(68,62,52,.022), 0 0 0 104px rgba(68,62,52,.014);
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
}

.mobile-brand {
  display: none;
}

.container-login .login-form {
  width: 100%;
  padding: clamp(34px, 4.5vw, 52px);
  border: 1px solid rgba(49,45,40,.10);
  border-radius: 26px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 28px 70px rgba(41,36,30,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: loginCardIn .65s cubic-bezier(.16,1,.3,1) both;
}

.login-form .login-header {
  margin-bottom: 32px;
}

.form-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--login-champagne-2);
  font-size: 10px;
  font-weight: 800;
}

.login-form .login-header h1 {
  margin: 0 0 9px;
  color: var(--login-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 47px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.login-form .login-header .subtitle {
  margin: 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.55;
}

.container-login .form-group {
  margin-bottom: 19px;
}

.container-login .form-group label {
  display: block;
  margin: 0 0 7px;
  color: #35383d;
  font-size: 12px;
  font-weight: 700;
}

.input-wrap {
  position: relative;
}

.container-login .form-control-icon {
  position: absolute;
  top: 50%;
  left: 17px;
  z-index: 2;
  color: #a3a09a;
  font-size: 14px;
  transform: translateY(-50%);
  transition: color .2s ease;
  pointer-events: none;
}

.input-wrap:focus-within .form-control-icon {
  color: var(--login-champagne-2);
}

.right-panel input[type="text"],
.right-panel input[type="password"] {
  display: block;
  width: 100%;
  height: 54px;
  padding: 0 48px 0 46px;
  border: 1px solid #ddd9d2;
  border-radius: 13px;
  outline: none;
  color: var(--login-ink) !important;
  background: #fff;
  font-size: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,.015);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.right-panel input[type="text"]::placeholder,
.right-panel input[type="password"]::placeholder {
  color: #aaa7a1;
}

.right-panel input[type="text"]:focus,
.right-panel input[type="password"]:focus {
  border-color: #c6a46e;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(185,144,87,.12);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  outline: 0;
  color: #99958f;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .2s ease, background-color .2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
  color: #5f584e;
  background: #f5f1eb;
}

.right-panel .login-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 55px;
  margin-top: 7px;
  padding: 0 11px 0 20px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #1b1d21 0%, #2d3036 100%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(27,29,33,.19);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.button-arrow {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  color: #1b1d21;
  background: var(--login-champagne);
}

.right-panel .login-button:hover,
.right-panel .login-button:focus {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 16px 32px rgba(27,29,33,.24);
  transform: translateY(-2px);
}

.right-panel .login-button:active {
  transform: translateY(0);
}

.login-result {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 11px;
  font-size: 12px;
  text-align: center;
}

.login-meta {
  display: grid;
  gap: 16px;
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid #ebe7e1;
}

.meta-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
}

.meta-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #98733e;
  background: #f4ecdf;
  font-size: 13px;
}

.meta-item > span:last-child {
  display: flex;
  flex-direction: column;
}

.meta-item strong {
  color: #474a50;
  font-size: 11px;
  font-weight: 700;
}

.meta-item small {
  margin-top: 1px;
  color: #96928c;
  font-size: 10px;
}

.sunat-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #eeeae4;
  border-radius: 11px;
  background: #faf8f5;
}

.sunat-badge span {
  color: #87837d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.sunat-badge img {
  display: block;
  width: 112px;
  max-width: 44%;
  height: auto;
  opacity: .72;
  transition: opacity .2s ease;
}

.sunat-badge img:hover {
  opacity: 1;
}

.login-footer {
  margin: 18px 0 0;
  color: #92908c;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

@keyframes loginFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========================= TABLET ========================= */
@media (max-width: 1080px) {
  .container-login {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .92fr);
  }

  .container-login .left-panel {
    padding-inline: 44px;
  }

  .left-panel .descrih1tion {
    font-size: clamp(42px, 5vw, 58px);
  }

  .brand-logo-frame {
    width: 78px;
    height: 78px;
    border-radius: 21px;
  }
}

/* ========================= MÓVIL ========================= */
@media (max-width: 820px) {
  .container-login {
    display: block;
    min-height: 100vh;
    overflow: auto;
    background: #f5f1eb;
  }

  .container-login .left-panel {
    min-height: 220px;
    padding: 28px 22px 53px;
    border-radius: 0 0 32px 32px;
  }

  .brand-block,
  .brand-footnote {
    display: none;
  }

  .left-panel .hero-text {
    width: 100%;
    margin: 0;
    padding: 25px 0 0;
    text-align: center;
  }

  .hero-eyebrow {
    margin-bottom: 12px;
    font-size: 9px;
  }

  .left-panel .descrih1tion {
    max-width: 520px;
    margin: 0 auto;
    font-size: clamp(30px, 8.4vw, 43px);
    line-height: 1.08;
  }

  .left-panel .description,
  .login-benefits,
  .support-link {
    display: none;
  }

  .fashion-grid {
    right: -170px;
    bottom: -260px;
  }

  .container-login .right-panel {
    align-items: flex-start;
    min-height: calc(100vh - 190px);
    padding: 0 15px 26px;
    overflow: visible;
    background: transparent;
  }

  .container-login .right-panel::before {
    display: none;
  }

  .login-shell {
    width: min(100%, 520px);
    margin: -27px auto 0;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #fff;
  }

  .mobile-logo {
    width: 48px;
    height: 48px;
    padding: 3px;
    border-radius: 14px;
    box-shadow: 0 11px 24px rgba(0,0,0,.16);
  }

  .mobile-logo img {
    border-radius: 10px;
  }

  .mobile-logo .brand-fallback {
    border-radius: 10px;
    font-size: 20px;
  }

  .mobile-brand > span {
    max-width: 240px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .container-login .login-form {
    padding: 30px 24px 25px;
    border-radius: 22px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 20px 52px rgba(38,34,29,.14);
  }

  .login-form .login-header {
    margin-bottom: 27px;
    text-align: center;
  }

  .login-form .login-header h1 {
    font-size: 36px;
  }
}

@media (max-width: 420px) {
  .container-login .left-panel {
    min-height: 205px;
    padding-inline: 17px;
  }

  .hero-eyebrow {
    letter-spacing: .11em;
  }

  .container-login .login-form {
    padding: 27px 19px 23px;
  }

  .sunat-badge {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .sunat-badge img {
    width: 125px;
    max-width: 100%;
  }

  .meta-item small {
    max-width: 230px;
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .container-login .left-panel,
  .container-login .right-panel {
    min-height: 720px;
  }

  .left-panel .hero-text {
    padding: 48px 0;
  }
}

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