﻿* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', sans-serif;
        }

        body {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, #4a1942 0%, #8b1a4a 25%, #c70039 50%, #ff6b35 75%, #ffc300 100%);
            background-size: 400% 400%;
            animation: gradientShift 15s ease infinite;
            padding: clamp(10px, 2vh, 16px);
            position: relative;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        body::before, body::after {
            content: '';
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            pointer-events: none;
        }

        body::before {
            width: clamp(320px, 40vw, 420px);
            height: clamp(320px, 40vw, 420px);
            top: -160px;
            right: -120px;
        }

        body::after {
            width: clamp(280px, 35vw, 360px);
            height: clamp(280px, 35vw, 360px);
            bottom: -130px;
            left: -90px;
        }

        .login-container {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            /* Padding reducido verticalmente para ganar espacio y evitar scroll */
            padding: clamp(20px, 3vh, 28px) clamp(22px, 3.5vw, 30px);
            width: 100%;
            max-width: min(92vw, 400px);
            max-height: 96vh;
            box-shadow: 0 20px 50px rgba(74, 25, 66, 0.35);
            position: relative;
            z-index: 1;
            animation: slideUp 0.7s ease-out;
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-width: thin;
            scrollbar-color: rgba(199, 0, 57, 0.25) transparent;
        }

        .login-container::-webkit-scrollbar {
            width: 6px;
        }

        .login-container::-webkit-scrollbar-track {
            background: transparent;
        }

        .login-container::-webkit-scrollbar-thumb {
            background: rgba(199, 0, 57, 0.25);
            border-radius: 3px;
        }

        .login-container::-webkit-scrollbar-thumb:hover {
            background: rgba(199, 0, 57, 0.4);
        }

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

        .logo-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: clamp(12px, 2vh, 16px);
        }

        .logo-icon {
            /* Logo ligeramente más compacto */
            width: clamp(56px, 7vw, 66px);
            height: clamp(56px, 7vw, 66px);
            border-radius: 50%;
            background: linear-gradient(135deg, #4a1942, #c70039, #ff6b35, #ffc300);
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 6px 20px rgba(199, 0, 57, 0.28);
            margin-bottom: clamp(6px, 1vh, 10px);
            animation: pulse 3s ease-in-out infinite;
            overflow: hidden;
        }

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 6px 20px rgba(199, 0, 57, 0.28);
            }
            50% {
                transform: scale(1.04);
                box-shadow: 0 8px 24px rgba(199, 0, 57, 0.42);
            }
        }

        .logo-icon svg {
            width: clamp(36px, 5vw, 42px);
            height: clamp(36px, 5vw, 42px);
        }

        .logo-icon img {
            width: clamp(42px, 5vw, 48px);
            height: clamp(42px, 5vw, 48px);
            object-fit: contain;
        }

        .company-name {
            font-size: clamp(16px, 2vw, 18px);
            font-weight: 700;
            background: linear-gradient(135deg, #4a1942, #c70039, #ff6b35);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: 1px;
        }

        .company-tagline {
            font-size: clamp(9px, 1.8vw, 10px);
            color: #888;
            margin-top: 1px;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .login-title {
            text-align: center;
            font-size: clamp(17px, 2.4vw, 19px);
            font-weight: 700;
            color: #4a1942;
            margin-bottom: 2px;
        }

        .login-subtitle {
            text-align: center;
            font-size: clamp(11.5px, 2vw, 12px);
            color: #888;
            margin-bottom: clamp(12px, 2vh, 16px);
        }

        .form-group {
            /* Espaciado inferior optimizado para ahorrar altura */
            margin-bottom: clamp(10px, 1.6vh, 13px);
        }

        .form-group label {
            display: block;
            font-size: clamp(11.5px, 2vw, 12px);
            font-weight: 600;
            color: #4a1942;
            margin-bottom: 4px;
        }

        .input-wrapper {
            position: relative;
        }

        .input-wrapper svg {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 16px;
            height: 16px;
            color: #c70039;
            pointer-events: none;
        }

        .form-control {
            width: 100%;
            /* Padding vertical ajustado para inputs más compactos y cómodos */
            padding: clamp(9px, 1.5vh, 11px) 12px clamp(9px, 1.5vh, 11px) 38px;
            border: 2px solid #e8d5e0;
            border-radius: 8px;
            font-size: clamp(12.5px, 2.1vw, 13px);
            font-family: 'Poppins', sans-serif;
            transition: all 0.25s ease;
            background: #faf5f7;
            color: #333;
        }

        .form-control:focus {
            outline: none;
            border-color: #c70039;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(199, 0, 57, 0.1);
        }

        .form-control::placeholder {
            color: #aaa;
        }

        .password-toggle {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            color: #c70039;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .password-toggle svg {
            position: static;
            transform: none;
            width: 16px;
            height: 16px;
        }

        .role-selector {
            display: flex;
            gap: clamp(6px, 1.8vw, 10px);
            margin-bottom: clamp(10px, 1.6vh, 13px);
            flex-wrap: wrap;
        }

        .role-option {
            flex: 1 1 30%;
            min-width: 90px;
            position: relative;
        }

        .role-option input[type="radio"] {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        .role-label {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            /* Se reduce la altura mínima y padding del selector de roles */
            padding: clamp(6px, 1.2vh, 10px) clamp(4px, 1.2vw, 8px);
            border: 2px solid #e8d5e0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.25s ease;
            background: #faf5f7;
            text-align: center;
            min-height: clamp(48px, 6.5vh, 58px);
        }

        .role-label svg {
            width: clamp(20px, 3vw, 22px);
            height: clamp(20px, 3vw, 22px);
            margin-bottom: clamp(2px, 0.8vh, 4px);
            color: #8b1a4a;
            transition: all 0.25s ease;
        }

        .role-label span {
            font-size: clamp(11px, 1.9vw, 12px);
            font-weight: 600;
            color: #4a1942;
            line-height: 1.1;
        }

        .role-option input[type="radio"]:checked + .role-label {
            background: linear-gradient(135deg, #c70039, #ff6b35);
            border-color: transparent;
            box-shadow: 0 4px 12px rgba(199, 0, 57, 0.28);
        }

        .role-option input[type="radio"]:checked + .role-label svg,
        .role-option input[type="radio"]:checked + .role-label span {
            color: white;
        }

        .role-label:hover {
            border-color: #c70039;
            transform: translateY(-1px);
        }

        .forgot-password {
            text-align: right;
            margin-bottom: clamp(12px, 1.6vh, 15px);
        }

        .forgot-password a {
            font-size: clamp(11px, 1.9vw, 12px);
            color: #c70039;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.25s ease;
        }

        .forgot-password a:hover {
            color: #4a1942;
            text-decoration: underline;
        }

        .login-btn {
            width: 100%;
            padding: clamp(11px, 1.6vh, 12px);
            border: none;
            border-radius: 8px;
            background: linear-gradient(135deg, #4a1942, #8b1a4a, #c70039, #ff6b35);
            background-size: 200% 200%;
            color: white;
            font-size: clamp(12.5px, 2.1vw, 13.5px);
            font-weight: 700;
            font-family: 'Poppins', sans-serif;
            cursor: pointer;
            transition: all 0.3s ease;
            letter-spacing: 0.8px;
            text-transform: uppercase;
            box-shadow: 0 6px 16px rgba(199, 0, 57, 0.28);
            animation: btnGradient 4s ease infinite;
        }

        @keyframes btnGradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(199, 0, 57, 0.42);
        }

        .login-btn:active {
            transform: translateY(0);
        }

        .login-btn:disabled {
            cursor: not-allowed;
            opacity: 0.85;
        }

        .divider {
            display: flex;
            align-items: center;
            margin: clamp(12px, 1.6vh, 15px) 0 clamp(10px, 1.4vh, 12px);
        }

        .divider::before, .divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: linear-gradient(to right, transparent, #e8d5e0, transparent);
        }

        .divider span {
            padding: 0 10px;
            font-size: clamp(10px, 1.8vw, 11px);
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .signup-link {
            text-align: center;
            font-size: clamp(11px, 1.9vw, 12px);
            color: #666;
        }

        .signup-link a {
            color: #c70039;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .signup-link a:hover {
            color: #4a1942;
            text-decoration: underline;
        }

        .toast {
            position: fixed;
            top: clamp(16px, 3vh, 24px);
            left: 50%;
            transform: translateX(-50%) translateY(-120px);
            background: white;
            padding: clamp(10px, 2vh, 12px) clamp(16px, 4vw, 20px);
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            gap: 8px;
            z-index: 1000;
            transition: transform 0.35s ease;
            border-left: 4px solid #c70039;
            max-width: min(92vw, 320px);
            text-align: center;
            font-size: clamp(12px, 2.2vw, 13px);
        }

        .toast.show {
            transform: translateX(-50%) translateY(0);
        }

        .toast.success {
            border-left-color: #28a745;
        }

        .toast.error {
            border-left-color: #dc3545;
        }

        @media (max-width: 480px) {
            .login-container {
                padding: clamp(18px, 3vh, 24px) clamp(18px, 4vw, 22px);
            }

            .role-label {
                min-height: clamp(50px, 7vh, 56px);
            }
        }


/* ============================================================
   Enlaces legales (login, registro y restablecer)
   ============================================================ */
.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 8px;
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.5;
    color: #7a6a76;
}

.legal-footer-links a {
    color: #8b1a4a;
    text-decoration: none;
    font-weight: 600;
}

.legal-footer-links a:hover {
    text-decoration: underline;
}

.legal-footer-links span {
    opacity: 0.55;
}
