/* ===== Intian Portal — mismos tokens que el sitio ===== */
:root {
  --ink: #1b1030;
  --muted: #6c6483;
  --tint: #f6f2fb;
  --line: #e8e1f2;
  --deep: #2a0b52;
  --deep-2: #43137a;
  --magenta: #d6247f;
  --purple: #8e3fa8;
  --teal: #22b8b0;
  --yellow: #ffd23f;
  --shadow: 0 20px 50px -24px rgba(42, 11, 82, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: #f3eff9; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.portal { min-height: 100%; display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; padding: 16px; }

/* ===== Panel de marca (mismo hero del sitio) ===== */
.brandside {
  --notch-x: 150px; --notch-y: 110px;
  position: relative; overflow: hidden; color: #fff; border-radius: 32px;
  background:
    linear-gradient(160deg, rgba(52, 14, 100, .92) 0%, rgba(52, 14, 100, .78) 50%, rgba(42, 11, 82, .55) 100%),
    url("../assets/hero-red-v2.jpg") 70% 60% / cover no-repeat,
    var(--deep);
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--notch-x) 100%, 0 calc(100% - var(--notch-y)));
}
.brandside__inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: 40px 48px 56px; }
.brandside__logo img { height: 44px; width: auto; }
.brandside__copy { margin: auto 0; padding: 48px 0; max-width: 30rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin-bottom: .9rem; }
.brandside h1 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); font-weight: 800; }
.grad { background: linear-gradient(100deg, var(--yellow), #ff8fc5 55%, #7ef0e6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.perks { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.perks li { display: flex; align-items: center; gap: .85rem; font-weight: 600; color: rgba(255, 255, 255, .9); }
.perk__icon {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); color: var(--yellow);
}
.perk__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.perk__icon svg .fill { fill: currentColor; stroke: none; }
.brandside__back { align-self: flex-start; margin-left: calc(var(--notch-x) - 48px); font-weight: 700; font-size: .9rem; text-decoration: none; color: rgba(255, 255, 255, .8); }
.brandside__back:hover { color: #fff; }

/* ===== Formulario ===== */
.loginside { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.card { width: 100%; max-width: 440px; background: #fff; border-radius: 28px; padding: 40px; box-shadow: var(--shadow); }
.card__logo { display: none; margin-bottom: 1.5rem; }
.card__logo img { height: 36px; width: auto; }
.card h2 { font-size: 1.9rem; font-weight: 800; color: var(--deep); margin-bottom: .25rem; }
.card > .muted { margin-bottom: 1.75rem; }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; font-weight: 700; font-size: .9rem; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.field input {
  font: inherit; font-weight: 500; width: 100%; padding: .85rem 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #a39cb5; }
.field input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px #efe4f8; }
.pass { position: relative; display: block; }
.pass input { padding-right: 3rem; }
.pass__toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.pass__toggle:hover { background: var(--tint); color: var(--deep); }
.pass__toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pass__toggle[aria-pressed="true"] { color: var(--purple); }

.check { display: flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--purple); }

.link { color: var(--magenta); font-weight: 700; text-decoration: none; font-size: .88rem; }
.link:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: .95rem 1.4rem; border-radius: 12px;
  font: inherit; font-weight: 800; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--block { width: 100%; }
.btn--primary { background: var(--yellow); border-color: var(--yellow); color: var(--deep); box-shadow: 0 12px 24px -14px rgba(255, 190, 30, .9); }
.btn--primary:hover { background: #ffdc66; border-color: #ffdc66; }

.alert { display: flex; align-items: center; gap: .6rem; background: #fdecef; border: 1px solid #f7c3cd; color: #9b1c3a; padding: .8rem 1rem; border-radius: 12px; font-size: .9rem; font-weight: 600; }
.alert[hidden] { display: none; }
.alert svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.field input.is-invalid { border-color: #e0567a; box-shadow: 0 0 0 4px #fde3ea; }
.shake { animation: shake .35s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.btn[disabled] { opacity: .75; cursor: progress; transform: none; }

.divider { display: flex; align-items: center; gap: .8rem; margin: 1.75rem 0 1rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.help { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: 14px; background: var(--tint); text-decoration: none; transition: transform .15s; }
.help:hover { transform: translateX(3px); }
.help__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; }
.help__icon img { width: 22px; height: 22px; }
.help strong { display: block; color: var(--deep); font-size: .95rem; }
.help span span, .help > span:last-child { font-size: .85rem; color: var(--muted); }

.card__foot { margin: 1.5rem 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.legal { margin: 1.5rem 0 0; font-size: .8rem; color: var(--muted); }
.legal a { color: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .portal { grid-template-columns: 1fr; }
  .brandside { --notch-x: 90px; --notch-y: 60px; }
  .brandside__inner { padding: 28px 28px 40px; }
  .brandside__copy { padding: 28px 0 8px; }
  .brandside h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
  .perks { grid-template-columns: 1fr 1fr; gap: .7rem 1rem; margin-top: 1.4rem; }
  .perks li { font-size: .9rem; }
  .brandside__back { display: none; }
  .loginside { padding: 8px 0 24px; }
}
@media (max-width: 600px) {
  .portal { padding: 8px; gap: 8px; }
  .brandside { border-radius: 24px; --notch-x: 56px; --notch-y: 40px; }
  .brandside__inner { padding: 22px 20px 32px; }
  .brandside__logo img { height: 34px; }
  .perks { grid-template-columns: 1fr; }
  .perk__icon { width: 32px; height: 32px; }
  .perk__icon svg { width: 18px; height: 18px; }
  .card { padding: 28px 22px; border-radius: 22px; }
  .card h2 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
