/* Meraki Glass · pantallas de ingreso (administrador y empresas). Personalización Meraki. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --mg-gold: #f5c542; --mg-gold-2: #f2b92c; --mg-on-accent: #14110a;
  --mg-amber-1: #e2621f; --mg-amber-2: #f59a3e;
  --mg-ink: #f5f3ef; --mg-muted: rgba(255, 255, 255, .70); --mg-subtle: rgba(255, 255, 255, .58);
  --mg-ok: #5fd39a; --mg-danger: #f47a7a;
  --mg-ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.mg-login {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--mg-ink); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; position: relative; overflow-x: hidden;
}
.mg-login a { color: var(--mg-gold); text-decoration: none; }
.mg-login a:hover { color: #ffd970; }
.mg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Fondo con ondas doradas (administrador) ---------- */
.mg-login--admin { background: radial-gradient(120% 90% at 80% 10%, #1a1408 0%, #07070a 55%); }
.mg-waves { position: fixed; inset: -4%; width: 108%; height: 108%; pointer-events: none; animation: mg-drift 18s ease-in-out infinite; }

/* ---------- Tarjeta de vidrio con esquinas cortadas ---------- */
.mg-card-wrap { position: relative; width: 100%; max-width: 460px; animation: mg-rise .7s var(--mg-ease) both; }
.mg-corner { position: absolute; width: 92px; height: 92px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 14px; }
.mg-corner--tl { left: -22px; top: -22px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.mg-corner--br { right: -22px; bottom: -22px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.mg-card-edge { padding: 1px; background: linear-gradient(140deg, rgba(255,255,255,.35), rgba(255,255,255,.06) 40%, rgba(245,197,66,.35)); clip-path: polygon(44px 0, 100% 0, 100% calc(100% - 44px), calc(100% - 44px) 100%, 0 100%, 0 44px); }
.mg-card { display: flex; flex-direction: column; gap: 18px; padding: 44px 40px 36px; background: rgba(14,14,18,.62); -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); clip-path: polygon(43px 0, 100% 0, 100% calc(100% - 43px), calc(100% - 43px) 100%, 0 100%, 0 43px); }
.mg-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.mg-badge-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(245,197,66,.45); background: rgba(245,197,66,.08); box-shadow: 0 0 24px rgba(245,197,66,.18); }
.mg-logo { max-width: 200px; max-height: 64px; object-fit: contain; }
.mg-title { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.mg-title span { color: var(--mg-gold); }
.mg-sub { margin: 6px 0 0; font-size: 14px; color: var(--mg-muted); }

/* ---------- Campos ---------- */
.mg-field { display: flex; flex-direction: column; gap: 8px; }
.mg-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.82); }
.mg-input-wrap { position: relative; }
.mg-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.55); pointer-events: none; }
.mg-input { width: 100%; height: 48px; padding: 0 14px 0 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #fff; font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.mg-input--pass { padding-right: 52px; }
.mg-input::placeholder { color: rgba(255,255,255,.35); }
.mg-input:focus { outline: none; border-color: rgba(245,197,66,.7); box-shadow: 0 0 0 3px rgba(245,197,66,.15); }
.mg-input.is-invalid { border-color: var(--mg-danger); }
.mg-error { font-size: 12px; color: var(--mg-danger); }
.mg-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; color: rgba(255,255,255,.6); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.mg-eye[aria-pressed="true"] { color: var(--mg-gold); }
.mg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.mg-check { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.72); cursor: pointer; min-height: 44px; }
.mg-check input { width: 18px; height: 18px; accent-color: var(--mg-gold); margin: 0; }

/* ---------- Botón ---------- */
.mg-btn { height: 52px; border: 0; border-radius: 12px; background: linear-gradient(180deg, #ffd95e, var(--mg-gold-2)); color: #1a1407; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 30px rgba(242,185,44,.28), inset 0 1px 0 rgba(255,255,255,.5); transition: transform .15s var(--mg-ease), filter .2s; width: 100%; }
.mg-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.mg-btn:focus-visible, .mg-eye:focus-visible, .mg-login a:focus-visible { outline: 2px solid var(--mg-gold); outline-offset: 3px; }
.mg-btn[aria-busy="true"] { pointer-events: none; }
.mg-spin { animation: mg-spin .8s linear infinite; }
.mg-secure { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 6px; font-size: 12px; color: var(--mg-subtle); }
.mg-foot { position: relative; margin-top: 36px; font-size: 12px; color: rgba(255,255,255,.5); text-align: center; }
.mg-alert { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--mg-danger); color: var(--mg-danger); font-size: 13px; }

/* ---------- Login de empresa: panel en diagonal ámbar ---------- */
.mg-login--tenant { background: radial-gradient(90% 70% at 15% 85%, #24130a 0%, #08080b 60%); }
.mg-split { position: relative; width: 100%; max-width: 980px; min-height: 560px; border-radius: 22px; overflow: hidden; background: rgba(22,20,24,.88); display: flex; flex-wrap: wrap; animation: mg-glow 4s ease-in-out infinite; }
.mg-split__diag { position: absolute; inset: 0; background: linear-gradient(135deg, #3a1d0c 0%, #b5521c 55%, #f08a3c 100%); clip-path: polygon(52% 0, 100% 0, 100% 100%, 38% 100%); animation: mg-diag .9s var(--mg-ease) both; }
.mg-split__form { position: relative; flex: 1 1 380px; max-width: 460px; padding: 56px 52px; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.mg-split__brand { position: relative; flex: 1 1 380px; padding: 56px 52px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 18px; text-align: right; }
.mg-login--tenant .mg-input { padding-left: 0; padding-right: 36px; border: 0; border-bottom: 2px solid rgba(255,255,255,.28); border-radius: 0; background: transparent; }
.mg-login--tenant .mg-input--pass { padding-right: 48px; }
.mg-login--tenant .mg-input:focus { border-bottom-color: var(--mg-amber-2); box-shadow: none; }
.mg-login--tenant .mg-input-icon { left: auto; right: 4px; }
.mg-login--tenant .mg-eye { right: -10px; }
.mg-login--tenant .mg-eye[aria-pressed="true"] { color: var(--mg-amber-2); }
.mg-login--tenant .mg-btn { border-radius: 999px; background: linear-gradient(90deg, var(--mg-amber-1), var(--mg-amber-2)); color: #fff; box-shadow: 0 10px 30px rgba(226,98,31,.35); }
.mg-login--tenant a { color: var(--mg-amber-2); }
.mg-login--tenant .mg-check input { accent-color: var(--mg-amber-2); }
.mg-brand-logo { width: 104px; height: 104px; border-radius: 22px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 10px; }
.mg-brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mg-brand-title { margin: 0; font-size: 40px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.mg-brand-text { margin: 0; max-width: 320px; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.94); }
.mg-pill { padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.32); font-size: 12px; font-weight: 600; }
.mg-pills { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mg-in { animation: mg-blur-in .7s var(--mg-ease) both; } .mg-in-2 { animation-delay: .12s; } .mg-in-3 { animation-delay: .24s; }

@media (max-width: 760px) {
  .mg-split__diag { clip-path: polygon(0 0, 100% 0, 100% 42%, 0 30%); }
  .mg-split__brand { order: -1; align-items: flex-start; text-align: left; padding: 36px 28px 0; }
  .mg-split__form { padding: 28px; }
  .mg-pills { justify-content: flex-start; }
  .mg-card { padding: 36px 24px 28px; }
}

@keyframes mg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mg-blur-in { from { opacity: 0; transform: translateX(30px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes mg-diag { from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); } }
@keyframes mg-drift { 0%,100% { transform: none; } 50% { transform: translate3d(-2%,1.5%,0) scale(1.03); } }
@keyframes mg-spin { to { transform: rotate(360deg); } }
@keyframes mg-glow { 0%,100% { box-shadow: 0 0 0 1px rgba(245,161,58,.55), 0 0 40px rgba(245,120,40,.25); } 50% { box-shadow: 0 0 0 1px rgba(245,161,58,.8), 0 0 70px rgba(245,120,40,.4); } }
/* v2 (07/11/2026) · M18 botón con brillo que cruza, pulsación y onda; campos con línea de luz; icono que se enciende */
.mg-btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .15s var(--mg-ease), filter .2s, box-shadow .25s var(--mg-ease); }
.mg-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%); background-size: 260% 100%; background-position: 130% 0; transition: background-position .8s var(--mg-ease); }
.mg-btn:hover::before { background-position: -30% 0; }
.mg-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(242,185,44,.38), inset 0 1px 0 rgba(255,255,255,.5); }
.mg-login--tenant .mg-btn:hover { box-shadow: 0 16px 36px rgba(226,98,31,.45); }
.mg-btn:active { transform: translateY(1px) scale(.97); transition-duration: 60ms; }
.mg-btn:active::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: mg-press-ring .6s var(--mg-ease); }
@keyframes mg-press-ring { from { box-shadow: 0 0 0 0 rgba(255,255,255,.45) inset; } to { box-shadow: 0 0 0 26px rgba(255,255,255,0) inset; } }
.mg-input-wrap::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--mg-gold), transparent); transform: scaleX(0); transition: transform .45s var(--mg-ease); pointer-events: none; }
.mg-login--tenant .mg-input-wrap::after { left: 0; right: 0; background: linear-gradient(90deg, var(--mg-amber-1), var(--mg-amber-2)); }
.mg-input-wrap:focus-within::after { transform: scaleX(1); }
.mg-input-icon { transition: color .25s, transform .25s var(--mg-ease); }
.mg-input-wrap:focus-within .mg-input-icon { color: var(--mg-gold); transform: translateY(-50%) scale(1.12); }
.mg-login--tenant .mg-input-wrap:focus-within .mg-input-icon { color: var(--mg-amber-2); }
/* M34 · Fragmentos que se unen (C25 · V09) — v1.4 de Meraki Glass.
   Al pulsar Ingresar: el contenido se desenfoca, los fragmentos de esquina viajan al centro,
   se unen en un rombo, sueltan dos pulsos de luz y se envía el formulario. */
.mg-corner { z-index: 3; pointer-events: none; transition: transform .62s cubic-bezier(.65,0,.35,1), filter .4s, background .4s, border-color .4s; }
.mg-split .mg-corner { width: 64px; height: 64px; border-color: rgba(255,255,255,.28); background: linear-gradient(135deg, rgba(245,154,62,.55), rgba(245,154,62,.15)); }
.mg-split .mg-corner--tl { left: 16px; top: 16px; }
.mg-split .mg-corner--br { right: 16px; bottom: 16px; }
.mg-joined .mg-corner { background: linear-gradient(135deg, rgba(245,197,66,.85), rgba(245,197,66,.3)); border-color: rgba(255,255,255,.6); filter: drop-shadow(0 0 16px rgba(245,197,66,.8)); }
.mg-login--tenant .mg-joined .mg-corner { background: linear-gradient(135deg, rgba(245,154,62,.9), rgba(226,98,31,.4)); filter: drop-shadow(0 0 16px rgba(245,154,62,.85)); }
.mg-hush > * { transition: opacity .3s var(--mg-ease), filter .3s var(--mg-ease) !important; opacity: .12 !important; filter: blur(6px) !important; animation: none !important; }
.mg-pulse { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; border: 1.5px solid var(--mg-gold); box-shadow: 0 0 34px -4px var(--mg-gold), inset 0 0 26px -8px var(--mg-gold); background: radial-gradient(circle, rgba(245,197,66,.22), transparent 65%); pointer-events: none; z-index: 4; opacity: 0; animation: mg-pulse 1.15s cubic-bezier(.2,.7,.2,1) forwards; }
.mg-login--tenant .mg-pulse { border-color: var(--mg-amber-2); box-shadow: 0 0 34px -4px var(--mg-amber-2), inset 0 0 26px -8px var(--mg-amber-2); background: radial-gradient(circle, rgba(245,154,62,.24), transparent 65%); }
@keyframes mg-pulse { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: .95; } 100% { opacity: 0; transform: scale(2.8); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }
@media (prefers-reduced-motion: reduce) { .mg-pulse { display: none; } }
