:root{
  --bg1:#f6f8fb;
  --bg2:#eef3f8;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e6edf5;
  --primary:#0b2b3a;   /* tu azul/verde oscuro */
  --primary2:#0f3b50;
  --shadow: 0 24px 60px rgba(2, 8, 23, .12);
  --radius: 22px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% 20%, #ffffff 0%, transparent 55%),
    radial-gradient(800px 500px at 80% 60%, #ffffff 0%, transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.topbar{
  height:64px;
  display:flex;
  align-items:center;
  padding:0 28px;
  border-bottom:1px solid rgba(15,23,42,.06);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(10px);
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-dot{
  width:10px; height:10px; border-radius:50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(11,43,58,.10);
}
.brand-text{
  font-weight:700;
  letter-spacing:.10em;
  font-size:12px;
  color:var(--primary);
  text-transform:uppercase;
}

.shell{
  min-height: calc(100vh - 64px);
  display:grid;
  place-items:center;
  padding: 28px 16px 40px;
}

.card{
  width:min(520px, 92vw);
  background: var(--card);
  border:1px solid rgba(15,23,42,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 34px 28px;
  position:relative;
  overflow:hidden;

  transform: translateY(10px);
  opacity:0;
  animation: enter .55s ease forwards;
}
@keyframes enter{
  to{ transform: translateY(0); opacity:1; }
}
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(600px 220px at 50% 0%, rgba(11,43,58,.14), transparent 60%);
  pointer-events:none;
}

.logo-wrap{
  display:grid;
  place-items:center;
  margin: 8px 0 10px;
}
.logo{
  max-width: 240px;
  height:auto;
  filter: drop-shadow(0 10px 18px rgba(2,8,23,.10));
}
.logo-fallback{
  font-size:72px;
  font-weight:800;
  letter-spacing:-.06em;
  color: var(--primary);
  opacity:.9;
  display:none;
}
.title{
  margin: 6px 0 0;
  text-align:center;
  font-size: 18px;
  font-weight:700;
}
.subtitle{
  margin: 6px 0 18px;
  text-align:center;
  color: var(--muted);
  font-size: 13px;
}

.alert{
  border:1px solid rgba(220, 38, 38, .25);
  background: rgba(220, 38, 38, .06);
  color:#991b1b;
  padding:10px 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.form{ display:grid; gap: 14px; position:relative; }
.field label{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15,23,42,.82);
  margin: 0 0 6px 2px;
}
.hint{
  display:block;
  margin:6px 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.control{ position:relative; }
.input{
  width:100%;
  height:48px;
  border-radius: 14px;
  border:1px solid rgba(15,23,42,.10);
  padding: 0 14px;
  outline:none;
  background: rgba(255,255,255,.9);
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
  font-size:14px;
}
.input::placeholder{ color: rgba(100,116,139,.8); }
.input:focus{
  border-color: rgba(11,43,58,.45);
  box-shadow: 0 0 0 6px rgba(11,43,58,.12);
}
.input:active{ transform: scale(.997); }

.control-pass .input{ padding-right: 92px; }
.toggle{
  position:absolute;
  right:10px;
  top:50%;
  transform: translateY(-50%);
  height:34px;
  padding: 0 12px;
  border-radius: 999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.7);
  cursor:pointer;
  font-weight:700;
  font-size:12px;
  color: rgba(15,23,42,.75);
  transition: background .15s ease, transform .1s ease;
}
.toggle:hover{ background: rgba(255,255,255,.95); }
.toggle:active{ transform: translateY(-50%) scale(.98); }

.btn{
  margin-top: 6px;
  height: 48px;
  border-radius: 14px;
  border:0;
  background: linear-gradient(180deg, var(--primary2), var(--primary));
  color:white;
  font-weight: 800;
  letter-spacing:.02em;
  cursor:pointer;
  box-shadow: 0 14px 30px rgba(11,43,58,.22);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity:.75; cursor:not-allowed; }

.btn-spinner{
  width:16px; height:16px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.35);
  border-top-color: rgba(255,255,255,.95);
  display:none;
  animation: spin .8s linear infinite;
}
@keyframes spin{ to { transform: rotate(360deg); } }

.help{
  margin: 10px 0 0;
  text-align:center;
  color: var(--muted);
  font-size: 12px;
}
/* --- HERO LOGO --- */
.mh-hero{
  width: 170px;
  height: 120px;
  margin: 0 auto 10px;
  position: relative;
  display:grid;
  place-items:center;
  transform-style: preserve-3d;
}
.mh-logo{
  width: 150px;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(2,8,23,.14));
  transform: translateZ(18px);
  transition: transform .25s ease;
}
.mh-ring{
  position:absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(11,43,58,.18), transparent 60%);
  box-shadow: 0 0 0 10px rgba(11,43,58,.06);
  filter: blur(.2px);
}
.mh-shine{
  position:absolute;
  inset: -10px -20px;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.55) 45%, transparent 70%);
  transform: translateX(-120%) rotate(6deg);
  opacity: .0;
  pointer-events:none;
}
.card:hover .mh-shine{
  animation: mhShine 1.1s ease;
}
@keyframes mhShine{
  0%{ transform: translateX(-120%) rotate(6deg); opacity:0; }
  10%{ opacity:.45; }
  70%{ opacity:.25; }
  100%{ transform: translateX(120%) rotate(6deg); opacity:0; }
}

/* --- CARD SHEEN / HOVER LIFE --- */
.card{
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 30px 70px rgba(2, 8, 23, .14);
}

/* --- INPUT MICROINTERACTIONS --- */
.input{
  background: rgba(255,255,255,.86);
}
.input:focus{
  transform: translateY(-1px);
}

/* --- BUTTON “MAGNETIC” + RIPPLE --- */
.btn{
  position: relative;
  overflow: hidden;
}
.btn::after{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(120px 60px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.20), transparent 60%);
  opacity:0;
  transition: opacity .15s ease;
  pointer-events:none;
}
.btn:hover::after{ opacity:1; }

/* ripple element (created by JS) */
.btn .ripple{
  position:absolute;
  border-radius:999px;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.22);
  width: 12px; height: 12px;
  animation: ripple .6s ease forwards;
  pointer-events:none;
}
@keyframes ripple{
  to{
    width: 360px; height: 360px;
    opacity: 0;
  }
}

/* --- ERROR SHAKE (si lo activás por clase) --- */
.card.shake{
  animation: shake .35s ease;
}
@keyframes shake{
  0%,100%{ transform: translateX(0); }
  25%{ transform: translateX(-6px); }
  75%{ transform: translateX(6px); }
}
.mh-hero {
  width: 180px;
  height: 140px;
  margin: 0 auto 8px;
  position: relative;
  display: grid;
  place-items: center;
  animation: logoEnter .8s cubic-bezier(.16,1,.3,1);
}

@keyframes logoEnter {
  0% { transform: translateY(12px) scale(.95); opacity:0; }
  100% { transform: translateY(0) scale(1); opacity:1; }
}

.mh-ring {
  position:absolute;
  width: 150px;
  height: 150px;
  border-radius:999px;
  background: radial-gradient(circle at 50% 50%, rgba(11,43,58,.15), transparent 65%);
  filter: blur(6px);
}

.mh-logo {
  width: 165px;
  filter: drop-shadow(0 22px 40px rgba(2,8,23,.18));
  transition: transform .25s ease;
}

.mh-hero:hover .mh-logo {
  transform: scale(1.03);
}
.card {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow:
    0 25px 70px rgba(2,8,23,.12),
    inset 0 1px 0 rgba(255,255,255,.6);
}
.input {
  transition: all .2s ease;
}

.input:focus {
  transform: translateY(-1px);
  border-color: rgba(11,43,58,.45);
  box-shadow: 0 8px 20px rgba(11,43,58,.12);
}

.input::placeholder {
  transition: opacity .2s ease;
}

.input:focus::placeholder {
  opacity:.4;
}
.btn {
  letter-spacing:.04em;
  font-size:15px;
  box-shadow:
    0 14px 30px rgba(11,43,58,.22),
    inset 0 1px 0 rgba(255,255,255,.15);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}
body {
  background:
    radial-gradient(800px 400px at 50% 20%, rgba(11,43,58,.06), transparent 70%),
    linear-gradient(180deg, #f6f8fb, #eef3f8);
}
/* === Premium Motion (subtle) === */
@media (prefers-reduced-motion: no-preference) {
  .mh-ring {
    animation: breathe 5.5s ease-in-out infinite;
  }
  @keyframes breathe {
    0%,100% { transform: scale(1); opacity: .9; }
    50%     { transform: scale(1.02); opacity: 1; }
  }
}

/* Enter stagger: logo -> title -> form */
@media (prefers-reduced-motion: no-preference) {
  .mh-hero { animation: inUp .7s cubic-bezier(.16,1,.3,1) both; }
  .title   { animation: inUp .7s .06s cubic-bezier(.16,1,.3,1) both; }
  .subtitle{ animation: inUp .7s .10s cubic-bezier(.16,1,.3,1) both; }
  .form    { animation: inUp .7s .14s cubic-bezier(.16,1,.3,1) both; }

  @keyframes inUp {
    from { transform: translateY(10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }
}
.card{
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: 0 28px 80px rgba(2,8,23,.14), inset 0 1px 0 rgba(255,255,255,.7);
  position: relative;
}

.card::after{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(700px 220px at 50% 0%, rgba(255,255,255,.55), transparent 60%);
  opacity:.35;
  pointer-events:none;
}
.control{
  position: relative;
}

.control.user::before,
.control.pass::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  transform: translateY(-50%);
  width:18px;
  height:18px;
  opacity:.55;
  background-size: 18px 18px;
  background-repeat:no-repeat;
}

.control.user::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%230b2b3a' stroke-width='2' d='M20 21a8 8 0 10-16 0'/%3E%3Cpath stroke='%230b2b3a' stroke-width='2' d='M12 12a4 4 0 100-8 4 4 0 000 8z'/%3E%3C/svg%3E");
}

.control.pass::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%230b2b3a' stroke-width='2' d='M7 10V8a5 5 0 0110 0v2'/%3E%3Cpath stroke='%230b2b3a' stroke-width='2' d='M6 10h12v10H6z'/%3E%3C/svg%3E");
}

.input{
  padding-left: 44px; /* deja lugar al icono */
}
.input:focus ~ .toggle { opacity: 1; } /* opcional */
.btn.success{
  box-shadow: 0 16px 36px rgba(11,43,58,.24), inset 0 1px 0 rgba(255,255,255,.18);
  transform: translateY(-1px);
}
body{
  background:
    radial-gradient(900px 520px at 50% 26%, rgba(11,43,58,.07), transparent 70%),
    radial-gradient(700px 400px at 15% 30%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(700px 400px at 85% 60%, rgba(255,255,255,.70), transparent 58%),
    linear-gradient(180deg, #f6f8fb, #eef3f8);
}   
.brand{
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(15,23,42,.06);
}
/* === Topbar estilo dashboard === */
.mh-topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 18px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15,23,42,.06);
}

.mh-topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}

.mh-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: 0 10px 24px rgba(2,8,23,.06);
}

.mh-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(11,43,58,.10);
}

.mh-brand-text{
  font-weight: 800;
  letter-spacing: .10em;
  font-size: 12px;
  color: var(--primary);
  text-transform: uppercase;
}

.mh-pill{
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(15,23,42,.06);
  color: rgba(15,23,42,.75);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(2,8,23,.06);
}
.shell{
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100vh - 72px);
  display:grid;
  place-items:center;
  padding: 26px 16px 40px;
}