@font-face { font-family: "Inter"; src: url("inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #ffffff; --bg-2: #f5f5f7; --text: #1d1d1f; --text-2: #6e6e73; --line: #d2d2d7;
  --blue: #0071e3; --link: #0066cc; --red: #c4161c; --green: #1a8f3c; --amber: #b25e00;
  --green-bg: #e6f4ea; --amber-bg: #fff4e0; --red-bg: #fdecec; --blue-bg: #e8f1fc;
  --card: #ffffff; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg-2); font-size: 17px; letter-spacing: -0.022em; line-height: 1.4; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.1; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
.btn { appearance: none; border: 0; border-radius: 980px; padding: 13px 22px; font-weight: 600; font-size: 17px; cursor: pointer; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .15s, opacity .15s, background .15s; touch-action: manipulation; user-select: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sec { background: var(--bg-2); color: var(--text); }
.btn.peligro { background: var(--red-bg); color: var(--red); }
.btn.ok { background: var(--green); }
.btn.chico { padding: 8px 14px; font-size: 15px; }
.btn.bloque { width: 100%; }
label.campo { display: block; margin-bottom: 14px; }
label.campo > span { display: block; font-size: 14px; color: var(--text-2); margin: 0 0 6px 4px; font-weight: 500; }
.input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 17px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,113,227,.15); }
textarea.input { resize: vertical; min-height: 70px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 980px; padding: 4px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.aprobado, .chip.al_dia, .chip.pagado { background: var(--green-bg); color: var(--green); }
.chip.pendiente { background: var(--amber-bg); color: var(--amber); }
.chip.rechazado, .chip.en_mora { background: var(--red-bg); color: var(--red); }
.chip.sin_plan { background: var(--bg-2); color: var(--text-2); }
.error { background: var(--red-bg); color: var(--red); border-radius: 12px; padding: 10px 14px; font-size: 15px; margin-bottom: 14px; }
.oculto { display: none !important; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: rgba(29,29,31,.92); color: #fff; padding: 12px 18px; border-radius: 980px; font-size: 15px; opacity: 0; transition: opacity .25s, transform .25s; z-index: 100; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== Armonía con la página web de Mi Kasa: rojo de marca, fondos y botones ===== */
:root { --blue: #c4161c; --link: #c4161c; --blue-bg: #fdecec; }
body { background: radial-gradient(55% 45% at 0% 0%, rgba(201,160,110,.13), transparent 70%), radial-gradient(50% 50% at 100% 100%, rgba(196,22,28,.06), transparent 70%), var(--bg-2); background-attachment: fixed; }
.btn { box-shadow: 0 8px 20px -12px rgba(196,22,28,.7); }
.btn:hover:not(:disabled) { background: #a51016; }
.btn.sec, .btn.peligro, .btn.ok { box-shadow: none; }
.btn.sec:hover:not(:disabled) { background: #e8e8ed; }
.btn.peligro:hover:not(:disabled) { background: #f9d9da; }
.btn.ok:hover:not(:disabled) { background: #157433; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(196,22,28,.14); }
/* pantallas de entrada: fondo oscuro con brillo rojo, como las secciones oscuras de la página */
.fondo-marca::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 85% 8%, rgba(196,22,28,.38), transparent 65%), radial-gradient(50% 50% at 0% 100%, rgba(196,22,28,.2), transparent 70%), #0b0b0c; }
.fondo-marca h1 { color: #fff; }
.logo-pill { background: #fff; border-radius: 20px; padding: 12px 18px; box-sizing: content-box; box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); }
.fondo-marca form h1 { color: var(--text); }

/* ===== Entradas con fotos (se turnan) ===== */
.login-media { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(60% 55% at 85% 8%, rgba(196,22,28,.38), transparent 65%), radial-gradient(50% 50% at 0% 100%, rgba(196,22,28,.2), transparent 70%), #0b0b0c; }
.login-media .lm-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.6s ease, transform 7s ease-out; }
.login-media .lm-img.on { opacity: 1; transform: scale(1); }
.login-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,12,.6) 0%, rgba(11,11,12,.3) 30%, rgba(11,11,12,.55) 60%, rgba(11,11,12,.92) 100%); }
@media (min-width: 900px) {
  .login-media .lm-wrap { position: absolute; top: 0; bottom: 0; left: 0; width: 56%; overflow: hidden; border-radius: 0 36px 36px 0; box-shadow: 30px 0 80px -30px rgba(0,0,0,.9); }
  .login-media::after { left: 0; width: 56%; border-radius: 0 36px 36px 0; background: linear-gradient(0deg, rgba(11,11,12,.85) 0%, rgba(11,11,12,.25) 45%, rgba(11,11,12,.15) 100%); }
}
@media (max-width: 899px) { .login-media .lm-wrap { position: absolute; inset: 0; } }
.login-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 22px; }
.login-chips span { padding: 7px 13px; border-radius: 980px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 13.5px; font-weight: 600; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.login-pie { color: rgba(255,255,255,.6); font-size: 13px; text-align: center; margin-top: 18px; }
.login-fotos { display: none !important; }
@media (prefers-reduced-motion: reduce) { .login-media .lm-img { transition: opacity .3s; transform: none; } }

/* ===== Entradas (v3): referencia con foto a la izquierda y tarjeta a la derecha ===== */
section.lg { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0; max-width: none; margin: 0; color: #fff; }
.lg .lg-left { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 22px 20px 10px; min-height: 46dvh; }
.lg .lg-logo { width: 150px; background: #fff; border-radius: 14px; padding: 10px 14px; box-sizing: content-box; box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); align-self: flex-start; }
.lg .lg-title { font-size: 34px; line-height: 1.05; letter-spacing: -.035em; color: #fff; margin: 0; text-shadow: 0 2px 24px rgba(0,0,0,.45); text-align: left; }
.lg .lg-lead { color: rgba(255,255,255,.85); font-size: 16px; line-height: 1.45; margin: 10px 0 16px; text-align: left; font-weight: 500; }
.lg .lg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg .lg-chips span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 980px; border: 1.5px solid rgba(255,255,255,.75); color: #fff; font-size: 14px; font-weight: 600; background: rgba(0,0,0,.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lg .lg-chips svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg .lg-right { position: relative; padding: 12px 16px 28px; display: flex; flex-direction: column; align-items: center; }
.lg .lg-card { width: 100%; max-width: 440px; background: #fff; color: var(--text); border-radius: 14px; padding: 28px 26px 20px; box-shadow: 0 40px 90px -40px rgba(0,0,0,.95); }
.lg .lg-card h2 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 6px; color: var(--text); }
.lg .lg-card .lg-sub { color: var(--text-2); font-size: 16px; margin: 0 0 22px; }
.lg .lg-card label.campo > span { color: var(--text); font-weight: 700; font-size: 14.5px; margin-left: 0; }
.lg .lg-card .input { background: #f2f2f4; border-color: #e3e3e8; border-radius: 8px; font-size: 16px; }
.lg .lg-card .input:focus { background: #fff; }
.lg .lg-card .pin { text-align: left; letter-spacing: .35em; font-size: 20px; }
.lg .lg-card .btn { border-radius: 8px; background: #b3121a; font-size: 16.5px; padding: 15px 22px; margin-top: 6px; }
.lg .lg-card .btn:hover:not(:disabled) { background: #96060d; }
.lg .lg-seguro { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 13.5px; margin: 16px 0 0; }
.lg .lg-seguro svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.lg .lg-pin { text-align: center; color: #fff; font-size: 15px; margin: 26px 0 0; line-height: 1.6; }
.lg .lg-pin a { color: #ff2a33; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lg .lg-priv { text-align: center; margin: 22px 0 0; font-size: 13.5px; }
.lg .lg-priv a, .lg .lg-priv { color: rgba(255,255,255,.6); text-decoration: none; }
@media (min-width: 900px) {
  section.lg { display: grid; grid-template-columns: 55% 45%; align-items: stretch; }
  .lg .login-media .lm-wrap { width: 55%; border-radius: 0; box-shadow: none; }
  .lg .login-media::after { width: 55%; border-radius: 0; background: linear-gradient(0deg, rgba(11,11,12,.88) 0%, rgba(11,11,12,.35) 40%, rgba(11,11,12,0) 70%); }
  .lg .lg-left { min-height: 100dvh; padding: 52px 56px 72px; }
  .lg .lg-logo { width: 170px; padding: 14px 20px; }
  .lg .lg-title { font-size: clamp(42px, 4.3vw, 62px); }
  .lg .lg-lead { font-size: 21px; max-width: 520px; }
  .lg .lg-chips span { padding: 11px 18px; font-size: 15.5px; }
  .lg .lg-right { justify-content: center; padding: 40px 40px; }
  .lg .lg-priv { position: absolute; bottom: 28px; left: 0; right: 0; margin: 0; }
}

/* ===== Mis pagos (v4): tarjetas flotantes sobre la foto ===== */
.lg .lg-float { position: absolute; right: 18px; top: 18px; display: grid; gap: 12px; justify-items: end; pointer-events: none; }
.lgf-saldo, .lgf-noti { display: flex; align-items: center; gap: 12px; color: #fff; background: rgba(20,20,22,.42); border: 1px solid rgba(255,255,255,.22); border-radius: 22px; -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); box-shadow: 0 24px 60px -24px rgba(0,0,0,.8); }
.lgf-saldo { position: relative; padding: 14px 18px 14px 14px; animation: lgfFlota 6s ease-in-out infinite; }
.lgf-ring { width: 64px; height: 64px; transform: rotate(-90deg); flex: none; }
.lgf-ring circle { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 11; }
.lgf-ring .lgf-arc { stroke: #ff3b45; stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314; animation: lgfArco 2.2s .6s cubic-bezier(.2,.8,.2,1) forwards; }
.lgf-pct { position: absolute; left: 14px; top: 14px; width: 64px; height: 64px; display: grid; place-content: center; text-align: center; line-height: 1; }
.lgf-pct b { font-size: 17px; } .lgf-pct small { font-size: 9.5px; opacity: .75; }
.lgf-txt small { display: block; font-size: 11.5px; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.lgf-txt b { display: block; font-size: 15.5px; margin: 2px 0; } .lgf-txt span { font-size: 12.5px; opacity: .8; }
.lgf-noti { padding: 10px 16px 10px 10px; opacity: 0; transform: translateY(10px) scale(.96); animation: lgfNoti 9s 1.6s ease-in-out infinite; }
.lgf-noti i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: #1fb45a; box-shadow: 0 0 0 6px rgba(31,180,90,.22); }
.lgf-noti b { display: block; font-size: 14px; } .lgf-noti small { font-size: 12px; opacity: .75; }
@keyframes lgfArco { to { stroke-dashoffset: 88; } }
@keyframes lgfFlota { 50% { transform: translateY(-8px); } }
@keyframes lgfNoti { 0%, 6% { opacity: 0; transform: translateY(10px) scale(.96); } 12%, 70% { opacity: 1; transform: none; } 78%, 100% { opacity: 0; transform: translateY(-6px) scale(.98); } }
/* luz que recorre la foto */
.lg .login-media .lm-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,236,200,.10) 48%, transparent 60%); background-size: 250% 100%; animation: lgfLuz 9s ease-in-out infinite; pointer-events: none; z-index: 1; }
@keyframes lgfLuz { 0% { background-position: 130% 0; } 60%, 100% { background-position: -60% 0; } }
.lg .login-media .lm-img { transition: opacity 1.8s ease, transform 12s ease-out; transform: scale(1.1); }
.lg .login-media .lm-img.on { transform: scale(1.0); }
@media (max-width: 899px) {
  .lg .lg-float { display: none; }
  .lgf-saldo { display: none; }
}
@media (min-width: 900px) { .lg .lg-float { right: 32px; top: 52px; } .lgf-saldo { padding: 16px 22px 16px 16px; } }
@media (prefers-reduced-motion: reduce) { .lgf-saldo, .lgf-noti, .lg .login-media .lm-wrap::after { animation: none; } .lgf-noti { opacity: 1; transform: none; } .lgf-ring .lgf-arc { animation: none; stroke-dashoffset: 88; } }
/* ===== Panel derecho de las entradas: plano de fondo, luces que se mueven y casa en línea ===== */
.lg .lg-right { isolation: isolate; overflow: hidden; }
.lg .lg-kicker { display: none; }
.lg .lg-casa { display: none; }
@media (min-width: 900px) {
  .lg .lg-right::before { content: ""; position: absolute; inset: -20%; z-index: -2; background:
      radial-gradient(38% 30% at 70% 20%, rgba(196,22,28,.55), transparent 70%),
      radial-gradient(34% 28% at 20% 85%, rgba(201,140,70,.22), transparent 70%),
      radial-gradient(30% 26% at 85% 80%, rgba(120,10,16,.45), transparent 70%);
    filter: blur(20px); animation: lgAurora 18s ease-in-out infinite alternate; }
  .lg .lg-right::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image:
      linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
      linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 85%); mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 85%); }
  .lg .lg-casa { display: block; position: absolute; z-index: -1; width: 118%; max-width: 760px; left: 50%; top: 50%; transform: translate(-50%, -58%); fill: none; stroke: rgba(255,255,255,.07); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
  .lg .lg-casa path:first-child { stroke: rgba(255,59,69,.35); stroke-width: 3; stroke-dasharray: 520; stroke-dashoffset: 520; animation: lgTecho 2.4s .3s cubic-bezier(.2,.8,.2,1) forwards; }
  .lg .lg-kicker { display: flex; align-items: center; gap: 10px; align-self: center; width: 100%; max-width: 440px; margin: 0 0 14px; color: rgba(255,255,255,.75); font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
  .lg .lg-kicker i { width: 28px; height: 2px; border-radius: 2px; background: #ff3b45; box-shadow: 0 0 12px #ff3b45; }
  .lg .lg-card { position: relative; box-shadow: 0 50px 100px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.08); }
  .lg .lg-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: 15px; background: linear-gradient(135deg, rgba(255,59,69,.9), rgba(255,59,69,0) 40%, rgba(255,255,255,0) 60%, rgba(201,140,70,.7)); filter: blur(14px); opacity: .55; }
}
@keyframes lgAurora { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-4%, 3%) scale(1.08); } 100% { transform: translate(3%, -2%) scale(1.02); } }
@keyframes lgTecho { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .lg .lg-right::before { animation: none; } .lg .lg-casa path:first-child { animation: none; stroke-dashoffset: 0; } }

.lgf-360 { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.2); border-top-color: #ff3b45; border-right-color: #ff3b45; animation: lgfGira 3.5s linear infinite; }
.lgf-360 span { font-weight: 800; font-size: 15px; animation: lgfGira 3.5s linear infinite reverse; }
.lgf-noti i { font-size: 12px; }
@keyframes lgfGira { to { transform: rotate(360deg); } }
