  @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400;500&display=swap');

  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  :root {
    --bg: #f7f6f3;
    --surface: #ffffff;
    --border: #e8e6e1;
    --text: #1a1916;
    --muted: #8a8880;
    --accent: #2d6a4f;
    --accent-l: #e8f4ee;
    --danger: #c0392b;
    --danger-l: #fdf0ee;
  }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
  }

  .logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    /* Espacio generoso antes del card */
    padding: 10px;
  }


  .header-logo {
    height: 80px;
    /* Tamaño equilibrado */
    width: auto;
    display: block;
    object-fit: contain;

    /* Esto ayuda a suavizar el choque de blancos si no puedes usar PNG transparente */
    mix-blend-mode: multiply;

    /* Un filtro de brillo para que el fondo blanco de la imagen 
     se vuelva invisible contra el fondo de la página */
    filter: contrast(1.1);

    margin: 0 auto;
  }

  .header-logo:hover {
    transform: scale(1.02);
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%;
    max-width: 380px;
    padding: 32px 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  }

  .card-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
  }

  .card-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
  }

  .field {
    margin-bottom: 16px;
  }

  .field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .input-wrap {
    position: relative;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
  }

  input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .1);
  }

  .toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    padding: 2px 4px;
  }

  .toggle-pass:hover {
    color: var(--text);
  }

  .alert-error {
    background: var(--danger-l);
    border: 1px solid #f5c6c0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 16px;
    display: none;
  }

  .alert-error.visible {
    display: block;
  }

  .btn {
    width: 100%;
    padding: 11px;
    border-radius: 9px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
  }

  .btn-primary {
    background: var(--accent);
    color: #fff;
  }

  .btn-primary:hover {
    background: #235c42;
  }

  .btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
  }

  .register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted);
  }

  .register-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
  }

  .register-link a:hover {
    text-decoration: underline;
  }

  /* ── Responsive ── */
  @media (max-width: 480px) {
    body {
      padding: 16px 12px;
    }

    .card {
      padding: 24px 18px;
      border-radius: 12px;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"] {
      font-size: 16px;
    }

    /* evita zoom en iOS */
  }