/* Tarifas Aquore — pantalla de acceso
 * Misma identidad visual que el Portal de catálogos Aquore (Montserrat, paleta teal).
 */
:root {
  --ink: #10292C;
  --deep: #0B3B40;
  --deeper: #072A2E;
  --teal: #12A9B3;
  --teal-d: #0E8F98;
  --mist: #E8F5F6;
  --mist-2: #F2FAFA;
  --line: #E1EEEF;
  --line-2: #CFE6E8;
  --text-2: #3E5E62;
  --text-3: #5B777B;
  --danger: #B03A3A;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-d); text-decoration: none; }
a:hover { color: #0B5E66; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); }

/* ── Panel de marca ───────────────────────── */
.auth__brand {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(18,169,179,.55) 0%, rgba(18,169,179,0) 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(14,143,152,.45) 0%, rgba(14,143,152,0) 60%),
    linear-gradient(160deg, var(--deep) 0%, var(--deeper) 100%);
  padding: clamp(36px, 6vw, 72px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.ring { position: absolute; border-radius: 50%; pointer-events: none; }
.ring--a { width: 720px; height: 720px; right: -260px; top: -300px; border: 56px solid rgba(255,255,255,.05); }
.ring--b { width: 420px; height: 420px; left: -180px; bottom: -200px; border: 34px solid rgba(18,169,179,.16); }
.ring--c { width: 160px; height: 160px; right: 18%; bottom: 12%; border: 2px solid rgba(255,255,255,.12); }

.brand__copy { position: relative; z-index: 1; max-width: 520px; animation: rise .7s ease both; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--teal-d); font-weight: 600;
}
.eyebrow--light { color: #8FE3E8; }
.brand__title {
  margin: 18px 0 0; font-weight: 300; font-size: clamp(40px, 5.4vw, 72px); line-height: 1; letter-spacing: -.01em;
}
.brand__title span { color: var(--teal); font-weight: 400; }
.brand__lead { margin: 20px 0 0; font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; color: rgba(255,255,255,.72); max-width: 44ch; }

/* Tarjetas de tarifa decorativas */
.sheets { position: relative; z-index: 1; height: clamp(240px, 34vh, 340px); max-width: 520px; width: 100%; }
.sheet {
  position: absolute; width: 62%; border-radius: 16px; padding: 18px 18px 14px; background: rgba(255,255,255,.96); color: var(--deep);
  box-shadow: 0 40px 60px -24px rgba(0,0,0,.55), 0 6px 16px rgba(0,0,0,.2);
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet__tag { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; color: var(--teal-d); }
.sheet__badge { font-size: 9px; font-weight: 600; padding: 3px 7px; border-radius: 999px; background: #E2F4EA; color: #11804A; }
.sheet__row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 11px; }
.sheet__row i { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: var(--mist); }
.sheet__row b { flex: 1; height: 7px; border-radius: 4px; background: #DCEAEC; }
.sheet__row span { font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet--1 { left: 0; top: 6%; transform: rotate(-6deg); animation: floatA 7s ease-in-out infinite; }
.sheet--2 { right: 0; bottom: 0; width: 58%; background: linear-gradient(160deg, #12A9B3, #0B5E66); color: #fff; animation: floatB 8s ease-in-out infinite .6s; }
.sheet--2 .sheet__tag { color: #CFF0F2; }
.sheet--2 .sheet__row { border-color: rgba(255,255,255,.18); }
.sheet--2 .sheet__row i { background: rgba(255,255,255,.18); }
.sheet--2 .sheet__row b { background: rgba(255,255,255,.28); }
@keyframes floatA { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10px) rotate(-5deg); } }
@keyframes floatB { 0%, 100% { transform: translateY(0) rotate(5deg); } 50% { transform: translateY(-12px) rotate(6deg); } }

/* ── Panel del formulario ─────────────────── */
.auth__panel {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 64px) 24px; background: #fff;
}
.panel { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 30px; margin: auto 0; animation: rise .6s ease .1s both; }
.panel__logo { height: 38px; width: auto; align-self: flex-start; mix-blend-mode: multiply; }
.panel__head { display: flex; flex-direction: column; gap: 10px; }
.panel__head h1 { margin: 0; font-weight: 400; font-size: clamp(30px, 3vw, 38px); color: var(--deep); letter-spacing: -.01em; }
.panel__head p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form.has-error .pw, .form.shake { animation: shake .45s ease; }
.field { font-size: 13px; font-weight: 500; color: var(--text-2); }
.pw {
  position: relative; display: flex; align-items: center; height: 56px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--mist-2);
  transition: border-color .2s, box-shadow .2s, background .2s; margin-top: -6px;
}
.pw:focus-within { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(18,169,179,.12); }
.form.has-error .pw { border-color: #D98080; background: #FFF8F8; }
.pw__icon { flex: 0 0 auto; margin-left: 16px; color: var(--teal-d); }
.pw input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; padding: 0 12px;
  font: inherit; font-size: 17px; color: var(--ink); letter-spacing: .04em;
}
.pw input::placeholder { color: #A8BDBF; letter-spacing: .2em; }
.pw input:disabled { cursor: not-allowed; }
.pw__toggle {
  flex: 0 0 auto; width: 44px; height: 44px; margin-right: 6px; border: 0; border-radius: 10px; background: transparent; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, color .2s;
}
.pw__toggle:hover { background: var(--mist); color: var(--deep); }
.pw__toggle .eye-off { display: none; }
.pw__toggle.is-on .eye-on { display: none; }
.pw__toggle.is-on .eye-off { display: block; }

.error {
  display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: 13px; font-weight: 500;
  background: #FBEFEF; border: 1px solid #F0CACA; border-radius: 10px; padding: 10px 12px;
}
.error svg { flex: 0 0 auto; }

.check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; margin: 2px 0 6px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); background: #fff; color: #fff;
  display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s;
}
.check__box svg { opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.check input:checked + .check__box { background: var(--teal); border-color: var(--teal); }
.check input:checked + .check__box svg { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { outline: 2px solid var(--teal); outline-offset: 2px; }

.submit {
  position: relative; height: 56px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-d) 100%); color: #fff;
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 14px 28px -14px rgba(18,169,179,.8); transition: transform .2s, box-shadow .2s, filter .2s;
}
.submit:hover { transform: translateY(-1px); box-shadow: 0 18px 32px -14px rgba(18,169,179,.9); filter: brightness(1.04); }
.submit:active { transform: none; }
.submit:disabled { cursor: not-allowed; opacity: .6; transform: none; }
.submit__arrow { transition: transform .2s; }
.submit:hover .submit__arrow { transform: translateX(3px); }
.submit__spinner { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.submit.is-loading { opacity: 1; }
.submit.is-loading .submit__label, .submit.is-loading .submit__arrow { display: none; }
.submit.is-loading .submit__spinner { display: block; }

.panel__help { margin: -6px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-3); }

.auth__foot {
  padding-bottom: env(safe-area-inset-bottom);
  width: 100%; max-width: 400px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  font-size: 12px; color: var(--text-3); padding-top: 28px;
}

/* ── Móvil ────────────────────────────────── */
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth__panel, .panel { min-width: 0; }
  .panel { margin: 0 0 auto; }
  .auth__brand { padding: 28px 20px 32px; gap: 0; }
  .brand__title { font-size: clamp(34px, 9vw, 44px); margin-top: 12px; }
  .brand__lead, .sheets { display: none; }
  .ring--a { width: 420px; height: 420px; right: -170px; top: -220px; border-width: 36px; }
  .ring--b, .ring--c { display: none; }
  .auth__panel { padding: 32px 20px 20px; justify-content: flex-start; }
  .panel { gap: 24px; }
  .panel__logo { display: none; }
}

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