    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg: #E8E8E6;
      --card: #FAFAF8;
      --primary: #2D2D2A;
      --accent: #6B5B45;
      --accent2: #A0856A;
      --muted: #9E9D9B;
      --border: #DDDBD7;
      --error: #C0392B;
      --success: #27AE60;
      --warn: #E67E22;
      --shadow: rgba(45,45,42,0.10);
    }

    html, body {
      height: 100%;
      background: var(--bg);
      font-family: 'DM Sans', sans-serif;
      color: var(--primary);
    }

    /* ── Fondo animado igual que el sistema anterior ── */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse 70% 60% at 15% 20%, rgba(107,91,69,0.13) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 85% 75%, rgba(160,133,106,0.10) 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(232,232,230,0.5) 0%, transparent 70%);
      animation: bgPulse 8s ease-in-out infinite alternate;
      pointer-events: none;
      z-index: 0;
    }

    /* Grain overlay */
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: 0.5;
    }

    @keyframes bgPulse {
      0%   { opacity: 0.8; transform: scale(1); }
      100% { opacity: 1;   transform: scale(1.04); }
    }

    /* ── Toolbar ── */
    .toolbar {
      position: fixed;
      top: 0; left: 0; right: 0;
      height: 56px;
      display: flex;
      align-items: center;
      padding: 0 16px;
      z-index: 100;
      background: rgba(232,232,230,0.72);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(107,91,69,0.10);
    }

    .back-btn {
      width: 38px; height: 38px;
      border: none;
      background: rgba(45,45,42,0.07);
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s, transform 0.18s;
      color: var(--primary);
    }
    .back-btn:hover {
      background: rgba(45,45,42,0.13);
      transform: translateX(-2px);
    }
    .back-btn svg { width: 20px; height: 20px; }

    /* ── Layout ── */
    .page {
      position: relative;
      z-index: 1;
      min-height: 100vh;
      padding-top: 72px;
      display: flex;
      align-items: flex-start;
      justify-content: center;
    }

    .card {
      width: 100%;
      max-width: 420px;
      background: var(--card);
      border-radius: 24px;
      box-shadow: 0 8px 48px var(--shadow), 0 1px 0 rgba(255,255,255,0.8) inset;
      padding: 40px 36px 36px;
      margin: 16px;
      border: 1px solid rgba(221,219,215,0.7);
      animation: cardIn 0.55s cubic-bezier(0.23,1,0.32,1) both;
    }

    @keyframes cardIn {
      from { opacity: 0; transform: translateY(28px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0)    scale(1); }
    }

    /* ── Header ── */
    .card-header { margin-bottom: 32px; }

    .title {
      font-family: 'Playfair Display', serif;
      font-size: 28px;
      font-weight: 700;
      color: var(--primary);
      line-height: 1.2;
      margin-bottom: 6px;
      transition: opacity 0.25s;
    }

    .subtitle {
      font-size: 13.5px;
      color: var(--muted);
      font-weight: 400;
    }

    /* ── Decorative line ── */
    .deco-line {
      width: 40px;
      height: 3px;
      background: linear-gradient(90deg, var(--accent), var(--accent2));
      border-radius: 2px;
      margin-bottom: 14px;
    }

    /* ── Form fields ── */
    .field { margin-bottom: 18px; }

    .field label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 7px;
    }

    .input-wrap {
      position: relative;
    }

    .input-wrap input {
      width: 100%;
      height: 46px;
      padding: 0 44px 0 14px;
      border: 1.5px solid var(--border);
      border-radius: 12px;
      background: rgba(232,232,230,0.35);
      font-family: 'DM Sans', sans-serif;
      font-size: 14.5px;
      color: var(--primary);
      outline: none;
      transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    }

    .input-wrap input::placeholder { color: var(--muted); font-size: 13px; }

    .input-wrap input:focus {
      border-color: var(--accent);
      background: #fff;
      box-shadow: 0 0 0 3px rgba(107,91,69,0.10);
    }

    .input-wrap input.error-input { border-color: var(--error); }
    .input-wrap input.ok-input    { border-color: var(--success); }

    /* Eye toggle */
    .eye-btn {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      color: var(--muted);
      padding: 4px;
      display: flex;
      align-items: center;
      transition: color 0.2s;
    }
    .eye-btn:hover { color: var(--accent); }
    .eye-btn svg { width: 18px; height: 18px; }

    /* ── Password strength bars ── */
    .strength-wrap {
      margin-top: 8px;
      display: flex;
      gap: 5px;
      height: 4px;
    }

    .strength-bar {
      flex: 1;
      height: 4px;
      border-radius: 2px;
      background: var(--border);
      transition: background 0.35s ease;
    }

    .strength-label {
      font-size: 11px;
      color: var(--muted);
      margin-top: 5px;
      min-height: 14px;
      transition: color 0.3s;
    }

    /* ── Recuperar contraseña ── */
    .recover-row {
      text-align: right;
      margin-top: -6px;
      margin-bottom: 18px;
    }

    .recover-link {
      font-size: 12.5px;
      color: var(--accent);
      text-decoration: none;
      font-weight: 500;
      cursor: pointer;
      background: none;
      border: none;
      padding: 0;
      transition: color 0.2s, text-decoration 0.2s;
    }
    .recover-link:hover { color: var(--primary); text-decoration: underline; }



    /* ── Submit button ── */
    .btn-row { margin-top: 24px; }

    .btn {
      width: 100%;
      height: 50px;
      border: none;
      border-radius: 14px;
      font-family: 'DM Sans', sans-serif;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.16s, box-shadow 0.16s, opacity 0.16s;
      letter-spacing: 0.03em;
    }

    .btn:active { transform: scale(0.98); }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary) 0%, #4a4a46 100%);
      color: #fff;
      box-shadow: 0 5px 20px rgba(45,45,42,0.30);
    }
    .btn-primary:hover { box-shadow: 0 7px 26px rgba(45,45,42,0.40); opacity: 0.93; }

    /* ── Toggle links ── */
    .toggle-section {
      margin-top: 20px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: center;
    }

    .toggle-row {
      font-size: 13.5px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .toggle-link {
      background: none;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 13.5px;
      font-weight: 700;
      color: var(--primary);
      cursor: pointer;
      padding: 0;
      text-decoration: underline;
      text-underline-offset: 2px;
      transition: color 0.2s;
    }
    .toggle-link:hover { color: var(--accent); }

    /* ── Hidden / visible ── */
    .hidden { display: none !important; }

    /* ── Divider ── */
    .divider {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 20px 0;
    }
    .divider::before, .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }
    .divider span { font-size: 12px; color: var(--muted); white-space: nowrap; }

    /* Field slide animation */
    .slide-field {
      overflow: hidden;
      transition: max-height 0.4s cubic-bezier(0.23,1,0.32,1),
                  opacity   0.35s ease,
                  margin    0.35s ease;
      max-height: 120px;
      opacity: 1;
    }
    .slide-field.hidden {
      display: block !important;
      max-height: 0;
      opacity: 0;
      margin-bottom: 0 !important;
      pointer-events: none;
    }

    /* ══════════════════════════════════════
       RESPONSIVE — móvil pequeño (< 360px)
    ══════════════════════════════════════ */
    @media (max-width: 359px) {
      .toolbar { height: 50px; padding: 0 12px; }
      .page    { padding-top: 62px; }
      .card    { padding: 28px 18px 28px; margin: 10px; border-radius: 18px; }
      .title   { font-size: 22px; }
      .subtitle{ font-size: 12px; }
      .input-wrap input { height: 42px; font-size: 13.5px; }
      .btn     { height: 44px; font-size: 14px; }
      .field label { font-size: 11px; }
      .toggle-link, .toggle-row { font-size: 12px; }
    }

    /* ══════════════════════════════════════
       RESPONSIVE — móvil estándar (360–599px)
       Ya cubre el diseño base, sin cambios
    ══════════════════════════════════════ */

    /* ══════════════════════════════════════
       RESPONSIVE — tablet (600–1023px)
    ══════════════════════════════════════ */
    @media (min-width: 600px) {
      .page {
        align-items: center;
        padding-top: 0;
        min-height: 100vh;
      }
      .card {
        max-width: 480px;
        padding: 48px 44px 44px;
        margin: 24px;
        border-radius: 28px;
      }
      .title    { font-size: 32px; }
      .subtitle { font-size: 14.5px; }
      .input-wrap input { height: 50px; font-size: 15px; }
      .btn      { height: 52px; font-size: 15.5px; border-radius: 16px; }
      .field    { margin-bottom: 20px; }
      .card-header { margin-bottom: 36px; }
    }

    /* ══════════════════════════════════════
       RESPONSIVE — laptop / escritorio (≥ 1024px)
       Layout en dos columnas: fondo decorativo | card
    ══════════════════════════════════════ */
    @media (min-width: 1024px) {
      body { overflow: hidden; }

      .page {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        min-height: 100vh;
        padding-top: 0;
      }

      /* Panel izquierdo decorativo */
      .page::before {
        content: '';
        display: block;
        background:
          radial-gradient(ellipse 80% 60% at 30% 40%, rgba(107,91,69,0.22) 0%, transparent 65%),
          radial-gradient(ellipse 60% 70% at 70% 70%, rgba(160,133,106,0.15) 0%, transparent 60%),
          var(--bg);
        position: relative;
        z-index: 1;
      }

      /* Texto decorativo en panel izquierdo */
      .page::after {
        content: 'Bienvenido';
        position: fixed;
        left: 0; top: 50%;
        width: 50%;
        transform: translateY(-50%);
        text-align: center;
        font-family: 'Playfair Display', serif;
        font-size: clamp(36px, 4vw, 56px);
        font-weight: 700;
        color: rgba(107,91,69,0.25);
        pointer-events: none;
        z-index: 2;
        letter-spacing: -0.02em;
        line-height: 1.2;
      }

      /* Panel derecho: card centrada */
      .card {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 80px 60px 60px;
        box-shadow: -8px 0 40px rgba(45,45,42,0.08);
        border: none;
        border-left: 1px solid rgba(221,219,215,0.6);
        position: relative;
        z-index: 3;
      }

      .title    { font-size: 36px; }
      .subtitle { font-size: 15px; }
      .input-wrap input { height: 52px; font-size: 15.5px; }
      .btn      { height: 54px; font-size: 16px; border-radius: 16px; }
      .field    { margin-bottom: 22px; }
      .card-header { margin-bottom: 40px; }
      .btn-row  { margin-top: 28px; }
      .toggle-section { margin-top: 24px; }
    }

    /* ══════════════════════════════════════
       RESPONSIVE — pantalla grande (≥ 1440px)
    ══════════════════════════════════════ */
    @media (min-width: 1440px) {
      .card     { padding: 100px 80px 80px; }
      .title    { font-size: 42px; }
      .input-wrap input { height: 56px; font-size: 16px; }
      .btn      { height: 58px; font-size: 16.5px; }
      .field label { font-size: 13px; }
    }