@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --bg: #07111f;
  --surface: rgba(10, 24, 42, 0.78);
  --surface-strong: rgba(8, 20, 36, 0.94);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f7f9fc;
  --muted: #aebbd0;
  --accent: #36d0a1;
  --accent-strong: #21b98d;
  --danger: #ff7c86;
  --danger-bg: rgba(255, 91, 105, 0.12);
  --notice: #75b7ff;
  --notice-bg: rgba(71, 153, 255, 0.12);
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

.access-page {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.access-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.86) contrast(1.05) brightness(.76);
}

.access-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 30%, rgba(31, 166, 136, .24), transparent 38%),
    linear-gradient(90deg, rgba(5, 14, 27, .93) 0%, rgba(5, 14, 27, .75) 48%, rgba(5, 14, 27, .83) 100%),
    linear-gradient(180deg, rgba(5, 14, 27, .14), rgba(5, 14, 27, .82));
}

.access-page--static .access-overlay {
  background:
    radial-gradient(circle at 14% 20%, rgba(54, 208, 161, .19), transparent 28%),
    radial-gradient(circle at 80% 82%, rgba(68, 126, 220, .17), transparent 30%),
    linear-gradient(135deg, #06101d 0%, #0a1b2d 52%, #07111f 100%);
}

.access-grid {
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: .18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, #000, transparent 75%);
}

.access-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 600px);
  min-height: 100vh;
  min-height: 100dvh;
}

.access-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(32px, 5vw, 74px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-mark,
.mobile-brand__mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(94, 239, 193, .72);
  background: rgba(255, 255, 255, .09);
  box-shadow:
    0 0 0 1px rgba(54, 208, 161, .18),
    0 0 22px rgba(54, 208, 161, .34),
    0 0 52px rgba(54, 208, 161, .16),
    0 18px 44px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}

.brand-mark {
  flex: 0 0 auto;
  width: clamp(118px, 8.4vw, 146px);
  height: clamp(118px, 8.4vw, 146px);
  border-radius: 32px;
}

.brand-mark img,
.mobile-brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 13px;
}

.brand-mark span,
.mobile-brand__mark span {
  color: var(--accent);
  font-family: Manrope, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
}

.brand-eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand-lockup h1 {
  max-width: 520px;
  margin: 0;
  overflow: hidden;
  font-family: Manrope, sans-serif;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intro-copy { max-width: 690px; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 9px 13px;
  border: 1px solid rgba(54, 208, 161, .26);
  border-radius: 999px;
  background: rgba(54, 208, 161, .1);
  color: #b9f8e4;
  font-size: .84rem;
  font-weight: 700;
}

.status-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(54, 208, 161, .11);
}

.intro-copy h2 {
  max-width: 760px;
  margin: 0;
  font-family: Manrope, sans-serif;
  font-size: clamp(2.7rem, 5.3vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
  text-wrap: balance;
}

.intro-copy p {
  max-width: 620px;
  margin: 24px 0 0;
  color: #c4cede;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.75;
}

.intro-footer {
  margin: 0;
  color: rgba(225, 232, 242, .65);
  font-size: .86rem;
}

.access-panel {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 34px clamp(24px, 4vw, 64px);
  border-left: 1px solid rgba(255, 255, 255, .08);
  background: rgba(4, 12, 23, .46);
  backdrop-filter: blur(11px);
}

.login-card { width: min(100%, 450px); }

.login-card__header { margin-bottom: 28px; }

.login-kicker {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-card__header h2 {
  margin: 0;
  font-family: Manrope, sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.045em;
}

.login-card__header > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-message {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 22px;
  padding: 13px 14px;
  border: 1px solid;
  border-radius: 13px;
  font-size: .9rem;
  line-height: 1.45;
}

.form-message__icon {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .73rem;
  font-weight: 800;
}

.form-message--error {
  border-color: rgba(255, 124, 134, .28);
  background: var(--danger-bg);
  color: #ffc3c8;
}

.form-message--notice {
  border-color: rgba(117, 183, 255, .28);
  background: var(--notice-bg);
  color: #c9e2ff;
}

.login-form { display: grid; gap: 20px; }

.field-group { display: grid; gap: 9px; }

.field-group label {
  color: #e7edf7;
  font-size: .9rem;
  font-weight: 700;
}

.field-control { position: relative; }

.field-control input {
  width: 100%;
  height: 56px;
  padding: 0 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, .065);
  color: var(--text);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.field-control input::placeholder { color: #8796ab; }

.field-control input:hover { border-color: var(--line-strong); }

.field-control input:focus {
  border-color: rgba(54, 208, 161, .72);
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 4px rgba(54, 208, 161, .11);
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 17px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #91a2b9;
  transform: translateY(-50%);
  pointer-events: none;
}

.field-icon svg,
.password-toggle svg,
.submit-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 11px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #91a2b9;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin-top: 3px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #052219;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(33, 185, 141, .2);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.submit-button svg { width: 19px; height: 19px; }
.submit-button:hover { background: #45ddb0; box-shadow: 0 17px 35px rgba(33, 185, 141, .28); transform: translateY(-1px); }
.submit-button:active { transform: translateY(0); }
.submit-button:focus-visible { outline: 3px solid rgba(54, 208, 161, .32); outline-offset: 3px; }

.login-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
  color: #8494aa;
  font-size: .78rem;
  text-align: center;
}

.security-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(54, 208, 161, .08);
}

.mobile-brand { display: none; }

@media (max-width: 1050px) {
  .access-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, 500px); }
  .access-intro { padding: 42px; }
  .brand-lockup { gap: 22px; }
  .brand-mark {
    width: 112px;
    height: 112px;
    border-radius: 28px;
  }
  .intro-copy h2 { font-size: clamp(2.6rem, 6vw, 4rem); }
}

@media (max-width: 820px) {
  .access-page { overflow: auto; }
  .access-layout { display: block; min-height: 100dvh; }
  .access-intro { display: none; }
  .access-panel {
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
    border-left: 0;
    background: rgba(4, 12, 23, .62);
  }
  .mobile-brand {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:18px;
    width:min(100%,450px);
    margin:0 auto 36px;
    text-align:center;
    font-family:Manrope,sans-serif;
    font-weight:800;
}
.mobile-brand span{
    font-size:2rem;
    letter-spacing:.03em;
}
.mobile-brand__mark{
    width:120px;
    height:120px;
    border-radius:28px;
}
.mobile-brand__mark img{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:10px;
}
  .login-card { margin: 0 auto; }
}

@media (max-width: 480px) {
  .access-panel { display: block; padding-inline: 18px; }
  .mobile-brand { margin-top: 4px; margin-bottom: 42px; }
  .login-card__header h2 { font-size: 2.05rem; }
  .field-control input, .submit-button { min-height: 54px; }
}

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


/* Recuperación de contraseña */
.form-links {
  display: flex;
  justify-content: flex-end;
  margin-top: -7px;
}

.form-links a,
.auth-back-link {
  color: #9cebd2;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  transition: color .18s ease, opacity .18s ease;
}

.form-links a:hover,
.auth-back-link:hover { color: #fff; }

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.auth-help {
  margin: -5px 0 0;
  color: #8fa0b7;
  font-size: .8rem;
  line-height: 1.5;
}

.auth-success {
  display: grid;
  gap: 12px;
  padding: 17px;
  border: 1px solid rgba(54, 208, 161, .28);
  border-radius: 14px;
  background: rgba(54, 208, 161, .1);
  color: #c7fae9;
  line-height: 1.55;
}

.auth-success p { margin: 0; }

.password-rules {
  margin: -7px 0 0;
  padding-left: 18px;
  color: #8fa0b7;
  font-size: .78rem;
  line-height: 1.55;
}
