/**
 * LOGIN MODAL STYLES
 * Estilos para el sistema de autenticación
 */

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInAuth 0.3s ease;
}

@keyframes fadeInAuth {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-modal-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
    animation: slideUpAuth 0.4s ease;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes slideUpAuth {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
}

.login-tabs button {
    padding: 12px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #94a3b8;
    transition: all 0.2s ease;
    position: relative;
}

.login-tabs button:hover {
    color: #475569;
}

.login-tabs button.active {
    color: #173042;
    font-weight: bold;
    border-bottom: 3px solid #173042;
}

/* Form Groups */
.login-modal-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-modal-card .form-group label {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-modal-card .form-group input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.login-modal-card .form-group input:focus {
    outline: none;
    border-color: #173042;
    box-shadow: 0 0 0 3px rgba(23, 48, 66, 0.1);
}

.login-modal-card .form-group input::placeholder {
    color: #cbd5e1;
}

/* Error Messages */
.login-modal-card .error-message {
    padding: 10px 12px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    font-size: 0.85rem;
    border-left: 3px solid #dc2626;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.login-modal-card .error-message::before {
    content: "⚠️";
    flex-shrink: 0;
}

/* Success Messages */
.login-modal-card .success-message {
    padding: 10px 12px;
    background: #ecfdf5;
    color: #065f46;
    border-radius: 6px;
    font-size: 0.85rem;
    border-left: 3px solid #10b981;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.login-modal-card .success-message::before {
    content: "✅";
    flex-shrink: 0;
}

/* Info Messages */
.login-modal-card .info-message {
    padding: 12px;
    background: #ecfdf5;
    border-radius: 6px;
    border-left: 3px solid #10b981;
}

.login-modal-card .info-message small {
    color: #065f46;
    font-weight: 500;
    display: block;
}

/* Buttons */
.login-modal-card .btn-hero {
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.login-modal-card .btn-hero:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-modal-card .btn-hero:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.15);
}

.login-modal-card .btn-hero:active:not(:disabled) {
    transform: translateY(0);
}

/* Primary Button (Login) */
.login-modal-card .btn-hero.btn-primary {
    background: #173042;
    color: white;
    width: 100%;
}

.login-modal-card .btn-hero.btn-primary:hover:not(:disabled) {
    background: #1a3a52;
}

/* Secondary Button */
.login-modal-card .btn-hero.btn-secondary {
    background: #f1f5f9;
    color: #173042;
    border: 1px solid #cbd5e1;
    width: 100%;
}

.login-modal-card .btn-hero.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

/* Tertiary Button */
.login-modal-card .btn-hero.btn-tertiary {
    background: none;
    color: #0284c7;
    text-decoration: underline;
    width: 100%;
}

.login-modal-card .btn-hero.btn-tertiary:hover:not(:disabled) {
    color: #0369a1;
}

/* Success Button */
.login-modal-card .btn-hero.btn-success {
    background: #10b981;
    color: white;
    width: 100%;
}

.login-modal-card .btn-hero.btn-success:hover:not(:disabled) {
    background: #059669;
}

/* Loading State */
.login-modal-card .btn-hero:disabled::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Recovery Code Input */
.login-modal-card input[type="text"][placeholder*="RC-"] {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .login-modal-card {
        width: 95%;
        max-width: 100%;
        margin: 10px;
    }

    .login-modal-card > div {
        padding: 18px !important;
    }

    .login-modal-card .login-tabs {
        padding: 0 18px;
    }

    .login-tabs button {
        font-size: 0.85rem;
    }

    .login-modal-card .form-group input {
        font-size: 16px; /* Previene zoom en iOS */
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .login-modal-card {
        background: #1e293b;
        color: #e2e8f0;
    }

    .login-modal-card .panel-header {
        background: linear-gradient(135deg, #0f172a 0%, #1a2a3d 100%);
        color: #e2e8f0;
    }

    .login-modal-card .form-group input {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }

    .login-modal-card .form-group input::placeholder {
        color: #64748b;
    }

    .login-modal-card .form-group input:focus {
        border-color: #64b5f6;
        box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
    }

    .login-tabs {
        border-bottom-color: #334155;
    }

    .login-tabs button {
        color: #94a3b8;
    }

    .login-tabs button:hover {
        color: #cbd5e1;
    }

    .login-modal-card .btn-hero.btn-secondary {
        background: #334155;
        color: #e2e8f0;
        border-color: #475569;
    }

    .login-modal-card .btn-hero.btn-secondary:hover:not(:disabled) {
        background: #475569;
    }
}
