   /* ===== VARIABLES Y RESET ===== */
    :root {
      --primary-color: #008652;
      --primary-dark: #006b42;
      --primary-light: #00a566;
      --text-dark: #2f3a3f;
      --text-medium: #4b555b;
      --text-light: #6c757d;
      --border-color: rgba(0, 0, 0, 0.1);
      --input-bg: #ffffff;
      --bg-gray: #f8f9fa;
      --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
      --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
      --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* ===== BODY Y LAYOUT ===== */
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background: linear-gradient(135deg, #f5f7fa 0%, #e8ecef 100%);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      color: var(--text-dark);
    }

    .wrapper {
      width: 100%;
      max-width: 460px;
      animation: fadeInUp 0.6s ease-out;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ===== FORMULARIO ===== */
    .form-signin {
      background: #ffffff;
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      overflow: hidden;
    }

    /* ===== LOGO HEADER ===== */
    .logo {
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
      padding: 50px 30px;
      text-align: center;
      position: relative;
      overflow: hidden;
    }

    .logo::before {
      content: "";
      position: absolute;
      top: -50%;
      right: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
      animation: pulse 15s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { transform: scale(1) rotate(0deg); }
      50% { transform: scale(1.1) rotate(180deg); }
    }

    .logo img {
      position: relative;
      z-index: 1;
      max-width: 280px;
      height: auto;
      /*filter: brightness(0) invert(1);*/
    }

    /* ===== CONTENIDO DEL FORM ===== */
    .form-content {
      padding: 40px 35px 35px;
    }

    /* ===== ALERTAS ===== */
    .alert {
      border-radius: var(--radius-sm);
      border: none;
      font-size: 14px;
      animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ===== CAMPOS DE ENTRADA ===== */
    .field {
      margin-bottom: 20px;
    }

    .field label {
      display: block;
      margin-bottom: 8px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-dark);
      letter-spacing: -0.01em;
    }

    .control {
      position: relative;
    }

    .icon--left {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      width: 20px;
      height: 20px;
      color: var(--text-light);
      pointer-events: none;
      transition: var(--transition);
      z-index: 1;
    }

    .control input {
      width: 100%;
      height: 50px;
      padding: 12px 50px 12px 48px;
      border: 2px solid var(--border-color);
      border-radius: var(--radius-md);
      background: var(--input-bg);
      font-size: 15px;
      color: var(--text-dark);
      outline: none;
      transition: var(--transition);
    }

    .control input::placeholder {
      color: var(--text-light);
      opacity: 0.6;
    }

    .control input:focus {
      border-color: var(--primary-color);
      box-shadow: 0 0 0 4px rgba(0, 134, 82, 0.1);
      background: #ffffff;
    }

    .control input:focus + .icon--left,
    .control input:not(:placeholder-shown) + .icon--left {
      color: var(--primary-color);
    }

    /* ===== BOTÓN TOGGLE PASSWORD ===== */
    .icon-btn {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      border: none;
      background: transparent;
      padding: 8px;
      cursor: pointer;
      color: var(--text-light);
      transition: var(--transition);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .icon-btn:hover {
      color: var(--primary-color);
      background: rgba(0, 134, 82, 0.08);
    }

    .icon-btn .icon {
      width: 20px;
      height: 20px;
    }

    .hidden {
      display: none !important;
    }

    /* ===== ROW (RECORDAR / OLVIDÉ) ===== */
    .login-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 16px;
      font-size: 14px;
    }

    .check {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--text-medium);
      cursor: not-allowed;
      user-select: none;
      opacity: 0.6;
    }

    .check input[type="checkbox"] {
      width: 18px;
      height: 18px;
      cursor: not-allowed;
      accent-color: var(--primary-color);
    }

    .link {
      color: var(--primary-color);
      text-decoration: none;
      font-weight: 600;
      transition: var(--transition);
      white-space: nowrap;
    }

    .link:hover {
      color: var(--primary-dark);
      text-decoration: underline;
    }

    /* ===== BOTÓN SUBMIT ===== */
    .submit {
      width: 100%;
      height: 52px;
      margin-top: 24px;
      border: none;
      border-radius: var(--radius-md);
      font-weight: 700;
      font-size: 15px;
      letter-spacing: 0.02em;
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
      color: #ffffff;
      box-shadow: 0 4px 12px rgba(0, 134, 82, 0.3);
      cursor: pointer;
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .submit::before {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
      transition: left 0.5s;
    }

    .submit:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 134, 82, 0.4);
    }

    .submit:hover::before {
      left: 100%;
    }

    .submit:active {
      transform: translateY(0);
      box-shadow: 0 2px 8px rgba(0, 134, 82, 0.3);
    }

    .submit:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    /* ===== FOOTER ===== */
    .footer {
      margin-top: 24px;
      text-align: center;
      color: var(--text-light);
      font-size: 13px;
      padding-top: 20px;
      border-top: 1px solid var(--border-color);
    }

    /* ===== RESPONSIVE ===== */
    @media only screen and (max-width: 480px) {
      body {
        padding: 15px;
        background: #ffffff;
      }

      .wrapper {
        max-width: 100%;
      }

      .form-signin {
        box-shadow: none;
        border-radius: 0;
      }

      .form-content {
        padding: 30px 25px 25px;
      }

      .logo {
        padding: 40px 20px;
        border-radius: 0;
      }

      .logo img {
        max-width: 240px;
      }

      .control input {
        height: 48px;
        font-size: 16px; /* Previene zoom en iOS */
      }

      .submit {
        height: 50px;
      }

      .login-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
    }

    /* ===== ANIMACIONES DE CARGA ===== */
    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .spinner {
      width: 18px;
      height: 18px;
      border: 2px solid rgba(255,255,255,0.3);
      border-top-color: #ffffff;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    /* ===== MEJORAS ADICIONALES ===== */
    .control input:invalid:not(:placeholder-shown) {
      border-color: #dc3545;
    }

    .control input:valid:not(:placeholder-shown) {
      border-color: #28a745;
    }

    /* Focus visible para accesibilidad */
    *:focus-visible {
      outline: 2px solid var(--primary-color);
      outline-offset: 2px;
    }

    button:focus-visible {
      outline-offset: 4px;
    }