 :root {
      --rojo:    #D72B2B;
      --azul:    #1A3A8C;
      --azul2:   #0d2260;
      --verde:   #2E7D32;
      --naranja: #E87B1E;
      --amarillo:#F5C400;
      --blanco:  #FFFFFF;
      --gris:    #F4F5F7;
      --texto:   #1A1A2E;
      --sombra:  rgba(26,58,140,.18);
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'Barlow', sans-serif;
      background: linear-gradient(145deg, var(--azul2) 0%, #1a3a8c 45%, #0a1a4a 100%);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      overflow-x: hidden;
    }

    /* Fondo animado con círculos */
    .bg-orbs {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      overflow: hidden;
    }
    .orb {
      position: absolute;
      border-radius: 50%;
      filter: blur(70px);
      opacity: .18;
      animation: float 12s ease-in-out infinite alternate;
    }
    .orb-1 { width: 500px; height: 500px; background: var(--rojo);    top: -120px; right: -100px; animation-delay: 0s; }
    .orb-2 { width: 380px; height: 380px; background: var(--naranja); bottom: -80px; left: -80px;  animation-delay: -4s; }
    .orb-3 { width: 260px; height: 260px; background: var(--amarillo);top: 40%;   left: 30%;     animation-delay: -8s; opacity:.1; }
    @keyframes float {
      from { transform: translateY(0) scale(1); }
      to   { transform: translateY(-30px) scale(1.06); }
    }

    /* Stripe superior de colores */
    .top-stripe {
      height: 5px;
      background: linear-gradient(90deg, var(--rojo) 0%, var(--naranja) 25%, var(--amarillo) 50%, var(--verde) 75%, var(--azul) 100%);
      position: relative;
      z-index: 10;
      flex-shrink: 0;
    }

    /* Layout principal */
    .page {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 2rem 1.2rem;
      position: relative;
      z-index: 1;
    }

    .container {
      width: 100%;
      max-width: 1200px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      min-height: 560px;
      border-radius: 22px;
      overflow: hidden;
      box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.07);
    }

    /* ── PANEL IZQUIERDO (info/branding) ── */
    .panel-left {
      background: rgba(255,255,255,.04);
      border-right: 1px solid rgba(255,255,255,.1);
      backdrop-filter: blur(16px);
      padding: 3rem 2.5rem;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .brand-logo {
      align-items: center;
      gap: .8rem;
      text-decoration: none;
      margin-bottom: 2.5rem;
    }
    .brand-logo-text .title {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 900;
      font-size: 1.3rem;
      color: #fff;
      letter-spacing: .03em;
      line-height: 1.1;
    }
    .brand-logo-text .sub {
      font-size: .68rem;
      color: rgba(255,255,255,.5);
      letter-spacing: .1em;
      text-transform: uppercase;
    }

    .panel-left-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
    .panel-left-main h2 {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 900;
      font-size: 2.4rem;
      color: #fff;
      line-height: 1.08;
      letter-spacing: .02em;
      margin-bottom: 1rem;
    }
    .panel-left-main h2 em {
      font-style: normal;
      color: var(--amarillo);
    }
    .panel-left-main p {
      color: rgba(255,255,255,.65);
      font-size: .95rem;
      line-height: 1.65;
      margin-bottom: 2rem;
    }

    .info-pills { display: flex; flex-direction: column; gap: .6rem; }
    .info-pill {
      display: flex;
      align-items: center;
      gap: .75rem;
      background: rgba(255,255,255,.06);
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 10px;
      padding: .7rem 1rem;
    }
    .pill-icon {
      width: 32px; height: 32px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1rem;
      flex-shrink: 0;
    }
    .pill-icon.r { background: rgba(215,43,43,.3); }
    .pill-icon.o { background: rgba(232,123,30,.3); }
    .pill-icon.g { background: rgba(46,125,50,.3); }
    .info-pill span {
      font-size: .83rem;
      color: rgba(255,255,255,.7);
      line-height: 1.3;
    }
    .info-pill strong { color: #fff; display: block; font-size: .88rem; }

    .panel-left-footer {
      margin-top: 2.5rem;
      font-size: .72rem;
      color: rgba(255,255,255,.3);
      letter-spacing: .04em;
    }

    /* ── PANEL DERECHO (formulario) ── */
    .panel-right {
      background: #fff;
      padding: 3rem 2.5rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    /* Tabs: Login / Registro */
    .auth-tabs {
      display: flex;
      background: var(--gris);
      border-radius: 12px;
      padding: 4px;
      margin-bottom: 2rem;
      gap: 4px;
    }
    .auth-tab {
      flex: 1;
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 700;
      font-size: .95rem;
      letter-spacing: .06em;
      text-transform: uppercase;
      padding: .6rem;
      border-radius: 9px;
      border: none;
      background: transparent;
      color: #999;
      cursor: pointer;
      transition: all .2s;
    }
    .auth-tab.active {
      background: var(--azul);
      color: #fff;
      box-shadow: 0 2px 12px rgba(26,58,140,.35);
    }

    /* Paneles de formulario */
    .form-panel { display: none; }
    .form-panel.active { display: block; }

    .form-header { margin-bottom: 1.8rem; }
    .form-header h3 {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 900;
      font-size: 1.7rem;
      color: var(--texto);
      letter-spacing: .02em;
      margin-bottom: .25rem;
    }
    .form-header p { color: #888; font-size: .88rem; }

    /* Campos */
    .field { margin-bottom: 1.2rem; }
    .field label {
      display: block;
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 700;
      font-size: .8rem;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: #555;
      margin-bottom: .4rem;
    }
    .field-wrap { position: relative; }
    .field-icon {
      position: absolute;
      left: .9rem;
      top: 50%;
      transform: translateY(-50%);
      font-size: 1rem;
      pointer-events: none;
      color: #bbb;
    }
    .field input, .field select {
      width: 100%;
      padding: .75rem .9rem .75rem 2.6rem;
      border: 2px solid #e8eaf0;
      border-radius: 10px;
      font-family: 'Barlow', sans-serif;
      font-size: .95rem;
      color: var(--texto);
      background: var(--gris);
      transition: border-color .18s, box-shadow .18s, background .18s;
      outline: none;
      appearance: none;
    }
    .field input:focus, .field select:focus {
      border-color: var(--azul);
      background: #fff;
      box-shadow: 0 0 0 3px rgba(26,58,140,.1);
    }
    .field input::placeholder { color: #bbb; }

    /* Fila de 2 columnas */
    .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }

    /* Toggle contraseña */
    .toggle-pass {
      position: absolute;
      right: .9rem;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      color: #bbb;
      font-size: .9rem;
      padding: 0;
      transition: color .15s;
    }
    .toggle-pass:hover { color: var(--azul); }

    /* Olvidé contraseña */
    .forgot-row {
      display: flex;
      justify-content: flex-end;
      margin-top: -.6rem;
      margin-bottom: 1.2rem;
    }
    .forgot-link {
      font-size: .8rem;
      color: var(--azul);
      text-decoration: none;
      font-weight: 600;
      cursor: pointer;
      background: none;
      border: none;
      padding: 0;
    }
    .forgot-link:hover { text-decoration: underline; }

    /* Botón principal */
    .btn-main {
      width: 100%;
      background: var(--azul);
      color: #fff;
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 800;
      font-size: 1.1rem;
      letter-spacing: .08em;
      text-transform: uppercase;
      padding: .9rem;
      border-radius: 10px;
      border: none;
      cursor: pointer;
      transition: background .18s, transform .15s, box-shadow .15s;
      box-shadow: 0 4px 16px rgba(26,58,140,.35);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .6rem;
      margin-bottom: .9rem;
    }
    .btn-main:hover { background: var(--azul2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,58,140,.45); }
    .btn-main.red { background: var(--rojo); box-shadow: 0 4px 16px rgba(215,43,43,.35); }
    .btn-main.red:hover { background: #b72020; box-shadow: 0 8px 24px rgba(215,43,43,.45); }

    /* Divisor */
    .divider {
      display: flex;
      align-items: center;
      gap: .8rem;
      color: #ccc;
      font-size: .78rem;
      margin: 1rem 0;
      text-transform: uppercase;
      letter-spacing: .08em;
    }
    .divider::before, .divider::after {
      content: ''; flex: 1;
      height: 1px;
      background: #e8eaf0;
    }

    /* Botón secundario */
    .btn-outline {
      width: 100%;
      background: transparent;
      color: var(--azul);
      border: 2px solid var(--azul);
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 800;
      font-size: 1rem;
      letter-spacing: .07em;
      text-transform: uppercase;
      padding: .8rem;
      border-radius: 10px;
      cursor: pointer;
      transition: all .18s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .5rem;
    }
    .btn-outline:hover { background: var(--azul); color: #fff; }

    /* Términos */
    .terms {
      font-size: .75rem;
      color: #aaa;
      text-align: center;
      margin-top: 1.2rem;
      line-height: 1.5;
    }
    .terms a { color: var(--azul); text-decoration: none; }
    .terms a:hover { text-decoration: underline; }

    /* Checkbox custom */
    .check-field {
      display: flex;
      align-items: flex-start;
      gap: .7rem;
      margin-bottom: 1rem;
      cursor: pointer;
    }
    .check-field input[type="checkbox"] {
      width: 18px; height: 18px;
      accent-color: var(--azul);
      flex-shrink: 0;
      margin-top: 2px;
      cursor: pointer;
    }
    .check-field span { font-size: .82rem; color: #666; line-height: 1.4; }
    .check-field a { color: var(--azul); text-decoration: none; font-weight: 600; }

    /* Modal recuperar clave */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.65);
      backdrop-filter: blur(4px);
      z-index: 200;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
    }
    .modal-overlay.open { display: flex; }
    .modal {
      background: #fff;
      border-radius: 18px;
      padding: 2.5rem 2.2rem;
      max-width: 420px;
      width: 100%;
      box-shadow: 0 20px 60px rgba(0,0,0,.4);
      position: relative;
      animation: slideUp .25s ease;
    }
    @keyframes slideUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .modal-close {
      position: absolute;
      top: 1rem; right: 1rem;
      background: var(--gris);
      border: none;
      border-radius: 8px;
      width: 32px; height: 32px;
      cursor: pointer;
      font-size: 1rem;
      color: #888;
      transition: background .15s, color .15s;
    }
    .modal-close:hover { background: #e0e0e0; color: #333; }
    .modal-icon {
      width: 56px; height: 56px;
      background: rgba(26,58,140,.1);
      border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.6rem;
      margin-bottom: 1.2rem;
    }
    .modal h3 {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 900;
      font-size: 1.5rem;
      color: var(--texto);
      margin-bottom: .4rem;
    }
    .modal p { font-size: .88rem; color: #888; margin-bottom: 1.5rem; line-height: 1.5; }

    /* Footer */
    .page-footer {
      text-align: center;
      padding: 1.2rem;
      font-size: .72rem;
      color: rgba(255,255,255,.3);
      letter-spacing: .04em;
      position: relative;
      z-index: 1;
    }
    .page-footer a { color: rgba(255,255,255,.45); text-decoration: none; }

    /* Responsive */
    @media (max-width: 700px) {
      .container { grid-template-columns: 1fr; }
      .panel-left { display: none; }
      .panel-right { padding: 2.2rem 1.6rem; }
    }

    .text-center{text-align: center;}