 *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --teal:      #2bb3a8;
      --teal-dark: #1d8a81;
      --green-mid: #1a6b4a;
      --green-deep:#0d3b2e;
      --cream:     #f0fdf9;
      --white:     #ffffff;
      --text:      #0d2523;
      --muted:     #5c8480;
    }

    html, body {
      font-family: 'DM Sans', sans-serif;
      min-height: 100vh;
    }

    body {
      background: var(--cream);
      display: flex; align-items: center; justify-content: center;
      position: relative; overflow-x: hidden;
      padding: 40px 20px;
    }

    #bg-canvas { position: fixed; inset: 0; z-index: 0; }

    .overlay {
      position: fixed; inset: 0; z-index: 1;
      background:
        radial-gradient(ellipse 60% 55% at 15% 50%, rgba(212,240,228,.5) 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 85% 25%, rgba(43,179,168,.1) 0%, transparent 60%);
    }

    /* ── MAIN WRAPPER ── */
    .wrapper {
      position: relative; z-index: 2;
      width: 100%; max-width: 980px;
      display: grid; grid-template-columns: 340px 1fr;
      gap: 28px; align-items: start;
      animation: fadeUp .55s cubic-bezier(.22,1,.36,1) both;
    }
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── LEFT SIDEBAR ── */
    .sidebar {
      display: flex; flex-direction: column; gap: 20px;
    }

    /* logo card */
    .logo-card {
      background: rgba(255,255,255,.78);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(43,179,168,.2);
      border-radius: 22px; padding: 26px 24px;
      box-shadow: 0 8px 32px rgba(13,59,46,.08);
    }
    .logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
    .logo-pill {
      background: var(--teal); color: white;
      font-family: 'DM Serif Display', serif;
      font-size: .82rem; padding: 5px 14px; border-radius: 50px;
      letter-spacing: .06em;
    }
    .logo-row h2 {
      font-family: 'DM Serif Display', serif;
      font-size: 1.5rem; color: var(--green-deep); letter-spacing: -.04em;
    }
    .logo-card h1 {
      font-family: 'DM Serif Display', serif;
      font-size: 1.7rem; color: var(--green-deep);
      line-height: 1.1; letter-spacing: -.03em;
    }
    .logo-card h1 em { font-style: italic; color: var(--teal); }
    .logo-card p {
      font-size: .8rem; font-weight: 300; color: var(--muted);
      line-height: 1.6; margin-top: 10px;
    }

    /* steps tracker */
    .steps-card {
      background: rgba(255,255,255,.78);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(43,179,168,.2);
      border-radius: 22px; padding: 22px 24px;
      box-shadow: 0 8px 32px rgba(13,59,46,.08);
    }
    .steps-title {
      font-size: .68rem; font-weight: 600; letter-spacing: .1em;
      text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
    }
    .step-track { display: flex; flex-direction: column; gap: 0; }
    .step-item {
      display: flex; align-items: flex-start; gap: 14px;
      position: relative; padding-bottom: 18px;
    }
    .step-item:last-child { padding-bottom: 0; }
    /* connector line */
    .step-item:not(:last-child)::after {
      content: '';
      position: absolute; left: 13px; top: 28px;
      width: 2px; height: calc(100% - 14px);
      background: rgba(43,179,168,.15);
    }
    .step-item.done::after { background: var(--teal); }

    .step-circle {
      width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
      border: 2px solid rgba(43,179,168,.3);
      background: var(--white);
      display: flex; align-items: center; justify-content: center;
      font-size: .7rem; font-weight: 700; color: var(--muted);
      transition: all .3s;
      position: relative; z-index: 1;
    }
    .step-item.done .step-circle {
      background: var(--teal); border-color: var(--teal); color: white;
    }
    .step-item.active .step-circle {
      border-color: var(--teal); color: var(--teal);
      box-shadow: 0 0 0 4px rgba(43,179,168,.15);
    }
    .step-info { padding-top: 3px; }
    .step-info strong {
      display: block; font-size: .82rem; font-weight: 600;
      color: var(--text);
    }
    .step-item.done .step-info strong { color: var(--teal); }
    .step-info span { font-size: .72rem; color: var(--muted); }

    /* login link */
    .login-link {
      background: rgba(255,255,255,.78);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(43,179,168,.2);
      border-radius: 18px; padding: 16px 20px;
      box-shadow: 0 4px 16px rgba(13,59,46,.06);
      display: flex; align-items: center; justify-content: space-between;
      text-decoration: none;
      transition: background .2s;
    }
    .login-link:hover { background: rgba(212,240,228,.7); }
    .login-link span { font-size: .8rem; color: var(--muted); }
    .login-link strong { font-size: .82rem; font-weight: 600; color: var(--teal); }
    .login-link svg { width: 14px; height: 14px; fill: var(--teal); }

    /* ── RIGHT: FORM CARD ── */
    .form-card {
      background: rgba(255,255,255,.82);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(43,179,168,.2);
      border-radius: 28px;
      box-shadow:
        0 2px 0 rgba(255,255,255,.9) inset,
        0 24px 64px rgba(13,59,46,.1);
      overflow: hidden;
    }

    /* form header band */
    .form-band {
      background: var(--green-deep);
      padding: 24px 32px;
      display: flex; align-items: center; justify-content: space-between;
      position: relative; overflow: hidden;
    }
    .form-band::before {
      content: '';
      position: absolute; width: 200px; height: 200px; border-radius: 50%;
      border: 32px solid rgba(255,255,255,.04);
      top: -60px; right: -40px;
    }
    .form-band-text { position: relative; z-index: 1; }
    .form-band-text h3 {
      font-family: 'DM Serif Display', serif;
      font-size: 1.3rem; color: white; letter-spacing: -.02em;
    }
    .form-band-text p { font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 3px; }
    .form-band-badge {
      position: relative; z-index: 1;
      background: rgba(43,179,168,.25); color: var(--teal);
      border: 1px solid rgba(43,179,168,.3);
      font-size: .68rem; font-weight: 700; letter-spacing: .1em;
      text-transform: uppercase; padding: 5px 14px; border-radius: 50px;
      white-space: nowrap;
    }

    /* sections inside form */
    .form-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 24px; }

    .form-section { display: flex; flex-direction: column; gap: 14px; }
    .section-head {
      display: flex; align-items: center; gap: 10px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(43,179,168,.12);
    }
    .section-num {
      width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
      background: var(--teal);
      display: flex; align-items: center; justify-content: center;
    }
    .section-num span {
      font-size: .68rem; font-weight: 800; color: white; letter-spacing: .02em;
    }
    .section-head h4 {
      font-family: 'DM Serif Display', serif;
      font-size: .95rem; color: var(--green-deep);
    }

    .fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

    .input-group { display: flex; flex-direction: column; gap: 5px; }
    label {
      font-size: .7rem; font-weight: 600; color: var(--text);
      letter-spacing: .06em; text-transform: uppercase;
    }
    .input-wrap { position: relative; display: flex; align-items: center; }
    .input-wrap svg.ico {
      position: absolute; left: 12px;
      width: 15px; height: 15px; fill: var(--muted); pointer-events: none;
    }
    input {
      width: 100%;
      padding: 12px 12px 12px 37px;
      background: rgba(240,253,249,.8);
      border: 1.5px solid rgba(43,179,168,.22);
      border-radius: 12px;
      font-family: 'DM Sans', sans-serif;
      font-size: .88rem; color: var(--text);
      outline: none;
      transition: border-color .2s, background .2s, box-shadow .2s;
    }
    input::placeholder { color: #aeccc7; }
    input:focus {
      border-color: var(--teal); background: white;
      box-shadow: 0 0 0 4px rgba(43,179,168,.1);
    }
    .toggle-pw {
      position: absolute; right: 12px;
      background: none; border: none; cursor: pointer; padding: 4px;
      display: flex; align-items: center;
    }
    .toggle-pw svg { width: 14px; height: 14px; fill: var(--muted); }

    /* form footer */
    .form-footer {
      padding: 20px 32px 28px;
      border-top: 1px solid rgba(43,179,168,.1);
      display: flex; align-items: center; gap: 16px;
    }
    .btn-submit {
      flex: 1; padding: 14px;
      border: none; border-radius: 50px;
      background: var(--green-deep); color: white;
      font-family: 'DM Sans', sans-serif;
      font-size: .92rem; font-weight: 600;
      cursor: pointer;
      transition: background .2s, transform .15s, box-shadow .2s;
      box-shadow: 0 6px 22px rgba(13,59,46,.2);
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .btn-submit svg { width: 15px; height: 15px; fill: white; }
    .btn-submit:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(43,179,168,.3); }
    .btn-submit:active { transform: translateY(0); }

    .security-foot {
      display: flex; align-items: center; gap: 6px;
      font-size: .68rem; color: #aabfbb;
      flex-direction: column; text-align: center; min-width: 80px;
    }
    .security-foot svg { width: 18px; height: 18px; fill: var(--teal); }

    /* ─────────────────────────────── */
    /* RESPONSIVE — TABLET (≤ 900px) */
    /* ─────────────────────────────── */
    @media (max-width: 900px) {
      body { padding: 32px 20px; align-items: flex-start; }
      .wrapper {
        grid-template-columns: 1fr;
        max-width: 600px;
      }
      /* sidebar se convierte en banner horizontal compacto */
      .sidebar {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
      }
      .logo-card {
        flex: 1 1 200px;
        border-radius: 18px;
        padding: 20px 24px;
      }
      .logo-card h1 { font-size: 1.5rem; }
      .logo-card p  { font-size: .8rem; display: none; }
      .steps-card   { flex: 1 1 200px; border-radius: 18px; }
      .login-link   { display: none; } /* se muestra abajo en el form */
      .fields-row   { grid-template-columns: 1fr; }
      .form-band    { flex-direction: column; align-items: flex-start; gap: 10px; }
    }

    /* ─────────────────────────────── */
    /* RESPONSIVE — MÓVIL (≤ 640px)  */
    /* ─────────────────────────────── */
    @media (max-width: 640px) {
      body { padding: 20px 14px; }
      .wrapper { max-width: 100%; gap: 16px; }

      /* sidebar oculto completamente en móvil */
      .sidebar { display: none; }

      .form-card { border-radius: 22px; }
      .form-band { padding: 20px 22px; }
      .form-band-text h3 { font-size: 1.15rem; }
      .form-body { padding: 22px; gap: 20px; }
      .form-footer { padding: 16px 22px 22px; }
      .fields-row { grid-template-columns: 1fr; }
      .form-band { flex-direction: column; align-items: flex-start; gap: 10px; }

      /* Banner de login visible en móvil (reemplaza el sidebar) */
      .mob-login-banner {
        display: flex !important;
      }
    }

    /* ── Banner de login solo móvil (oculto en desktop) ── */
    .mob-login-banner {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 20px;
      background: linear-gradient(135deg, rgba(13,59,46,.92) 0%, rgba(26,107,74,.88) 100%);
      border-radius: 16px;
      text-decoration: none;
      margin-bottom: 4px;
      transition: opacity .2s;
    }
    .mob-login-banner:hover { opacity: .9; }
    .mob-login-banner-text span {
      display: block;
      font-size: .75rem;
      color: rgba(255,255,255,.6);
    }
    .mob-login-banner-text strong {
      font-size: .95rem;
      font-weight: 600;
      color: #fff;
    }
    .mob-login-banner svg {
      width: 20px;
      height: 20px;
      fill: rgba(255,255,255,.7);
      flex-shrink: 0;
    }

    /* ─────────────────────────────────────── */
    /* RESPONSIVE — MÓVIL PEQUEÑO (≤ 480px) */
    /* ─────────────────────────────────────── */
    @media (max-width: 480px) {
      body { padding: 14px 12px; }
      .form-body { padding: 20px; }
      .form-footer { padding: 16px 20px 22px; flex-direction: column; gap: 12px; }
      .btn-submit { width: 100%; }
      .security-foot { flex-direction: row; min-width: unset; }
      input { padding: 11px 11px 11px 34px; font-size: .84rem; }
      .input-wrap svg.ico { width: 13px; height: 13px; }
      .mob-login-banner { padding: 12px 16px; }
      .mob-login-banner-text strong { font-size: .88rem; }
    }

    /* ─────────────────────────────────────── */
    /* RESPONSIVE — MÓVIL SÚPER PEQUEÑO (≤ 400px) */
    /* ─────────────────────────────────────── */
    @media (max-width: 400px) {
      body { padding: 10px 8px; }
      .form-band { padding: 16px 16px; }
      .form-body { padding: 16px; gap: 16px; }
      .form-footer { padding: 14px 16px 18px; }
      .section-head h4 { font-size: .95rem; }
      input { font-size: .8rem; padding: 10px 10px 10px 32px; }
      .mob-login-banner { padding: 10px 12px; flex-direction: column; text-align: center; gap: 6px; }
      .mob-login-banner svg { display: none; }
    }

/* ── ALERTAS FLOTANTES (FLASH MESSAGES) ── */
.contenedor-alertas-flotante{
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: calc(100% - 40px);
    max-width: 320px;
}
.alerta{
    padding: 14px 40px 14px 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    position: relative;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: slideIn 0.4s ease;
    font-family: 'DM Sans', sans-serif;
}
.alerta-error{
    background: #ffecec;
    color: #b30000;
    border-left: 5px solid #ff4d4d;
}
.alerta-success{
    background: #e8fff1;
    color: #006b3c;
    border-left: 5px solid #2ecc71;
}
.alerta .cerrar{
    position: absolute;
    right: 12px;
    top: 8px;
    cursor: pointer;
    font-size: 18px;
}
@keyframes slideIn{
    from{ opacity: 0; transform: translateX(50px); }
    to{ opacity: 1; transform: translateX(0); }
}